- Jun 27, 2022
-
-
Matthias Springer authored
This is useful because the result type of an op can sometimes be inferred from its body (e.g., `scf.if`). This will be utilized in subsequent changes. Also introduces a new `getBufferType` interface method on BufferizableOpInterface. This method is useful for computing a bufferized block argument type with respect to OpOperand types of the parent op. Differential Revision: https://reviews.llvm.org/D128420
-
Jolanta Jensen authored
Libraries use this flag to decide whether to use the fma builtin. Author: Paul Walker Differential Revision: https://reviews.llvm.org/D127655
-
Matthias Springer authored
This attribute is currently supported on AllocTensorOp only. Future changes will add support to other ops. Furthermore, the memory space is not propagated properly in all bufferization patterns and some of the core bufferization infrastructure. This will be addressed in a subsequent change. Differential Revision: https://reviews.llvm.org/D128274
-
gbreynoo authored
I discovered that when compared to GNU the llvm-ar MRI script parsing of CREATE could lead to some strange behaviour. This fix improves the error message in the case when no archive name is given and will not allow the adding of members until CREATE is called. Along with this change I added more testing of the CREATE command. Differential Revision: https://reviews.llvm.org/D128055
-
Andrzej Warzynski authored
This patch adds support for most common optimisation compiler flags: `-O{0|1|2|3}`. This is implemented in both the compiler and frontend drivers. At this point, these options are only used to configure the LLVM optimisation pipelines (aka middle-end). LLVM backend or MLIR/FIR optimisations are not supported yet. Previously, the middle-end pass manager was only required when generating LLVM bitcode (i.e. for `flang-new -c -emit-llvm <file>` or `flang-new -fc1 -emit-llvm-bc <file>`). With this change, it becomes required for all frontend actions that are represented as `CodeGenAction` and `CodeGenAction::executeAction` is refactored accordingly (in the spirit of better code re-use). Additionally, the `-fdebug-pass-manager` option is enabled to facilitate testing. This flag can be used to configure the pass manager to print the middle-end passes that are being run. Similar option exists in Clang and the semantics in Flang are identical. This option translates to extra configuration when setting up the pass manager. This is implemented in `CodeGenAction::runOptimizationPipeline`. This patch also adds some bolier plate code to manage code-gen options ("code-gen" refers to generating machine code in LLVM in this context). This was extracted from Clang. In Clang, it simplifies defining code-gen options and enables option marshalling. In Flang, option marshalling is not yet supported (we might do at some point), but being able to auto-generate some code with macros is beneficial. This will become particularly apparent when we start adding more options (at least in Clang, the list of code-gen options is rather long). Differential Revision: https://reviews.llvm.org/D128043 -
Wei Yi Tee authored
This patch introduces `buildAndSubstituteFlowCondition` - given a flow condition token, this function returns the expression of constraints defining the flow condition, with values substituted where specified. As an example: Say we have tokens `FC1`, `FC2`, `FC3`: ``` FlowConditionConstraints: { FC1: C1, FC2: C2, FC3: (FC1 v FC2) ^ C3, } ``` `buildAndSubstituteFlowCondition(FC3, /*Substitutions:*/{{C1 -> C1'}})` returns a value corresponding to `(C1' v C2) ^ C3`. Note: This function returns the flow condition expressed directly as its constraints, which differs to how we currently represent the flow condition as a token bound to a set of constraints and dependencies. Making the representation consistent may be an option to consider in the future. Depends On D128357 Reviewed By: gribozavr2, xazax.hun Differential Revision: https://reviews.llvm.org/D128363 -
Andrzej Warzynski authored
Document changes introduced in https://reviews.llvm.org/D126164. Differential Revision: https://reviews.llvm.org/D128413
-
Wei Yi Tee authored
[clang][dataflow] Move logic for `createStorageLocation` from `DataflowEnvironment` to `DataflowAnalysisContext`. `createStorageLocation` in `DataflowEnvironment` is now a trivial wrapper around the logic in `DataflowAnalysisContext`. Additionally, `getObjectFields` and `getFieldsFromClassHierarchy` (required for the implementation of `createStorageLocation`) are also moved to `DataflowAnalysisContext`. Reviewed By: gribozavr2, sgatev Differential Revision: https://reviews.llvm.org/D128359
-
Siva Chandra Reddy authored
This will be expanded in future as more functions are brought up on arm32.
-
Sven van Haastregt authored
When overload resolution fails, clang emits a note diagnostic for each candidate. For OpenCL builtins this often leads to many repeated note diagnostics with no new information. Stop emitting such notes. Update a test that was relying on counting those notes to check how many builtins are available for certain extension configurations. Differential Revision: https://reviews.llvm.org/D127961
-
Nikita Popov authored
This is checked by the IR verifier, so replace the condition with an assert.
-
Jay Foad authored
Without this, the new test case would fail with: AMDGPUInstPrinter.cpp:545: void llvm::AMDGPUInstPrinter::printImmediate64(uint64_t, const llvm::MCSubtargetInfo &, llvm::raw_ostream &): Assertion `isUInt<32>(Imm) || Imm == 0x3fc45f306dc9c882' failed. Differential Revision: https://reviews.llvm.org/D128435
-
Siva Chandra Reddy authored
It was previously a header library. Making it an object library will allow us to declare thread local variables which can used to setup a thread's self object.
-
Matthias Springer authored
These functions now accep unsigned attributes for address spaces instead of Attributes. Differential Revision: https://reviews.llvm.org/D128275
-
Simon Tatham authored
According to EHABI32 §8.5.2, the PAC for the return address of a function described in an exception table is supposed to be addressed in the _Unwind_VRS_{Get,Set} API by setting regclass=_UVRSC_PSEUDO and regno=0. (The space of 'regno' values is independent for each regclass, and for _UVRSC_PSEUDO, there is only one valid regno so far.) That is indeed what libunwind's _Unwind_VRS_{Get,Set} functions expect to receive. But at two call sites, the wrong values are passed in: regno is being set to UNW_ARM_RA_AUTH_CODE (0x8F) instead of 0, and in one case, regclass is _UVRSC_CORE instead of _UVRSC_PSEUDO. As a result, those calls to _Unwind_VRS_{Get,Set} return _UVRSR_FAILED, which their callers ignore. So if you compile in the AUTG instruction that actually validates the PAC, it will try to validate what's effectively an uninitialised register as an authentication code, and trigger a CPU fault even on correct exception unwinding. Reviewed By: danielkiss ... -
Florian Hahn authored
Use poison instead of undef for SCEVUnkown of unreachable values. This should be in line with the movement to replace undef with poison when possible. Suggested in D114650. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D128586
-
Mikhail Goncharov authored
This reverts commit a57b62de. lldb-aarch64-ubuntu buildbot test fails since https://lab.llvm.org/buildbot/#/builders/96/builds/25128
-
Nikita Popov authored
This pass depends on AAResults. This fixes the ocaml IPO binding tests.
-
Nikita Popov authored
Support for the legacy pass manager in ArgPromotion causes complications in D125485. As the legacy pass manager for middle-end optimizations is unsupported, drop ArgPromotion from the legacy pipeline, rather than introducing additional complexity to deal with it. Differential Revision: https://reviews.llvm.org/D128536
-
Adrian Kuegel authored
-
Chuanqi Xu authored
-
Jacques Pienaar authored
-
Chuanqi Xu authored
This reverts commit 7782e080. According to the discussion of WG21, symmetric transfer is a desired feature.
-
Kazu Hirata authored
This patch replaces x.hasValue() with x where x is contextually convertible to bool.
-
Kazu Hirata authored
This patch replaces x.hasValue() with x where x is contextually convertible to bool.
-
Kazu Hirata authored
This patch replaces x.hasValue() with x where x is contextually convertible to bool.
-
Jacques Pienaar authored
Try to keep the final flip small. Need to flip MemRef as there are many templated cases with it and Tensor.
-
Kazu Hirata authored
This patch replaces x.hasValue() with x where x is contextually convertible to bool.
-
Kazu Hirata authored
This patch replaces Optional::hasValue with the implicit cast to bool in conditionals only.
-
Craig Topper authored
-
Fangrui Song authored
-dc is deprecated in release/14.x. Remove it for 15.0. The only usage I know was FreeBSD crungen which was removed by https://reviews.freebsd.org/D34215 glibc just dropped -Wl,-d today. Keep -d for now.
-
Kazu Hirata authored
This patch replaces x.hasValue() with x.has_value() where x is not contextually convertible to bool.
-
Paul Walker authored
-
Uday Bondhugula authored
Fix doc comment for AliasResult::isNo. NFC. Differential Revision: https://reviews.llvm.org/D128594
-
sstwcw authored
The setLength function checks for the token kind which could be uninitialized in the previous version. The problem was introduced in 2e32ff10. Reviewed By: MyDeveloperDay, owenpan Differential Revision: https://reviews.llvm.org/D128607
-
Craig Topper authored
Some RISC-V builtins requires ICE operands. We should call getIntegerConstantExpr instead of EmitScalarExpr to match other targets. This was made a little trickier by the vector intrinsics not having a valid type string, but there are two that have ICE operands so I specified them manually.
-
Frederic Cambus authored
This was requested in D109244. Differential Revision: https://reviews.llvm.org/D128512
-
owenca authored
Fixes #56043. Differential Revision: https://reviews.llvm.org/D128574
-
Greg Steuck authored
Clang uses runtime libraries for some advanced features like sanitizers. Different systems have different preferences about file placement. OpenBSD with this change will use this name for ASan: /usr/lib/clang/15.0.0/lib/libclang_rt.asan.a Already committed to OpenBSD repository then amended to cover the case of development tree. Differential Revision: https://reviews.llvm.org/D109051
-
Craig Topper authored
SelectBaseAddr was a minor convenience to use since it already' existed for vector load/store. D128187 is going to remove the other uses of SelectBaseAddr so it has less reason to exist. This patch removes the dependency on SelectBaseAddr and adds a new SelectAddrFrameIndex to share some code with SelectFrameAddrRegImm.
-