- Feb 14, 2023
-
-
Tom Eccles authored
Some functions (e.g. the main function) end with a call to the STOP statement instead of a func.return. This is lowered as a call to the stop runtime function followed by a fir.unreachable. fir.unreachable is a terminator and so this can cause functions to have no func.return. The stack arrays pass looks to see which heap allocations have always been freed by the time a function returns. Without any returns, the pass does not detect any freed allocations. This patch changes this behaviour so that fir.unreachable is checked as well as func.return. This allows 15 heap allocations for array temporaries in spec2017 exchange2's main function to be moved to the stack. Differential Revision: https://reviews.llvm.org/D143918
-
Tom Eccles authored
MLIR loads dialects lazily so if a hlfir type (or operation) is found before any fir type (or operation), the fir dialect will not have been loaded when the hlfir thing is verified. Verification of some hlfir operations does depend on fir types (e.g. hlfir.sum needs fir::SequenceType). Tablegen change recommended by jeanPerier Differential Revision: https://reviews.llvm.org/D143930
-
Guillaume Chatelet authored
-
Anton Sidorenko authored
Make forward declaration possible to reduce amount of dependencies and reduce re-compilation burden caused by further patches. Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D140539
-
Markus Böck authored
These are otherwise rendered and formatted as raw text on the website, making them completely unreadable
-
Jean Perier authored
Builder/HLFIRTools.h is not needed and is causing build issues in some shared library builds because it belongs to another library that depends on libHLFIRDialect (so libHLFIRDialect should not depend on it). Differential Revision: https://reviews.llvm.org/D143994
-
Leandro Lupori authored
Fix USE rename when use-name and local-name are the same. Previously, the associated symbol was being removed from scope. Operator rename implementation needed no change, because, as it doesn't call AddUseRename(), symbol erasure is skipped. Fixes #60223 Reviewed By: klausler Differential Revision: https://reviews.llvm.org/D143933
-
Max Kazantsev authored
Underlying bug (taking a branch from inner loop as candidate) is now fixed. We can return it.
-
Max Kazantsev authored
The transform and all related updates don't expect the situation when candidate is from an inner loop. I think we *might* still do something in this case, but the current implementation doesn't expect this and does incorrect loop info updates in this situation. Details: https://github.com/llvm/llvm-project/issues/60736
-
Matt Arsenault authored
Requiring a bitcast to exist was unhelpful. The most basic cases are always going to be a CopyFromReg or load, so they would need a new cast inserted. Don't require a bitcast if it's a free operation. I don't think this logic makes particularly much sense (it seems to be imparting special interpretation of bitcast), but this needs to be in sync with foldSignChangeInBitcast. We should also get rid of this hasBitPreservingFPLogic hook. fabs/fneg are bitpreserving or incorrectly implemented, so this should just be a regular legality check.
-
Max Kazantsev authored
This was done by reviewer's request, but in fact without them we skip very nasty bugs. Unless it is a REAL problem, I'd keep them in default setup.
-
David Spickett authored
This fixes the combination of two things: * Placing a BTI after calls to a returns twice function like setjmp. This allows the setjmp to return with a br instead of a ret. * Straight line speculation mitigations that replace BLR with a BL to a thunk that does the mitigation, and then goes to the original target. Originally I marked AArch64call_bti as requiring that SLS mitigation be disabled. This caused a crash when you tried to codegen with both. Since CALL_BTI tried to match with AArch64call_bti but could not. This change does 2 things: * Follow the pattern set by AArch64call and add 2 patterns for AArch64call_bti. One with no IP (interprocedural) registers, and one with. For SLS mitigation on and off respectively. * Modify the sls hardening pass to iterate through bundled instructions, as the AArch64 KCFI pass does. Since there is a 1:1 replacement of the BLR with a BL, the bundle remains intact. This is checked with an MIR test. The ir -> asm testing is updated to add runs with the sls mitigation enabled. Reviewed By: kristof.beyls, pzheng Differential Revision: https://reviews.llvm.org/D143915
-
Max Kazantsev authored
Details at https://github.com/llvm/llvm-project/issues/60736
-
Max Kazantsev authored
[SimpleLoopUnswitch] Temorarily switch off simple-loop-unswitch-inject-invariant-conditions. PR60736 It caused an assertion failure, not sure induced or introduced. Disabling to investigate it. See details at https://github.com/llvm/llvm-project/issues/60736
-
Alex Zinenko authored
When the translation was written, `vector<... x index>` was not allowed at all. After it was added later, the translation was never adapted. It kept working in the most common case of index-typed attributes using 64-bit storage and being converted to 64-bit integers in LLVM IR, but not in the other cases that require truncation or extension, producing wrong results when using the raw data storage of the dense attrbute to construct the LLVM IR constant. When the storage size doesn't match, fall back to the per-element constant construction, which is slower but handles bitwidth differences correctly. Fixes #60614. Reviewed By: gysit Differential Revision: https://reviews.llvm.org/D143993
-
Sacha Ballantyne authored
When rank > 1, the inital value would be lost on inner loops, leading to the wrong value to be returned, e.g. This would return T. This patch fixes this to use the correct inital value for all cases. ``` Integer :: m(0,10) Any(m .eq 0) ``` Reviewed By: vdonaldson Differential Revision: https://reviews.llvm.org/D143899 -
KAWASHIMA Takahiro authored
-
KAWASHIMA Takahiro authored
reST requires an empty line before a bullet list.
-
Alex Zinenko authored
Make available through functions in the `linalg::detail` namespace the classification of Linalg op dimensions as different kinds (batch, image, channel, etc) of convolution dimensions. This is useful for identifying which dimensions to target with transformations. Reviewed By: chelini Differential Revision: https://reviews.llvm.org/D143584
-
Alex Zinenko authored
Previous changes in 98acd746 were overly eager to disallow null payload everywhere. The semantics of TransformEachOpTrait allows individual applications to return null payloads as means of filtering out the operations to which they are not applicable without emitting even a silenceable failure. This is a questionable choice, but one apparently relied upon. Null payloads are not supposed to leak outside of the trait. Reviewed By: qcolombet Differential Revision: https://reviews.llvm.org/D143904
-
Kazu Hirata authored
-
Christian Ulmann authored
This commit removes an old helper class for fastmath attribute conversion that is no longer used. The last usage of this class was dropped in https://reviews.llvm.org/D137456. Reviewed By: gysit Differential Revision: https://reviews.llvm.org/D143912
-
Haojian Wu authored
By special-casing them at the moment. The tooling stdlib lib doesn't support these symbols (most important one is std::move). Differential Revision: https://reviews.llvm.org/D143906
-
Chuanqi Xu authored
Close https://github.com/llvm/llvm-project/issues/60693. In this issue, we can find that the importer will try to generate the template specialization again in the importer, which is not good and wastes time. This patch tries to address the problem.
-
Kadir Cetinkaya authored
-
Ben Shi authored
In avr-gcc, the destination of "rjmp label + offset" is address 'label + offset', while destination of "rjmp . + offset" is 'address_of_rjmp + offset + 2'. Clang is in accordance with avr-gcc for "rjmp label + offset", but emits incorrect destination of "rjmp . + offset" to 'address_of_rjmp + offset', in which the expected offset 2 is missing. This patch fixes the above issue. Fixes https://github.com/llvm/llvm-project/issues/60019 Reviewed By: jacquesguan, aykevl Differential Revision: https://reviews.llvm.org/D143901
-
Fangrui Song authored
-
Matt Arsenault authored
-
Matt Arsenault authored
-
Matt Arsenault authored
-
Matt Arsenault authored
With the current state of mir support, this is going to generate a large number of verifier errors. Running the use and def reductions first helps to mitigate the impact of this.
-
pvanhout authored
While working on D143731 I hit a case where a build_vector with 2 undef operands could be generated (with one undef hidden behind a bitcast). That made `reduceBuildVecTruncToBitCast` crash because it seems to assume there is at least one good operand. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D143886
-
Nikita Popov authored
Adjust the wording added in D78952 to say that global variable declarations (and interposable definitions) do imply a minimum size (and alignment) on the global. They just don't imply a maximum size. We rely on these semantics in at least two places: * Global dereferenceability: https://github.com/llvm/llvm-project/blob/2153544865a9733b06579823814c981f735e4201/llvm/lib/IR/Value.cpp#L907 * Global inbounds GEP: https://github.com/llvm/llvm-project/blob/2153544865a9733b06579823814c981f735e4201/llvm/lib/IR/ConstantFold.cpp#L2283 Differential Revision: https://reviews.llvm.org/D143057
-
Chuanqi Xu authored
Currently we will run two optimization (rematerialization and sink lifetime markers) unconditionally even if the coroutine is marked as optnone (O0). This looks not good. This patch disables these 2 optimizations for optnone functions. An internal change shows the change improve the compilation time for 3% in the debug build.
-
Tobias Gysi authored
Reintroduce string based attribute setting in the translation from LLVM dialect to LLVM IR. The TypeSwitch based implementation introduced in https://reviews.llvm.org/D143654 does not work for intrinsics that set the requiresAccessGroup or requiresAliasScope flag. Reviewed By: hgreving Differential Revision: https://reviews.llvm.org/D143936
-
Tulio Magno Quites Machado Filho authored
Ensure the tests do not fail during cross compilation by specifying the dynamic loader prefix for a GNU installation that is expected to support IEEE 128-bit long double. Reviewed By: qiucf Differential Revision: https://reviews.llvm.org/D143736
-
Fangrui Song authored
-
Chuanqi Xu authored
The patches for `clang-scan-deps` have been landed. And we need to document the behavior then.
-
Vadim Paretsky (Intel Americas Inc) authored
Differential Revision: https://reviews.llvm.org/D143940
-
Kazu Hirata authored
-