[llvm] r353911 - [LoopSimplifyCFG] Re-enable const branch folding by default
Roman Tereshin via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 20 19:25:10 PST 2019
Hi Max,
Looks like this doesn’t collaborate with MemorySSA very well:
./bin/opt -loop-simplifycfg loop-simplifycfg-term-folding-AND-mssa-loop-dependency.ll -enable-mssa-loop-dependency=true -verify-memoryssa=true -enable-loop-simplifycfg-term-folding=true -S -o -
Assertion failed: (find(predecessors(&B), Phi->getIncomingBlock(I)) != pred_end(&B) && "Incoming phi block not a block predecessor"), function verifyDefUses, file ../lib/Analysis/MemorySSA.cpp, line 1947.
The IR is:
define void @main() {
entry:
br label %for.body
for.body: ; preds = %exit, %entry
br label %switch.bb
switch.bb: ; preds = %for.body
switch i2 1, label %default.bb [
i2 1, label %case.bb
]
case.bb: ; preds = %switch
br label %exit
default.bb: ; preds = %switch
unreachable
exit: ; preds = %case.bb
call void @foo()
br label %for.body
}
declare void @foo()
Thanks,
Roman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: loop-simplifycfg-term-folding-AND-mssa-loop-dependency.ll
Type: application/octet-stream
Size: 584 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190220/9cfc43fe/attachment.obj>
-------------- next part --------------
> On Feb 12, 2019, at 10:12 PM, Max Kazantsev via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>
> Author: mkazantsev
> Date: Tue Feb 12 22:12:48 2019
> New Revision: 353911
>
> URL: http://llvm.org/viewvc/llvm-project?rev=353911&view=rev
> Log:
> [LoopSimplifyCFG] Re-enable const branch folding by default
>
> Known underlying bugs have been fixed, intensive fuzz testing did not
> find any new problems. Re-enabling by default. Feel free to revert if
> it causes any functional failures.
>
> 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=353911&r1=353910&r2=353911&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/LoopSimplifyCFG.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/LoopSimplifyCFG.cpp Tue Feb 12 22:12:48 2019
> @@ -41,7 +41,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
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list