- Jun 12, 2020
-
-
Alina Sbirlea authored
Verify after completing all updates. Resolves PR46275.
-
- Jun 11, 2020
-
-
Jay Foad authored
Change BasicBlock::removePredecessor to optionally return a vector of instructions which might be dead. Use this in ConstantFoldTerminator to delete them if they are dead. Reapply with a bug fix: don't drop the "!KeepOneInputPHIs" argument when removePredecessor calls PHINode::removeIncomingValue. Differential Revision: https://reviews.llvm.org/D80206
-
Jay Foad authored
Change BasicBlock::removePredecessor to optionally return a vector of instructions which might be dead. Use this in ConstantFoldTerminator to delete them if they are dead. Differential Revision: https://reviews.llvm.org/D80206
-
Chris Jackson authored
- Simplify the salvaging interface and the algorithm in InstCombine Reviewers: vsk, aprantl, Orlando, jmorse, TWeaver Reviewed by: Orlando Differential Revision: https://reviews.llvm.org/D79863
-
- Jun 10, 2020
-
-
serge-sans-paille authored
Interestingly, this leads to better output in one of the test case. Differential Revision: https://reviews.llvm.org/D81237
-
Marco Elver authored
[ v1 was reverted by c6ec352a due to modpost failing; v2 fixes this. More info: https://github.com/ClangBuiltLinux/linux/issues/1045#issuecomment-640381783 ] This makes -fsanitize=kernel-address emit the correct globals constructors for the kernel. We had to do the following: * Disable generation of constructors that rely on linker features such as dead-global elimination. * Only instrument globals *not* in explicit sections. The kernel uses sections for special globals, which we should not touch. * Do not instrument globals that are prefixed with "__" nor that are aliased by a symbol that is prefixed with "__". For example, modpost relies on specially named aliases to find globals and checks their contents. Unfortunately modpost relies on size stored as ELF debug info and any padding of globals currently causes the debug info to cause size reported to be *with* redzone which throws modpost off. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203493 Tested: * With 'clang/test/CodeGen/asan-globals.cpp'. * With test_kasan.ko, we can see: BUG: KASAN: global-out-of-bounds in kasan_global_oob+0xb3/0xba [test_kasan] * allyesconfig, allmodconfig (x86_64) Reviewed By: glider Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D81390
-
- Jun 08, 2020
-
-
Hans Wennborg authored
It's not allowed by the verifier. Differential revision: https://reviews.llvm.org/D81409
-
Chris Jackson authored
- Now all SalvageDebugInfo() calls will mark undef if the salvage attempt fails. Reviewed by: vsk, Orlando Differential Revision: https://reviews.llvm.org/D78369
-
Hiroshi Yamauchi authored
Summary: Following up D78949. Reviewers: davidxl Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D81020
-
Marco Elver authored
This reverts commit 866ee235. Building the kernel results in modpost failures due to modpost relying on debug info and inspecting kernel modules' globals: https://github.com/ClangBuiltLinux/linux/issues/1045#issuecomment-640381783
-
- Jun 07, 2020
-
-
Benjamin Kramer authored
The latter is more readable and more efficient. While there clean up some double lookups. NFCI.
-
- Jun 06, 2020
-
-
Simon Pilgrim authored
Move implicit include dependencies down to source files.
-
Simon Pilgrim authored
Move implicit include dependencies down to header/source files.
-
- Jun 05, 2020
-
-
Marco Elver authored
Summary: This makes -fsanitize=kernel-address emit the correct globals constructors for the kernel. We had to do the following: - Disable generation of constructors that rely on linker features such as dead-global elimination. - Only emit constructors for globals *not* in explicit sections. The kernel uses sections for special globals, which we should not touch. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=203493 Tested: 1. With 'clang/test/CodeGen/asan-globals.cpp'. 2. With test_kasan.ko, we can see: BUG: KASAN: global-out-of-bounds in kasan_global_oob+0xb3/0xba [test_kasan] Reviewers: glider, andreyknvl Reviewed By: glider Subscribers: cfe-commits, nickdesaulniers, hiraditya, llvm-commits Tags: #llvm, #clang Differential Revision: https://reviews.llvm.org/D80805
-
serge-sans-paille authored
Differential Revision: https://reviews.llvm.org/D81235
-
- Jun 04, 2020
-
-
Huihui Zhang authored
Summary: In SCEVExpander FactorOutConstant(), when GEP indexing into/over scalable vector, it is legal for the 'Factor' in a MulExpr to be the size of a scalable vector instead of a compile-time constant. Current upstream crash with the test attached. Reviewers: efriedma, sdesmalen, sanjoy.google, mkazantsev Reviewed By: efriedma Subscribers: hiraditya, javed.absar, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80973
-
- Jun 01, 2020
-
-
Sanjay Patel authored
As discussed in https://bugs.llvm.org/show_bug.cgi?id=45951 and D80584, the name 'tmp' is almost always a bad choice, but we have a legacy of regression tests with that name because it was baked into utils/update_test_checks.py. This change makes -instnamer more consistent (already using "arg" and "bb", the common LLVM shorthand). And it avoids the conflict in telling users of the FileCheck script to run "-instnamer" to create a better regression test and having that cause a warn/fail in update_test_checks.py.
-
- May 30, 2020
-
-
Whitney Tsang authored
Differential Revision: https://reviews.llvm.org/D80477.
-
Christopher Tetreault authored
Reviewers: efriedma, c-rhodes, sdesmalen, xbolva00 Reviewed By: c-rhodes Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80337
-
- May 29, 2020
-
-
Ehud Katz authored
Prevent `invertCondition` from creating the inversion instruction, in case the given value is an argument which has already been inverted. Note that this approach has already been taken in case the given value is an instruction (and not an argument). Differential Revision: https://reviews.llvm.org/D80399
-
Whitney Tsang authored
removed in https://reviews.llvm.org/D80477
-
Whitney Tsang authored
latch. Summary: Remove the limitation in LoopUnrollPass that exiting block must be either header or latch. Reviewer: dmgreen, jdoerfert, Meinersbur, kbarton, bmahjour, etiotto, fhahn, efriedma Reviewed By: etiotto, fhahn, efriedma Subscribers: efriedma, lkail, xbolva00, hiraditya, zzheng, llvm-commits Tag: LLVM Differential Revision: https://reviews.llvm.org/D80477
-
- May 28, 2020
-
-
Whitney Tsang authored
This reverts commit 28105822. Revert until http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-debian/builds/7334 is resolved.
-
Whitney Tsang authored
latch. Summary: Remove the limitation in LoopUnrollPass that exiting block must be either header or latch. Reviewer: dmgreen, jdoerfert, Meinersbur, kbarton, bmahjour, etiotto, fhahn, efriedma Reviewed By: etiotto, fhahn, efriedma Subscribers: efriedma, lkail, xbolva00, hiraditya, zzheng, llvm-commits Tag: LLVM Differential Revision: https://reviews.llvm.org/D80477
-
Sidharth Baveja authored
Summary: The following code from /llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp can be used by other transformations: while (!MergeBlocks.empty()) { BasicBlock *BB = *MergeBlocks.begin(); BranchInst *Term = dyn_cast<BranchInst>(BB->getTerminator()); if (Term && Term->isUnconditional() && L->contains(Term->getSuccessor(0))) { BasicBlock *Dest = Term->getSuccessor(0); BasicBlock *Fold = Dest->getUniquePredecessor(); if (MergeBlockIntoPredecessor(Dest, &DTU, LI)) { // Don't remove BB and add Fold as they are the same BB assert(Fold == BB); (void)Fold; MergeBlocks.erase(Dest); } else MergeBlocks.erase(BB); } else MergeBlocks.erase(BB); } Hence it should be separated into its own utility function. Authored By: sidbav Reviewer: Whitney, Meinersbur, asbirlea, dmgreen, etiotto Reviewed By: asbirlea Subscribers: hiraditya, zzheng, llvm-commits Tag: LLVM Differential Revision: https://reviews.llvm.org/D80583
-
Philip Reames authored
Now that all of the statepoint related routines have classes with isa support, let's cleanup. I'm leaving the (dead) utitilities in tree for a few days so that I can do the same cleanup downstream without breakage.
-
- May 27, 2020
-
-
Rithik Sharma authored
code motion Summary: Currently isSafeToMoveBefore uses DFS numbering for determining the relative position of instruction and insert point which is not always correct. This PR proposes the use of Dominator Tree depth for the same. If a node is at a higher level than the insert point then it is safe to say that we want to move in the forward direction. Authored By: RithikSharma Reviewer: Whitney, nikic, bmahjour, etiotto, fhahn Reviewed By: Whitney Subscribers: fhahn, hiraditya, llvm-commits Tag: LLVM Differential Revision: https://reviews.llvm.org/D80084
-
David Green authored
This makes sure to correctly register the loop info of the children of unroll and jammed loops. It re-uses some code from the unroller for registering subloops. Differential Revision: https://reviews.llvm.org/D80619
-
Djordje Todorovic authored
This fixes the output of the check-debugify option. Without the patch an example of running the option: $ opt -check-debugify test.ll -S -o testDebugify.ll CheckModuleDebugifySkipping module without debugify metadata After the patch: $ opt -check-debugify test.ll -S -o testDebugify.ll CheckModuleDebugify: Skipping module without debugify metadata Differential Revision: https://reviews.llvm.org/D80553
-
- May 26, 2020
-
-
Florian Hahn authored
I think the current code dealing with connecting the unrolled iterations is a bit more complicated than necessary currently. To connect the unrolled iterations, we have to update the unrolled latch blocks to branch to the header of the next unrolled iteration. We need to do this regardless whether the latch is exiting or not. Additionally, we try to turn the conditional branch in the exiting block to an unconditional one. This is an optimization only; alternatively we could leave the conditional branches in place and rely on other passes to simplify the conditions. Logically, this is a separate step from connecting the latches to the headers, but it is convenient to fold them into the same loop, if the latch is also exiting. For headers (or other non-latch exiting blocks, this is done separately). Hopefully the patch with additional comments makes things a bit clearer. Reviewers: efriedma, dmgreen, hfinkel, Whitney Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D80544
-
Serge Pavlov authored
This intrinsic implements IEEE-754 operation roundToIntegralTiesToEven, and performs rounding to the nearest integer value, rounding halfway cases to even. The intrinsic represents the missed case of IEEE-754 rounding operations and now llvm provides full support of the rounding operations defined by the standard. Differential Revision: https://reviews.llvm.org/D75670
-
- May 25, 2020
-
-
Florian Hahn authored
-
Whitney Tsang authored
Summary: Fixes this build error: llvm/lib/Transforms/Utils/LoopUtils.cpp:679:26: error: no matching function for call to 'find' Loop::iterator I = find(ParentLoop->begin(), ParentLoop->end(), L); ^~~~ Authored By: orivej Reviewer: Whitney Reviewed By: Whitney Subscribers: hiraditya, llvm-commits Tag: LLVM Differential Revision: https://reviews.llvm.org/D80473
-
- May 23, 2020
-
-
Matt Arsenault authored
This should function as any other SimplifyCFGOption rather than having the transform check and specially consider the attribute itself.
-
Michal Paszkowski authored
This reverts commit 14d35853.
-
Michal Paszkowski authored
Summary: Added a new IRCanonicalizer pass which aims to transform LLVM modules into a canonical form by reordering and renaming instructions while preserving the same semantics. The canonicalizer makes it easier to spot semantic differences when diffing two modules which have undergone different passes. Presentation: https://www.youtube.com/watch?v=c9WMijSOEUg Reviewed by: plotfi Differential Revision: https://reviews.llvm.org/D66029
-
- May 21, 2020
-
-
Ehud Katz authored
In case the then-path of an if-region is empty, then merging with the else-path should be handled with the inverse of the condition (leading to that path). Fix PR37662 Differential Revision: https://reviews.llvm.org/D78881
-
Roman Lebedev authored
Summary: Currently, `rewriteLoopExitValues()`'s logic is roughly as following: > Loop over each incoming value in each PHI node. > Query whether the SCEV for that incoming value is high-cost. > Expand the SCEV. > Perform sanity check (`isValidRewrite()`, D51582) > Record the info > Afterwards, see if we can drop the loop given replacements. > Maybe perform replacements. The problem is that we interleave SCEV cost checking and expansion. This is A Problem, because `isHighCostExpansion()` takes special care to not bill for the expansions that were already expanded, and we can reuse. While it makes sense in general - if we know that we will expand some SCEV, all the other SCEV's costs should account for that, which might cause some of them to become non-high-cost too, and cause chain reaction. But that isn't what we are doing here. We expand *all* SCEV's, unconditionally. So every next SCEV's cost will be affected by the already-performed expansions for previous SCEV's. Even if we are not planning on keeping some of the expansions we performed. Worse yet, this current "bonus" depends on the exact PHI node incoming value processing order. This is completely wrong. As an example of an issue, see @dmajor's `pr45835.ll` - if we happen to have a PHI node with two(!) identical high-cost incoming values for the same basic blocks, we would decide first time around that it is high-cost, expand it, and immediately decide that it is not high-cost because we have an expansion that we could reuse (because we expanded it right before, temporarily), and replace the second incoming value but not the first one; thus resulting in a broken PHI. What we instead should do for now, is not perform any expansions until after we've queried all the costs. Later, in particular after `isValidRewrite()` is an assertion (D51582) we could improve upon that, but in a more coherent fashion. See [[ https://bugs.llvm.org/show_bug.cgi?id=45835 | PR45835 ]] Reviewers: dmajor, reames, mkazantsev, fhahn, efriedma Reviewed By: dmajor, mkazantsev Subscribers: smeenai, nikic, hiraditya, javed.absar, llvm-commits, dmajor Tags: #llvm Differential Revision: https://reviews.llvm.org/D79787
-
Benjamin Kramer authored
NFC.
-