- Jun 17, 2020
-
-
Nick Desaulniers authored
Summary: llvm::SplitEdge was failing an assertion that the BasicBlock only had one successor (for BasicBlocks terminated by CallBrInst, we typically have multiple successors). It was surprising that the earlier call to SplitCriticalEdge did not handle the critical edge (there was an early return). Removing that triggered another assertion relating to creating a BlockAddress for a BasicBlock that did not (yet) have a parent, which is a simple order of operations issue in llvm::SplitCriticalEdge (a freshly constructed BasicBlock must be inserted into a Function's basic block list to have a parent). Thanks to @nathanchance for the report. Fixes: https://github.com/ClangBuiltLinux/linux/issues/1018 Reviewers: craig.topper, jyknight, void, fhahn, efriedma Reviewed By: efriedma Subscribers: eli.friedman, rnk, efriedma, fhahn, hiraditya, llvm-commits, nathanchance, srhines Tags: #llvm Differential Revision: https://reviews.llvm.org/D81607
-
Davide Italiano authored
When the zext gets promoted, it used to retain the original location, which pessimizes the debugging experience causing an unexpected jump in stepping at -Og. Fixes https://bugs.llvm.org/show_bug.cgi?id=46120 (which also contains a full C repro). Differential Revision: https://reviews.llvm.org/D81437
-
Ian Levesque authored
Summary: Add a flag to omit the xray_fn_idx to cut size overhead and relocations roughly in half at the cost of reduced performance for single function patching. Minor additions to compiler-rt support per-function patching without the index. Reviewers: dberris, MaskRay, johnislarry Subscribers: hiraditya, arphaman, cfe-commits, #sanitizers, llvm-commits Tags: #clang, #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D81995
-
Alexandre Ganea authored
In order to support hot-patching, we need to make sure the first emitted instruction in a function is a two-byte+ op. This is already the case on x86_64, which seems to always emit two-byte+ ops. However on 32-bit targets this wasn't the case. PATCHABLE_OP now lowers to a XCHG AX, AX, (66 90) like MSVC does. However when targetting pentium3 (/arch:SSE) or i386 (/arch:IA32) targets, we generate MOV EDI,EDI (8B FF) like MSVC does. This is for compatiblity reasons with older tools that rely on this two byte pattern. Differential Revision: https://reviews.llvm.org/D81301
-
Alexandre Ganea authored
This is to support https://reviews.llvm.org/D81301.
-
Fangrui Song authored
Test cases are restored from a3bed4bd
-
Michał Górny authored
Skip 'really hidden' options when performing lookup of the nearest option when invalid option was passed. Since these options aren't even documented in --help-hidden, it seems inconsistent to suggest them to users. This fixes clang-tools-extra test failures due to unexpected suggestions when linking the tools to LLVM dylib (that provides more options than the subset of LLVM libraries linked directly). Differential Revision: https://reviews.llvm.org/D82001
-
Scott Linder authored
Summary: CFI emitted during PEI at the beginning of the prologue needs to apply to any inserted waitcnts on function entry. Reviewers: arsenm, t-tye, RamNalamothu Reviewed By: arsenm Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, kerbowa, llvm-commits Tags: #llvm, #debug-info Differential Revision: https://reviews.llvm.org/D76881
-
vnalamot authored
Summary: Future patch needs some of these in multiple places. The definitions of these can't be in the header and be eligible for inlining without making the full declaration of GCNSubtarget visible. I'm not sure what the right trade-off is, but I opted to not bloat SIRegisterInfo.h Reviewers: arsenm, cdevadas Reviewed By: arsenm Subscribers: RamNalamothu, qcolombet, jvesely, wdng, nhaehnle, hiraditya, kerbowa, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D79878
-
sstefan1 authored
Summary: Introduction of OpenMP-specific information cache based on Attributor's `InformationCache`. This should make it easier to share information between them. Reviewers: jdoerfert, JonChesterfield, hamax97, jhuber6, uenoku Subscribers: yaxunl, hiraditya, guansong, uenoku, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D81798
-
Jay Foad authored
-
Simon Pilgrim authored
Move ScalarEvolution::forgetLoopDispositions implementation to ScalarEvolution.cpp to remove the dependency. Add implicit header dependency to source files where necessary.
-
Sjoerd Meijer authored
To set up a tail-predicated loop, we need to to calculate the number of elements processed by the loop. We can now use intrinsic @llvm.get.active.lane.mask() to do this, which is emitted by the vectoriser in D79100. This intrinsic generates a predicate for the masked loads/stores, and consumes the Backedge Taken Count (BTC) as its second argument. We can now use that to reconstruct the loop tripcount, instead of the IR pattern match approach we were using before. Many thanks to Eli Friedman and Sam Parker for all their help with this work. This also adds overflow checks for the different, new expressions that we create: the loop tripcount, and the sub expression that calculates the remaining elements to be processed. For the latter, SCEV is not able to calculate precise enough bounds, so we work around that at the moment, but is not entirely correct yet, it's conservative. The overflow checks can be overruled with a force flag, which is thus potentially unsafe (but not really because the vectoriser is the only place where this intrinsic is emitted at the moment). It's also good to mention that the tail-predication pass is not yet enabled by default. We will follow up to see if we can implement these overflow checks better, either by a change in SCEV or we may want revise the definition of llvm.get.active.lane.mask. Differential Revision: https://reviews.llvm.org/D79175
-
Kirill Naumov authored
This reverts commit 37e06e8f.
-
Kirill Naumov authored
This reverts commit 52b0db22.
-
Kirill Naumov authored
This reverts commit 34fba68d.
-
Kirill Naumov authored
If the GEP instruction contanins only constants as its arguments, then it should be recognized as a constant. For now, there was also added a flag to turn off this simplification if it causes any regressions ("disable-gep-const-evaluation") which is off by default. Once I gather needed data of the effectiveness of this simplification, the flag will be deleted. Reviewers: apilipenko, davidxl, mtrofin Reviewed By: mtrofin Differential Revision: https://reviews.llvm.org/D81026
-
Kirill Naumov authored
This patch enables printing of constants to see which instructions were constant-folded. Needed for tests and better visiual analysis of inliner's work. Reviewers: apilipenko, mtrofin, davidxl, fedor.sergeev Reviewed By: mtrofin Differential Revision: https://reviews.llvm.org/D81024
-
Kirill Naumov authored
This class allows to see the inliner's decisions for better optimization verifications and tests. To use, use flag "-passes="print<inline-cost>"". Reviewers: apilipenko, mtrofin, davidxl, fedor.sergeev Reviewed By: mtrofin Differential revision: https://reviews.llvm.org/D81743
-
Benjamin Kramer authored
-
Sjoerd Meijer authored
"error: 'get' is deprecated: The base class version of get with the scalable argument defaulted to false is deprecated." Changed VectorType::get() -> FixedVectorType::get().
-
Sjoerd Meijer authored
Fixed ARM regression test. Please see the original commit message rG47650451738c for details.
-
David Green authored
In more complicated loops we can easily hit the complexity limits of loop strength reduction. If we do and filtering occurs, it's all too easy to remove the wrong formulae for post-inc preferring accesses due to it attempting to maximise register re-use. The patch adds an alternative filtering step when the target is preferring postinc to pick postinc formulae instead, hopefully lowering the complexity to below the limit so that aggressive filtering is not needed. There is also a change in here to stop considering existing addrecs as free under postinc. We should already be modelling them as a reg so don't want it to cause us to get the cost wrong. (I'm not sure that code makes sense in general, but there are X86 tests specifically for it where it seems to be helping so have left it around for the standard non-post-inc case). Differential Revision: https://reviews.llvm.org/D80273
-
Carl Ritson authored
Spills of VCC (SGPR64) will fail with new SGPR spill code, because super register is not correctly resolved. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D81224
-
Benjamin Kramer authored
No need to have std::string here. NFC.
-
Sam Parker authored
I originally reverted the patch because it was causing performance issues, but now I think it's just enabling simplify-cfg to do something that I don't want instead :) Sorry for the noise. This reverts commit 3e39760f.
-
Paul Walker authored
Subscribers: arichardson, hiraditya, thopre, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80915
-
Hans Wennborg authored
The invoke instruction can have profile metadata with branch_weights, which does not make sense for a call instruction and will be rejected by the verifier. Differential revision: https://reviews.llvm.org/D81996
-
serge-sans-paille authored
Introduce an helper class to aggregate the cleanup in case of rollback. Differential Revision: https://reviews.llvm.org/D81230
-
Sjoerd Meijer authored
This reverts commit 47650451 while I investigate the build bot failures.
-
Max Kazantsev authored
-
Florian Hahn authored
Reviewers: efriedma, davide Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D81755
-
Sjoerd Meijer authored
This emits new IR intrinsic @llvm.get.active.mask for tail-folded vectorised loops if the intrinsic is supported by the backend, which is checked by querying TargetTransform hook emitGetActiveLaneMask. This intrinsic creates a mask representing active and inactive vector lanes, which is used by the masked load/store instructions that are created for tail-folded loops. The semantics of @llvm.get.active.mask are described here in LangRef: https://llvm.org/docs/LangRef.html#llvm-get-active-lane-mask-intrinsics This intrinsic is also used to provide a hint to the backend. That is, the second argument of the intrinsic represents the back-edge taken count of the loop. For MVE, for example, we use that to set up tail-predication, which is a new form of predication in MVE for vector loops that implicitely predicates the last vector loop iteration by implicitely setting active/inactive lanes, i.e. the tail loop is predicated. In order to set up a tail-predicated vector loop, we need to know the number of data elements processed by the vector loop, which corresponds the the tripcount of the scalar loop, which we can now reconstruct using @llvm.get.active.mask. Differential Revision: https://reviews.llvm.org/D79100
-
Sjoerd Meijer authored
Refactor TTI hook emitGetActiveLaneMask and remove the unused arguments as suggested in D79100.
-
Kirill Bobyrev authored
Improvement of the following revision: bbc629eb This might still be problematic if freq = 0, so it's better to check for that.
-
Kirill Bobyrev authored
llvm::getHeatColor becomes a problem when maxFreq = 0 -> freq = 0 => log2(double(freq)) / log2(maxFreq) -> log2(0.) / log2(0.) which results in illegal instruction on some architectures. Problematic revision: https://reviews.llvm.org/D77172
-
Florian Hahn authored
Currently load instructions are added to the cache for invariant pointer group dependencies, but only pointer values are removed currently. That leads to dangling AssertingVHs in the test case below, where we delete a load from an invariant pointer group. We should also remove the entries from the cache. Fixes PR46054. Reviewers: efriedma, hfinkel, asbirlea Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D81726
-
James Henderson authored
This is a natural extension of the previous changes to use the Cursor class independently in the standard and extended opcode paths, and in turn allows delaying error handling until the entire line has been printed in verbose mode, removing interleaved output in some cases. Reviewed by: MaskRay, JDevlieghere Differential Revision: https://reviews.llvm.org/D81562
-
Vitaly Buka authored
Summary: Depends on D81831. Reviewers: eugenis, pcc Reviewed By: eugenis Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D81832
-
Vitaly Buka authored
Summary: This code is going to be used in StackSafety. This patch is file move with minimal changes. Identifiers will be fixed in the followup patch. Reviewers: eugenis, pcc Reviewed By: eugenis Subscribers: mgorny, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D81831
-