- Mar 07, 2022
-
-
Mehdi Amini authored
-
Mehdi Amini authored
-
Mehdi Amini authored
-
Mehdi Amini authored
-
Mehdi Amini authored
-
Nikita Popov authored
Only determine the frame layout based on dereferenceable and align attributes, and remove the type-based fallback, which is incompatible with opaque pointers. The dereferenceable attribute is required, while the align attribute uses default alignment of 1 (commonly, align 1 attributes do not get placed, relying on default alignment). The CoroSplit pass producing the resume function adds the necessary attributes in https://github.com/llvm/llvm-project/blob/7daed359111f6d151fef447f520f85ef1dabedf6/llvm/lib/Transforms/Coroutines/CoroSplit.cpp#L840, and their presence is checked in coro-debug.ll at least. Differential Revision: https://reviews.llvm.org/D120988
-
Jan Svoboda authored
This test started failing on Windows after b45888e9 due to path separators not matching up.
-
Simon Atanasyan authored
-
Nikita Popov authored
With opaque pointers, after splitRetconCoroutine() the FramePtr may be an Argument rather than an Instruction. With typed pointers, this currently doesn't happen because the FramePtr would be a bitcast instruction. Fix this by making FramePtr a Value and adding a helper for the "after FramePtr" insertion point, which would be the start of the function in the Argument case. Differential Revision: https://reviews.llvm.org/D120994
-
Jan Svoboda authored
Since D106876, PCM files don't report module maps as input files unless they contributed to the compilation. Reporting only module maps of (transitively) imported modules is not enough, though. For modules marked with `[no_undeclared_includes]`, other module maps affect the compilation by introducing anti-dependencies. This patch makes sure such module maps are being reported as input files. Depends on D120463. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D120464
-
Jan Svoboda authored
This patch simplifies a test that checks only used module map files are reported as input files in PCM files. Instead of using opaque `diff`, this patch uses `clang -module-file-info` and `FileCheck` to verify this. Reviewed By: dexonsmith Differential Revision: https://reviews.llvm.org/D120463
-
David Green authored
When lowering large v16f32->v16i8 fp_to_si_sat, the fp_to_si_sat node is split several times, creating an illegal v4i8 concat that gets expanded into a BUILD_VECTOR. After some combining and other legalisation, it ends up the a buildvector that extracts from 4 vectors, looking like BUILDVECTOR(a0,a1,a2,a3,b0,b1,b2,b3,c0,c1,c2,c3,d0,d1,d2,d3). That is really an v16i32->v16i8 truncate in disguise. This adds a ReconstructTruncateFromBuildVector method to detect the pattern, converting it back into the legal "concat(trunc(concat(trunc(a), trunc(b))), trunc(concat(trunc(c), trunc(d))))" tree. The extracted nodes could also be v4i16, in which case the truncates are not needed. All those truncates and concats then become uzip1's, which is much better than expanding by moving vector lanes around. Differential Revision: https://reviews.llvm.org/D119469
-
Siva Chandra Reddy authored
-
LLVM GN Syncbot authored
-
River Riddle authored
Translation.h is currently awkwardly shoved into the top-level mlir, even though it is specific to the mlir-translate tool. This commit moves it to a new Tools/mlir-translate directory, which is intended for libraries used to implement tools. It also splits the translate registry from the main entry point, to more closely mirror what mlir-opt does. Differential Revision: https://reviews.llvm.org/D121026
-
River Riddle authored
MlirOptMain is currently awkwardly shoved into mlir/Support. This commit moves it to the Tools/ directory, which is intended for libraries used to implement tools. Differential Revision: https://reviews.llvm.org/D121025
-
River Riddle authored
There is no reason for this file to be at the top-level, and its current placement predates the Parser/ folder's existence. Differential Revision: https://reviews.llvm.org/D121024
-
Florian Hahn authored
This patch extends ConstraintElimination to also remove dead variables when removing a constraint. When a constraint is removed because it is out of scope, all new variables added for this constraint can also be removed. This keeps the total size of the systems much smaller, because it reduces the number of variables drastically. It also fixes a bug where variables where removed incorrectly. Fixes https://github.com/llvm/llvm-project/issues/54228
-
Florian Hahn authored
Test for https://github.com/llvm/llvm-project/issues/54228
-
Luo, Yuanke authored
As noticed in D119654, by adding the masked intrinsics results together we can end up with the selects being canonicalized away from the intrinsic - this isn't what we want to test here so replace with a insertvalue chain into a aggregate instead to retain all the results.
-
Simon Moll authored
VectorBuilder wraps around an IRBuilder and VectorBuilder::createVectorInstructions emits VP intrinsics as if they were regular instructions. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D105283
-
Nikita Popov authored
This check is not compatible with opaque pointers. We can avoid it by adjusting the getPointerAlignment() implementation to avoid creating unnecessary ptrtoint expressions for bitcasted pointers. The code already uses OnlyIfReduced to not create an expression if it does not simplify, and this makes sure that folding a bitcast and ptrtoint into a ptrtoint doesn't count as a simplification. Differential Revision: https://reviews.llvm.org/D120904
-
David Green authored
As per the other tests, this switches the run lines back to using the NPM via -passes='print<cost-model>' -cost-kind=throughput 2>&1 -disable-output
-
Nikita Popov authored
SCEV verification should no longer affect results of subsequent queries, and our lit tests as well as llvm-test-suite pass with SCEV verification enabled, so I think we can enable it by default under EXPENSIVE_CHECKS now. Differential Revision: https://reviews.llvm.org/D120708
-
Weining Lu authored
This is a split patch of D120476 and thanks to myhsu. 'Transformed' means the encoding of an immediate is not the same as its binary representation. For example, the `bl` instruction requires a signed 28-bits integer as its operand and the low 2 bits must be 0. So only the upper 26 bits are needed to get encoded into the instruction. Based on the above reason this kind of immediate needs a customed `EncoderMethod` to get the real value getting encoded into the instruction. Currently these immediate includes: ``` uimm2_plus1 simm14_lsl2 simm16_lsl2 simm21_lsl2 simm26_lsl2 ``` This patch adds those `EncoderMethod`s and revises related .mir test in previous patch. Reviewed By: xen0n, MaskRay Differential Revision: https://reviews.llvm.org/D120545
-
Nikita Popov authored
Currently, we hardly ever actually run SCEV verification, even in tests with -verify-scev. This is because the NewPM LPM does not verify SCEV. The reason for this is that SCEV verification can actually change the result of subsequent SCEV queries, which means that you see different transformations depending on whether verification is enabled or not. To allow verification in the LPM, this limits verification to BECounts that have actually been cached. It will not calculate new BECounts. BackedgeTakenInfo::getExact() is still not entirely readonly, it still calls getUMinFromMismatchedTypes(). But I hope that this is not problematic in the same way. (This could be avoided by performing the umin in the other SCEV instance, but this would require duplicating some of the code.) Differential Revision: https://reviews.llvm.org/D120551
-
Adrian Kuegel authored
-
Nikita Popov authored
When a SCEVUnknown gets RAUWd, we currently drop it from the folding set, but don't forget memoized values. I believe we should be treating RAUW the same way as deletion here and invalidate all caches and dependent expressions. I don't have any specific cases where this causes issues right now, but it does address the FIXME in https://reviews.llvm.org/D119488. Differential Revision: https://reviews.llvm.org/D120033
-
Timm Bäder authored
It's almost always entirely unused and if it is used, the end of the attribute range can be used instead. Differential Revision: https://reviews.llvm.org/D120888
-
Christian Sigg authored
Mark `parseSourceFile()` deprecated. The functions will be removed two weeks after landing this change. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D121075
-
Johannes Doerfert authored
We already look through memory to determine where a value that is stored might pop up again (potential copies). This patch introduces the other direction with similar logic. If a value is loaded, we can follow all the accesses to the pointer (or better object) and try to determine what value might have been stored.
-
Johannes Doerfert authored
Both `undef` and `nullptr` are maximally aligned. This is especially important as we often see `undef` until a proper value has been identified during simplification.
-
Johannes Doerfert authored
With D106397 we used CFG reasoning to filter out writes that will not interfere with a given load instruction. With this patch we use the same logic (modulo the reversal in reachability check order) for store instructions. As an example, we can now proof stores to shared memory are dead if all the loads of the shared memory are not reachable from them.
-
Johannes Doerfert authored
To minimize the test difference between old and new PM we perform some local dominance check if no dominator tree is available.
-
Qiu Chaofan authored
Currently in Clang, we have two types of builtins for fnmsub operation: one for float/double vector, they'll be transformed into IR operations; one for float/double scalar, they'll generate corresponding intrinsics. But for the vector version of builtin, the 3 op chain may be recognized as expensive by some passes (like early cse). We need some way to keep the fnmsub form until code generation. This patch introduces ppc.fnmsub.* intrinsic to unify four fnmsub intrinsics. Reviewed By: shchenz Differential Revision: https://reviews.llvm.org/D116015
-
Johannes Doerfert authored
-
Johannes Doerfert authored
Heap-2-stack and heap-2-shared can replace an allocation call with something else. To avoid us deriving information from the allocator implementation we register a simplification callback now that will force us to stop at the call site. We probably should create the replacement memory eagerly and return that instead though.
-
Johannes Doerfert authored
While we can use range information when we derive dereferenceability we must make sure to pick he right end of the range. Before we always went with the minimal offset, which is not correct if we want to combine the base dereferenceability with some offset. In that case it's the maximum that gives the correct result.
-
Johannes Doerfert authored
-
Johannes Doerfert authored
This reverts commit ff50e81b as it broke the buildbots, see https://reviews.llvm.org/D121060#3362737.
-