[llvm] r351520 - Re-enable terminator folding in LoopSimplifyCFG: underlying bugs fixed
Maxim Kazantsev via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 22 21:59:35 PST 2019
Thanks for reverting it Jordan! I’ll take a look.
--Max
From: Jordan Rupprecht <rupprecht at google.com>
Sent: Wednesday, January 23, 2019 8:15 AM
To: Maxim Kazantsev <max.kazantsev at azul.com>
Cc: llvm-commits at lists.llvm.org
Subject: Re: [llvm] r351520 - Re-enable terminator folding in LoopSimplifyCFG: underlying bugs fixed
Here's the creduce + stack trace w/ a debug build:
$ cat /tmp/repro.c
int a, b, *c, d, e;
void f() {
int g;
for (;;) {
for (; e; e = b) {
c = g;
for (; c; c = d)
if (a) break;
if (c) break;
}
}
}
$ clang -O1 -fexperimental-new-pass-manager -mllvm -enable-loop-simplifycfg-term-folding -c /tmp/repro.c
clang-9: ~/src/llvm-project/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp:63: void llvm::DeleteDeadBlocks(SmallVectorImpl<llvm::BasicBlock *> &, llvm::DomTreeUpdater *): Assertion
`Dead.count(Pred) && "All predecessors must be dead!"' failed.
...
#9 0x00007f448da1723b llvm::DeleteDeadBlocks(llvm::SmallVectorImpl<llvm::BasicBlock*>&, llvm::DomTreeUpdater*) ~/src/llvm-project/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp:62:
5
#10 0x00007f448e5c67ab (anonymous namespace)::ConstantTerminatorFoldingImpl::deleteDeadLoopBlocks() ~/src/llvm-project/llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp:415:5
On Tue, Jan 22, 2019 at 9:43 AM Jordan Rupprecht <rupprecht at google.com<mailto:rupprecht at google.com>> wrote:
It looks like this is still causing crashes, so I've temporarily reverted this as https://reviews.llvm.org/rL351845. I hope to have a repro later today.
On Thu, Jan 17, 2019 at 9:01 PM Max Kazantsev via llvm-commits <llvm-commits at lists.llvm.org<mailto:llvm-commits at lists.llvm.org>> wrote:
Author: mkazantsev
Date: Thu Jan 17 20:57:32 2019
New Revision: 351520
URL: http://llvm.org/viewvc/llvm-project?rev=351520&view=rev
Log:
Re-enable terminator folding in LoopSimplifyCFG: underlying bugs fixed
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopSimplifyCFG.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopSimplifyCFG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopSimplifyCFG.cpp?rev=351520&r1=351519&r2=351520&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopSimplifyCFG.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopSimplifyCFG.cpp Thu Jan 17 20:57:32 2019
@@ -42,7 +42,7 @@ using namespace llvm;
#define DEBUG_TYPE "loop-simplifycfg"
static cl::opt<bool> EnableTermFolding("enable-loop-simplifycfg-term-folding",
- cl::init(false));
+ cl::init(true));
STATISTIC(NumTerminatorsFolded,
"Number of terminators folded to unconditional branches");
_______________________________________________
llvm-commits mailing list
llvm-commits at lists.llvm.org<mailto:llvm-commits at lists.llvm.org>
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190123/424434c7/attachment-0001.html>
More information about the llvm-commits
mailing list