- 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
-
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
-
- Jun 16, 2020
-
-
Tyker authored
Summary: this reduces significantly the number of assumes generated without aftecting too much the information that is preserved. this improves the compile-time cost of enable-knowledge-retention significantly. Reviewers: jdoerfert, sstefan1 Reviewed By: jdoerfert Subscribers: hiraditya, asbirlea, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D79650
-
Jay Foad authored
This reverts commit 69bdfb07. Reverting to investigate https://bugs.llvm.org/show_bug.cgi?id=46343
- Jun 14, 2020
-
-
Whitney Tsang authored
is not necessary one of them. Summary: Currently LoopUnrollPass already allow loops with multiple exiting blocks, but it is only allowed when the loop latch is one of the exiting blocks. When the loop latch is not an exiting block, then only single exiting block is supported. When possible, the single loop latch or the single exiting block terminator is optimized to an unconditional branch in the unrolled loop. This patch allows loops with multiple exiting blocks even if the loop latch is not one of them. However, the optimization of exiting block terminator to unconditional branch is not done when there exists more than one exiting block. Reviewer: dmgreen, Meinersbur, etiotto, fhahn, efriedma, bmahjour Reviewed By: efriedma Subscribers: hiraditya, zzheng, llvm-commits Tag: LLVM Differential Revision: https://reviews.llvm.org/D81053
-
- Jun 12, 2020
-
-
Florian Hahn authored
This patch adds a new option to CriticalEdgeSplittingOptions to control whether loop-simplify form must be preserved. It is them used by GVN to indicate that loop-simplify form does not have to be preserved. This fixes a crash exposed by 189efe29. If the critical edge we are splitting goes from a block inside a loop to a block outside the loop, splitting the edge will create a new exit block. As a result, the new block will branch to the original exit block, which will add a non-loop predecessor, breaking loop-simplify form. To preserve loop-simplify form, the predecessor blocks of the original exit are split, but that does not work for blocks with indirectbr terminators. If preserving loop-simplify form is requested, bail out , before making any changes. Reviewers: reames, hfinkel, davide, efriedma Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D81582
-
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
-