- Jul 18, 2023
-
-
Nikita Popov authored
Change the assertion to check the value type instead of the pointee type. To facilitate this, store GlobalVariable* instead of Constant* in the map.
-
Kiran Chandramohan authored
Add a new FirOpBuilder constructor to propagate the fast math flag from an operation. Use this constructor in the LowerHLFIRIntrinsics pass. This fixes the performance issue with the hlfir intrinsics flow for polyhedron/test_fpu2. Reviewed By: tblah, vzakhari Differential Revision: https://reviews.llvm.org/D155438
-
Kiran Chandramohan authored
If the size of one of the operand arrays is not known at compile time, do not issue a size mismatch error sinc they could match at runtime. Fixes the compilation error in polyhedron/induct2. Reviewed By: tblah, vzakhari Differential Revision: https://reviews.llvm.org/D155302
-
Nikita Popov authored
-
ManuelJBrito authored
Currently we just bypass singleton phis, however we know that in order to create the phi of ops all phis must be in the same block. Therefore if one phi is a singleton then the rest are as well. Differential Revision: https://reviews.llvm.org/D155478
-
Nikita Popov authored
Some of the test expectation were incorrectly changed in 23c21759. Regenerate the tests.
-
Nikita Popov authored
-
dingfei authored
Without targets registered gives: "error: MS-style inline assembly is not available: Unable to find target for this triple (no targets are registered)" Differential Revision: https://reviews.llvm.org/D154983
-
dingfei authored
Fields are imported first and reordered for correct layout. For partially imported record, layout computation is incorrect. Differential Revision: https://reviews.llvm.org/D154764
-
Nikita Popov authored
-
Nuno Lopes authored
These values don't propagate to the output; they are always replaced with a subsequent shuffle or insertelement. Tested equivalence with Alive2, e.g., https://alive2.llvm.org/ce/z/fj4s78.
-
Weining Lu authored
And change 'using namespace llvm::LoongArch' to 'namespace LoongArch {' to simplify the code a little bit. -
Weining Lu authored
-
Cullen Rhodes authored
This patch adds a pass '-allocate-sme-tiles' to the ArmSME dialect that implements allocation of SME ZA tiles. It does this at the 'func.func' op level by replacing 'arm_sme.get_tile_id' ops with 'arith.constant' ops that represent the tile number. The tiles in use in a given function are tracked by an integer function attribute 'arm_sme.tiles_in_use' that is a 16-bit tile mask with a bit for each 128-bit element tile (ZA0.Q-ZA15.Q), the smallest ZA tile granule. This is initialized on the first 'arm_sme.get_tile_id' rewrite and updated on each subsequent rewrite. Mixing of different element tile types is supported. Section B2.3.2 of the SME spec [1] describes how the 128-bit element tiles overlap with other element tiles. Depends on D154941 [1] https://developer.arm.com/documentation/ddi0616/aa Reviewed By: awarzynski Differential Revision: https://reviews.llvm.org/D154955
-
Nikita Popov authored
A similar assumption as for the x^x case also existed for the absorber case, which lead to a stage2 miscompile. That assumption is not fixed. ----- Support replacement of operands not only in the immediate instruction, but also instructions it uses. To the most part, this extension is straightforward, but there are two bits worth highlighting: First, we can now no longer assume that if the Op is a vector, the instruction also returns a vector. If Op is a vector and the instruction returns a scalar, we should consider it as a cross-lane operation. Second, for the x ^ x special case and the absorber special case, we can no longer assume that one of the operands is RepOp, as we might have a replacement higher up the instruction chain. There is one optimization regression, but it is in a fuzzer-generated test case. Fixes https://github.com/llvm/llvm-project/issues/63104.
-
dingfei authored
CXXMethodDecl::isVirtual() count the number of overridden methods. This assertion is not true before overridden methods are fully loaded. The body of this CXXMethodDecl can introduce deps on a derived class which contains a method overriding this method, causing the assertion failure. ImportOverriddenMethods() is moved before body loading to fix this issue. Testcase is contributed by Balázs Kéri (balazske) Differential Revision: https://reviews.llvm.org/D154701
-
Jens Massberg authored
Concepts aren't fully supporteb by hover yet. For the currently supported case we add a test here to prevent regressions in the future. Differential Revision: https://reviews.llvm.org/D155558
-
Pavel Labath authored
Add it to lit.local.cfg so that it's actually run, and change it to (properly) use the %clang_host substitution.
-
Nikita Popov authored
-
Andrzej Warzynski authored
At the moment, the lowering from the Vector dialect to SME looks like this: * Vector --> SME LLVM IR intrinsics This patch introduces a new lowering layer between the Vector dialect and the Arm SME extension: * Vector --> ArmSME dialect (custom Ops) --> SME LLVM IR intrinsics. This is motivated by 2 considerations: 1. Storing `ZA` to memory (e.g. `vector.transfer_write`) requires an `scf.for` loop over all rows of `ZA`. Similar logic will apply to "load to ZA from memory". This is a rather complex transformation and a custom Op seems justified. 2. As discussed in [1], we need to prevent the LLVM type converter from having to convert types unsupported in LLVM, e.g. `vector<[16]x[16]xi8>`. A dedicated abstraction layer with custom Ops opens a path to some fine tuning (e.g. custom type converters) that will allow us to avoid this. To facilitate this change, two new custom SME Op are introduced: * `TileStoreOp`, an...
-
WANG Xuerui authored
The recent D154183 and D154195 have introduced a simpler way to specify instruction mnemonics: by leveraging TableGen's `NAME` and string processing features, the mnemonics can be automatically derived from the respective TableGen record names. LoongArch instructions don't have "strange" characters in their names, so this approach can be applied to all the other instructions. A `deriveInsnMnemonic` helper class, modeled after the LSX/LASX mnemonic derivation logic, has been added, and all non-pseudo instruction formats are converted to use it, losing their `opstr/opcstr` arguments in the process. There are minor differences that are worth mentioning though: * The atomic instructions with implicit data barriers have an underscore (`_`) in their mnemonics, that will get converted to a period (`.`) if not specially handled. Double-underscore (`__`) in record names are converted to a single underscore in the resulting mnemonic; the definitions are tweaked accordingly. * Various duplicated FP instructions need special handling, mainly because of the need to handle both FPR32 and FPR64 classes for a single hardware instruction. The substrings `_xS`, `_xD` and `_64` are additionally dropped before deriving FP instructions' mnemonics. All of these are pure refactoring, no functional change. Reviewed By: SixWeining Differential Revision: https://reviews.llvm.org/D154916
-
Cullen Rhodes authored
This patch adds three new custom ops to the ArmSME dialect: * arm_sme.get_tile_id - returns a scalar integer representing an SME "virtual tile" that is not in use. * arm_sme.cast_tile_to_vector - casts from a tile id to a 2-d scalable vector type, which represents an SME "virtual tile". * arm_sme.cast_vector_to_tile - casts from a 2-d scalable vector type, which represents an SME "virtual tile", to a tile id. The 'arm_sme.get_tile_id' op currently only supports tile 0, a follow-up patch will implement proper tile allocation. A further follow-up patch will demonstrate load/store to/from ZA using these ops. See the op descriptions for further details and examples. Thanks to @paulwalker-arm and @awarzynski for helping drive this. Reviewed By: awarzynski, dcaballe Differential Revision: https://reviews.llvm.org/D154941 -
Martin Erhart authored
The dealloc operation deallocates each of the given memrefs if there is no alias to that memref in the list of retained memrefs and the corresponding condition value is set. This condition can be used to indicate and pass on ownership of memref values (or in other words, the responsibility of deallocating that memref). If two memrefs alias each other, only one will be deallocated to avoid double free situations. The memrefs to be deallocated must be the originally allocated memrefs, however, the memrefs to be retained may be arbitrary memrefs. Returns a list of conditions corresponding to the list of memrefs which indicates the new ownerships, i.e., if the memref was deallocated the ownership was dropped (set to 'false') and otherwise will be the same as the input condition. Differential Revision: https://reviews.llvm.org/D155467
-
Balázs Kéri authored
Success or failure messages are now shown at all checked functions, if the call (return value) is interesting. Additionally new functions are added: open, openat, socket, shutdown Reviewed By: donat.nagy Differential Revision: https://reviews.llvm.org/D154423
-
Balázs Kéri authored
The note tag that was previously added in all cases when a standard function call is found is displayed now only if the function call (return value) is "interesting". This results in less unneeded notes but some of the previously good notes disappear too. This is because interestingness is not always set as it should be. Reviewed By: donat.nagy Differential Revision: https://reviews.llvm.org/D153776
-
Balázs Kéri authored
Change 1: ErrnoChecker notes show only messages related to errno, not to assumption of success or failure of functions. Change 2: StdLibraryFunctionsChecker adds its own note about success or failure of functions, and the errno related note, independently. Change 3: Every modeled function in StdLibraryFunctionsChecker should have a note tag message in all "cases". This is not implemented yet, only for file (stream) related functions. Reviewed By: donat.nagy Differential Revision: https://reviews.llvm.org/D153612
-
David Green authored
See D155311
-
Fangrui Song authored
"system-linker-elf" and "demangler" have been unused since lld/test/old-elf/ was removed in 2016.
-
LiaoChunyu authored
[RISCV] Lower VP_CTLZ_ZERO_UNDEF/VP_CTTZ_ZERO_UNDEF/VP_CTLZ by converting to FP and extracting the exponent. D111904, D141585 made RISC-V customized lower vector ISD::CTLZ_ZERO_UNDEF/CTTZ_ZERO_UNDEF/CTLZ by converting to float and using the float result. Perhaps VP_CTLZ_ZERO_UNDEF/VP_CTTZ_ZERO_UNDEF/VP_CTLZ could use the similar feature. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D155150
-
Mikhail Goncharov authored
-
Balazs Benics authored
It turns out the SFINAE constraint breaks building MLIR using GCC-7, which is an outdated, but supported compiler by llvm-project. I tried to find a solution for fixing it, but I decided to cut branches and just simply remove the SFINAE constraint until we drop GCC-7. It was originally introduced by D152891. Allegedly, GCC-8 and above builds just fine. I tested GCC 8.4.0, and GCC 7.5.0, and now builds fine on both. Differential Revision: https://reviews.llvm.org/D155441 Fixes https://github.com/llvm/llvm-project/issues/63843
-
Amir Bishara authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D154940
-
Andrzej Warzynski authored
This patch updates one SparseTensor integration test so that the VLA vectorisation is run conditionally based on the value of the MLIR_RUN_ARM_SME_TESTS CMake variable. This change opens the path to reduce the duplication of RUN lines in "mlir/test/Integration/Dialect/SparseTensor/CPU/". ATM, there are usually 2 RUN lines to test vectorization in SparseTensor integration tests: * one for VLS vectorisation, * one for VLA vectorisation whenever that's available and which reduces to VLS vectorisation when VLA is not supported. When VLA is not available, VLS vectorisation is verified twice. This duplication should be avoided - integration test are relatively expansive to run. This patch makes sure that the 2nd vectorisation RUN line becomes: ``` if (SVE integration tests are enabled) run VLA vectorisation else return ``` This logic is implemented using LIT's (relatively new) conditional substitution [1]. It enables us to guarantee that all RUN lines are unique and that the VLA vectorisation is only enabled when supported. This patch updates only 1 test to set-up and to demonstrate the logic. Subsequent patches will update the remaining tests. [1] https://www.llvm.org/docs/TestingGuide.html Differential Revision: https://reviews.llvm.org/D155403 -
Tomasz Kamiński authored
We now properly bind return value of the trivial copy constructor and assignments of the empty objects. Such operations do not perform any loads from the source, however they preserve identity of the assigned object: ``` Empty e; auto& x = (e = Empty()); clang_analyzer_dump(x); // &e, was Unknown ``` Reviewed By: xazax.hun Differential Revision: https://reviews.llvm.org/D155442
-
Sameer Sahasrabuddhe authored
- update comments to reflect actual state - use (implicitly inline) constexpr for a const static member
-
Itay Bookstein authored
Surrounding methods are const, seems to be an oversight. Signed-off-by:
Itay Bookstein <itay.bookstein@nextsilicon.com> Reviewed By: bogner Differential Revision: https://reviews.llvm.org/D155505
-
Johannes Doerfert authored
-
tomasz-kaminski-sonarsource authored
This patch reworks generation for the `CFGScopeBegin`, `CFGScopeEnd`, and `CFGLiftimeEnd`, in a way that they are now compatible with each other and `CFGAutomaticObjDtor`. All of the above elements are now generated by a single code path, that conditionally inserts elements if they are requested. In addition, the handling of `goto` statements is improved. The `goto` statement may leave multiple scopes (and trigger destruction and lifetime end for the affected variables) and enter multiple scopes, for example: ```lang=C++ { int s1; { int s2; goto label; // leaves s1, s2, and enters t1 t1 } } { int t1; { int t2; label: } } ``` This is performed by first determining the shared parent scope of the source and destination. And then emitting elements for exiting each scope between the source and the parent, and entering each scope between the parent and destination. All such elements are appended to the source block, as one label may be reached from multiple scopes. Finally, the approach for handling backward jumps is changed. When connecting a source block to a destination block that requires the insertion of additional elements, we put this element into a new block, which is then linked between the source and the destination block. For example: ```lang=C++ { int t; label: // Destination block referred to as 'DB' } { // Source block referred to as 'SB' Obj s; goto label; } ``` The jump between `SB` with terminator `T: goto` and `DB` should be coupled with the following CFG elements: ``` CFGAutomaticObjDtor(s) CFGLifetimeEnd(s) CFGScopeEnd(s) CFGScopeBegin(t) ``` To handle such situations, we create a new link (`LB`) that is linked as the predecessor of `DB`, to which we transfer the terminator (`goto` statement) of `SB`. Then `LB` is handled in the same manner as the source block in the case of forward jumps. This produces CFG that looks like this: ``` SB -> LB (T: goto) -> DB ``` Finally, the resulting block is linked as the successor of `SB`. Such an approach uses existing handling of the `noreturn` destructors. As a reminder, for each destructor of an automatic object that is marked as `noreturn`, a new `noreturn` block (marked `NBn`) is created, at the destructor is inserted at the end of it. To illustrate, given two `noreturn` destructors, we will have: ``` SB -> NB1 (noreturn) NB2 (noreturn) LB (T:goto) -> DB ``` Reviewed By: ymandel, steakhal Differential Revision: https://reviews.llvm.org/D153273 -
Fangrui Song authored
ArgumentParser expands @ (fromfile_prefix_chars) by default, so the expansion code path is unused.
-
Charlie Barto authored
Intercept `_strdup` on windows, instead of the nonexistent `strdup`.
-