[llvm] r369283 - [CGP] Remove ModifiedDT from the makeBitReverse loop
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 19 11:02:24 PDT 2019
Author: ctopper
Date: Mon Aug 19 11:02:24 2019
New Revision: 369283
URL: http://llvm.org/viewvc/llvm-project?rev=369283&view=rev
Log:
[CGP] Remove ModifiedDT from the makeBitReverse loop
I don't think anything in this loop modifies the control flow and we don't restart any iteration after setting the flag.
This code was added in http://reviews.llvm.org/D16893 but looking at the test case added there the code that caused the dominator tree to change was merging blocks with their predecessor not the bitreverse optimization.
Differential Revision: https://reviews.llvm.org/D66366
Modified:
llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
Modified: llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp?rev=369283&r1=369282&r2=369283&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp (original)
+++ llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp Mon Aug 19 11:02:24 2019
@@ -7104,7 +7104,6 @@ bool CodeGenPrepare::optimizeBlock(Basic
for (auto &I : reverse(BB)) {
if (makeBitReverse(I, *DL, *TLI)) {
MadeBitReverse = MadeChange = true;
- ModifiedDT = true;
break;
}
}
More information about the llvm-commits
mailing list