summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-exegesis] Fix rGaf658d920e2bLlvmClement Courbet2020-11-041-0/+1
| | | | | | | | | Add missing header. ``` ../../llvm/tools/llvm-exegesis/lib/X86/Target.cpp(606,14): error: use of undeclared identifier '__readeflags' Eflags = __readeflags(); ```
* [gn build] Port 73b6cb67dcdLLVM GN Syncbot2020-11-041-1/+1
|
* [gn build] Port 1124bf4ab77LLVM GN Syncbot2020-11-041-0/+1
|
* [gn build] try to port 707d69ff32309bNico Weber2020-11-041-0/+1
|
* [VE] Add +vpu attributeSimon Moll2020-11-047-42/+70
| | | | | | | | | | | `+vpu` controls whether VEISelLowering adds any vregs. This defaults to `-vpu` to have scalar code generation out of the box. We bring up vector isel under the `+vpu` flag. Once vector isel is stable we switch to `+vpu` and advertise vregs and vops in TTI. Reviewed By: kaz7 Differential Revision: https://reviews.llvm.org/D90465
* [SVE][CodeGen] Lower scalable integer vector reductionsKerry McLaughlin2020-11-0410-28/+1284
| | | | | | | | | | | | | This patch uses the existing LowerFixedLengthReductionToSVE function to also lower scalable vector reductions. A separate function has been added to lower VECREDUCE_AND & VECREDUCE_OR operations with predicate types using ptest. Lowering scalable floating-point reductions will be addressed in a follow up patch, for now these will hit the assertion added to expandVecReduce() in TargetLowering. Reviewed By: paulwalker-arm Differential Revision: https://reviews.llvm.org/D89382
* [mlir][SCF] Add canonicalization pattern for scf::For to eliminate yields ↵Nicolas Vasilache2020-11-043-0/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that just forward. For instance: ``` func @for_yields_3(%lb : index, %ub : index, %step : index) -> (i32, i32, i32) { %a = call @make_i32() : () -> (i32) %b = call @make_i32() : () -> (i32) %r:3 = scf.for %i = %lb to %ub step %step iter_args(%0 = %a, %1 = %a, %2 = %b) -> (i32, i32, i32) { %c = call @make_i32() : () -> (i32) scf.yield %0, %c, %2 : i32, i32, i32 } return %r#0, %r#1, %r#2 : i32, i32, i32 } ``` Canonicalizes as: ``` func @for_yields_3(%arg0: index, %arg1: index, %arg2: index) -> (i32, i32, i32) { %0 = call @make_i32() : () -> i32 %1 = call @make_i32() : () -> i32 %2 = scf.for %arg3 = %arg0 to %arg1 step %arg2 iter_args(%arg4 = %0) -> (i32) { %3 = call @make_i32() : () -> i32 scf.yield %3 : i32 } return %0, %2, %1 : i32, i32, i32 } ``` Differential Revision: https://reviews.llvm.org/D90745
* [DAG] computeKnownBits - Replace ISD::MUL handling with the common ↵Simon Pilgrim2020-11-041-14/+1
| | | | KnownBits::computeForMul implementation
* [libomptarget][nfc] Build amdgcn deviceRTL with nogpulibJon Chesterfield2020-11-041-0/+1
|
* [AMDGPU] Set rsrc1 flags for graphics shadersSebastian Neubauer2020-11-049-98/+168
| | | | | | | Before they were only set for compute kernels and compute shaders but not for other shaders. Differential Revision: https://reviews.llvm.org/D89399
* [AMDGPU] Fix ieee mode default valueSebastian Neubauer2020-11-045-14/+12
| | | | | | | | | | | | | | | | Previously, the default value for ieee mode was - on for compute kernels and compute shaders, - off for all shaders except compute shaders. This commit changes the default to be - on for compute kernels, - off for shaders. This aligns the default value with the settings that are actually in use. To my knowledge, all users of shader calling conventions (mesa and llpc) disable the ieee mode by default. Differential Revision: https://reviews.llvm.org/D89388
* [NFC][UBSAN] Replace "count 0" with FileCheckVitaly Buka2020-11-045-97/+123
| | | | Unrelated system warnings may confuse "check 0"
* [mlir] Fix failing shared libraries buildAndrzej Warzynski2020-11-041-0/+1
| | | | | | Failing buildbot: http://lab.llvm.org:8011/#/builders/33/builds/478 Patch that introduced the breaking change: https://reviews.llvm.org/D90667
* [JITLink][ELF] Omit temporary labels in testsStefan Gränitz2020-11-042-18/+18
| | | | | | | | Oneshot temporary labels for declaring function size can be omitted. Follow-up from D90331. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D90676
* [Clang] Add more fp128 math library function builtinsQiu Chaofan2020-11-044-78/+286
| | | | | | | | | | Since glibc has supported math library functions conforming IEEE 128-bit floating point types on some platform (like ppc64le), we can fix clang's math builtins missing this type. Reviewed By: bkramer Differential Revision: https://reviews.llvm.org/D90593
* [llvm-exegesis][X86] Save and restore eflags.Clement Courbet2020-11-042-0/+12
| | | | | | This is needed to benchmark instruction that touch EFLAGS (e.g. STD: set direction flag). Differential Revision: https://reviews.llvm.org/D90742
* [clangd] Pass parameters to config apply functionsKadir Cetinkaya2020-11-041-6/+9
| | | | | | | | This will enable some fragments to apply their features selectively. Depends on D90270. Differential Revision: https://reviews.llvm.org/D90455
* [lldb] Delete Value::Vector classPavel Labath2020-11-046-149/+8
| | | | | | | | | | | | | | | | This class and it's surroundings contain a lot of shady code, but as far as I can tell all of that code is unreachable (there is no code actually setting the value to eValueTypeVector). According to history this class was introduced in 2012 in r167033/0665a0f09. At that time, the code seemed to serve some purpose, and it had two entry points (in Value::SetContext and ClangExpressionDeclMap::LookupDecl). The first entry point was deleted in D17897 and the second one in r179842/44342735. The stated purpose of the patch introducing this class was to fix TestRegisters.py, and "expr $xmm0" in particular. Both of these things function perfectly well these days without this class.
* [sanitizer] Remove ANDROID_NDK_VERSIONVitaly Buka2020-11-043-5/+0
|
* [llvm-exegesis] Fix unused variable warning.Clement Courbet2020-11-041-0/+2
|
* [ARM] Remove unused variable. NFCDavid Green2020-11-041-1/+0
|
* [sanitizer] Remove -Wno-non-virtual-dtorVitaly Buka2020-11-044-7/+2
| | | | Warning should be fixed with d48f2d7c02743571075bb7812bb4c9e634e51ed1
* Use LLD for Android compiler-rtVy Nguyen2020-11-044-14/+14
| | | | | | Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D90720
* [NFCI] Replace AArch64StackOffset by StackOffset.Sander de Smalen2020-11-0410-373/+184
| | | | | | | | | This patch replaces the AArch64StackOffset class by the generic one defined in TypeSize.h. Reviewed By: david-arm Differential Revision: https://reviews.llvm.org/D88983
* Re-land "[llvm-exegesis] Save target state before running the benchmark."Clement Courbet2020-11-045-2/+63
| | | | | | | The X86 exegesis target is never executed run on non-X86 hosts, disable X86 instrinsic code on non-X86 targets. This reverts commit 8cfc872129a99782ab07a19171bf8eace85589ae.
* [mlir] Add a simpler lowering pattern for WhileOp representing a do-while loopAlex Zinenko2020-11-042-0/+82
| | | | | | | | | | When the "after" region of a WhileOp is merely forwarding its arguments back to the "before" region, i.e. WhileOp is a canonical do-while loop, a simpler CFG subgraph that omits the "after" region with its extra branch operation can be produced. Loop rotation from general "while" to "if { do-while }" is left for a future canonicalization pattern when it becomes necessary. Differential Revision: https://reviews.llvm.org/D90604
* [mlir] Add lowering to CFG for WhileOpAlex Zinenko2020-11-042-4/+226
| | | | | | | | | The lowering is a straightforward inlining of the "before" and "after" regions connected by (conditional) branches. This plugs the WhileOp into the progressive lowering scheme. Future commits may choose to target WhileOp instead of CFG when lowering ForOp. Differential Revision: https://reviews.llvm.org/D90603
* [mlir] Add a generic while/do-while loop to the SCF dialectAlex Zinenko2020-11-047-38/+484
| | | | | | | | | | | | The new construct represents a generic loop with two regions: one executed before the loop condition is verifier and another after that. This construct can be used to express both a "while" loop and a "do-while" loop, depending on where the main payload is located. It is intended as an intermediate abstraction for lowering, which will be added later. This form is relatively easy to target from higher-level abstractions and supports transformations such as loop rotation and LICM. Differential Revision: https://reviews.llvm.org/D90255
* [clangd] Store the containing symbol for refsNathan Ridge2020-11-045-42/+116
| | | | | | This is needed to implement call hierarchy. Differential Revision: https://reviews.llvm.org/D89670
* [Flang][OpenMP] Add semantic checks for OpenMP copyin clause.Praveen G2020-11-048-13/+197
| | | | | | | | | | | | | | Add the semantic checks for the OpenMP 4.5 - 2.15.4.1 copyin clause. Resolve OpenMPThreadprivate directive since the list of items specified in copyin clause should be threadprivate. Test cases : omp-copyin01.f90, omp-copyin02.f90, omp-copyin03.f90, omp-copyin04.f90, omp-copyin05.f90 Reviewed By: kiranchandramohan Differential Revision: https://reviews.llvm.org/D89385
* [DebugInfo] Delete unused DwarfUnit::addConstantFPValue & addConstantValue ↵Fangrui Song2020-11-042-31/+0
| | | | | | overloads. NFC This functions appear to be unused for many years.
* Revert "Re-land "[llvm-exegesis] Save target state before running the ↵Clement Courbet2020-11-045-55/+2
| | | | | | | | benchmark." Still issues on some architectures. This reverts commit fd13d7ce09af2bcad6976b8f5207874992bdd908.
* Re-land "[llvm-exegesis] Save target state before running the benchmark.Clement Courbet2020-11-045-2/+55
| | | | | | | Use `__builtin_ia32_fxsave64` under __GNUC__, (_fxsave64) does not exist in old versions of gcc (pre-9.1). This reverts commit e128f9cafca4e72b089fcd1381af5a1ec656d987.
* [mlir][Python] Return and accept OpView for all functions.Stella Laurenzo2020-11-035-106/+236
| | | | | | | | | | * All functions that return an Operation now return an OpView. * All functions that accept an Operation now accept an _OperationBase, which both Operation and OpView extend and can resolve to the backing Operation. * Moves user-facing instance methods from Operation -> _OperationBase so that both can have the same API. * Concretely, this means that if there are custom op classes defined (i.e. in Python), any iteration or creation will return the appropriate instance (i.e. if you get/create an std.addf, you will get an instance of the mlir.dialects.std.AddFOp class, getting full access to any custom API it exposes). * Refactors all __eq__ methods after realizing the proper way to do this for _OperationBase. Differential Revision: https://reviews.llvm.org/D90584
* Fix linkage error on mlirLogicalResultIsFailure.Stella Laurenzo2020-11-031-2/+2
| | | | | | * For C, this needs to be inline static like the others. Differential Revision: https://reviews.llvm.org/D90740
* Revert "[AggressiveInstCombine] Generalize foldGuardedRotateToFunnelShift to ↵Martin Storsjö2020-11-043-52/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | generic funnel shifts" This reverts commit 59b22e495c15d2830f41381a327f5d6bf49ff416. That commit broke building for ARM and AArch64, reproducible like this: $ cat apedec-reduced.c a; b(e) { int c; unsigned d = f(); c = d >> 32 - e; return c; } g() { int h = i(); if (a) h = h << a | b(a); return h; } $ clang -target aarch64-linux-gnu -w -c -O3 apedec-reduced.c clang: ../lib/Transforms/InstCombine/InstructionCombining.cpp:3656: bool llvm::InstCombinerImpl::run(): Assertion `DT.dominates(BB, UserParent) && "Dominance relation broken?"' failed. Same thing for e.g. an armv7-linux-gnueabihf target.
* Enable -Werror-implicit-function-declaration by default (NFC)Mehdi Amini2020-11-041-0/+4
| | | | | | | This is useful in C source files where it is easy for a typo to be silently assumed by the compiler to be an implicit declaration. Differential Revision: https://reviews.llvm.org/D90727
* Switch the CallbackOstream wrapper in the MLIR C API to an Unbuffered streamMehdi Amini2020-11-045-11/+2
| | | | | | | | | | | This delegate the control of the buffering to the user of the API. This seems like a safer option as messages are immediately propagated to the user, which may lead to less surprising behavior during debugging for instance. In terms of performance, a user can add a buffered stream on the other side of the callback. Differential Revision: https://reviews.llvm.org/D90726
* Add a basic C API for the MLIR PassManager as well as a basic TableGen ↵Mehdi Amini2020-11-0416-4/+472
| | | | | | | | | | | | | | | backend for creating passes This is exposing the basic functionalities (create, nest, addPass, run) of the PassManager through the C API in the new header: `include/mlir-c/Pass.h`. In order to exercise it in the unit-test, a basic TableGen backend is also provided to generate a simple C wrapper around the pass constructor. It is used to expose the libTransforms passes to the C API. Reviewed By: stellaraccident, ftynse Differential Revision: https://reviews.llvm.org/D90667
* Port print-must-be-executed-contexts and print-mustexecute to NPMArthur Eubanks2020-11-036-75/+142
| | | | | | Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D90207
* [RISCV] Add fshl with immediate tests for Zbt extension. NFCCraig Topper2020-11-032-0/+105
| | | | | We should be able to map this to fsri with adjustment of the immediate.
* [StackColoring] Conservatively merge catch point of V for catch(V)Xiang1 Zhang2020-11-042-3/+484
| | | | | | Reviewed By: thanm, clin1 Differential Revision: https://reviews.llvm.org/D86673
* [MachineInstr] Add support for instructions with multiple memory operands.Michael Liao2020-11-039-89/+118
| | | | | | | | | - Basically iterate each pair of memory operands from both instructions and return true if any of them may alias. - The exception are memory instructions without any memory operand. They may touch everything and could alias to any memory instruction. Differential Revision: https://reviews.llvm.org/D89447
* [clangd][NFC] Make Located::operator->() use pointer sematicsNathan James2020-11-041-2/+2
| | | | | | | | | | | | | This enables using the arrow operator to access members of the contained item. ```lang=c++ Located<std::string> X; const char* CStr = X->c_str(); ``` This is inline with how classes like `Optional` handle the arrow operator. Reviewed By: kadircet Differential Revision: https://reviews.llvm.org/D90682
* [NFC] Use [MC]Register in register allocationGaurav Jain2020-11-036-58/+52
| | | | Differential Revision: https://reviews.llvm.org/D90725
* [AArch64][GlobalISel] Add combine for G_EXTRACT_VECTOR_ELT to allow ↵Amara Emerson2020-11-035-2/+337
| | | | | | | | | | selection of pairwise FADD. For the <2 x float> case, instead of adding another combine or legalization to get it into a <4 x float> form, I'm just adding a GISel specific selection pattern to cover it. Differential Revision: https://reviews.llvm.org/D90699
* [MLIR] Check for duplicate entries in attribute dictionary during custom parsingRahul Joshi2020-11-037-18/+73
| | | | | | | | | | | | - Verify that attributes parsed using a custom parser do not have duplicates. - If there are duplicated in the attribute dictionary in the input, they get caught during the dictionary parsing. - This check verifies that there is no duplication between the parsed dictionary and any attributes that might be added by the custom parser (or when the custom parsing code adds duplicate attributes). - Fixes https://bugs.llvm.org/show_bug.cgi?id=48025 Differential Revision: https://reviews.llvm.org/D90502
* [flang] Dodge gcc 8.2.0 build problem (NFC)peter klausler2020-11-031-11/+13
| | | | | | | | Add explicit member initializers to the declarations of some constexpr values added in a recent patch to avoid an apparent problem with gcc 8.2.0 with default initializers. Differential revision: https://reviews.llvm.org/D90696
* [MLIR] Move eraseArguments and eraseResults to FunctionLikemikeurbach2020-11-0311-89/+255
| | | | | | | | | | | | | | | | Previously, they were only defined for `FuncOp`. To support this, `FunctionLike` needs a way to get an updated type from the concrete operation. This adds a new hook for that purpose, called `getTypeWithoutArgsAndResults`. For now, `FunctionLike` continues to assume the type is `FunctionType`, and concrete operations that use another type can hide the `getType`, `setType`, and `getTypeWithoutArgsAndResults` methods. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D90363
* [libc][NFC][Obvious] Use the new macro to declare special constants in tests.Siva Chandra Reddy2020-11-0328-125/+31
|