[PATCH] Enable ExitValue rewrite only when expansion cost is low.
hfinkel at anl.gov
hfinkel at anl.gov
Wed May 27 16:58:05 PDT 2015
Thanks for continuing to work on this. A few comments below, and I'd like Andy to look at this.
REPOSITORY
rL LLVM
================
Comment at: lib/Transforms/Scalar/IndVarSimplify.cpp:718
@@ +717,3 @@
+ SmallVector<RewritePhi, 8> &RewritePhiSet) {
+ bool LoopCanBeDel = true;
+
----------------
Once LoopCanBeDel is false, it will never become true again. Please remove this variable and just 'return false' in all places where you set LoopCanBeDel to false.
================
Comment at: lib/Transforms/Scalar/IndVarSimplify.cpp:740
@@ +739,3 @@
+ while (LoopCanBeDel && (P = dyn_cast<PHINode>(BI))) {
+ Value *incoming = P->getIncomingValueForBlock(ExitingBlocks[0]);
+
----------------
incoming -> Incoming
http://reviews.llvm.org/D9800
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list