[PATCH] Allow PRE to duplicate loads in LICM like loop case
hfinkel at anl.gov
hfinkel at anl.gov
Fri Jan 30 15:11:30 PST 2015
================
Comment at: lib/Transforms/Scalar/GVN.cpp:1537
@@ +1536,3 @@
+ if (DT.properlyDominates(Pred, Header)) {
+ assert(!LoopPred && "Can only have one preheader!");
+ LoopPred = Pred;
----------------
How do you know that you'll never have more than one properly-dominating blocks to this potential loop-header block?
================
Comment at: lib/Transforms/Scalar/GVN.cpp:1585
@@ -1584,3 +1746,2 @@
}
-
CriticalEdgePred.push_back(Pred);
----------------
I'd not remove this blank line.
================
Comment at: lib/Transforms/Scalar/GVN.cpp:1612
@@ +1611,3 @@
+ BasicBlock *Pred = *PI;
+ if (IsValueFullyAvailableInBlock(Pred, FullyAvailableBlocks, 0)) {
+ continue;
----------------
Don't need { } here.
================
Comment at: lib/Transforms/Scalar/GVN.cpp:1700
@@ -1568,2 +1699,3 @@
+ BasicBlock *Pred = *PI;
if (IsValueFullyAvailableInBlock(Pred, FullyAvailableBlocks, 0)) {
continue;
----------------
Don't need { } here either (might as well fix that while you're here).
================
Comment at: lib/Transforms/Scalar/GVN.cpp:1843
@@ -1673,2 +1842,3 @@
Value *LoadPtr = PredLoad.second;
+ LoadPtr->dump();
----------------
Remove this.
http://reviews.llvm.org/D7061
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list