[PATCH] D10782: [IndVars] Try to use existing values in RewriteLoopExitValues.

Sanjoy Das sanjoy at playingwithpointers.com
Wed Jul 8 23:59:00 PDT 2015


sanjoy added inline comments.

================
Comment at: lib/Transforms/Scalar/IndVarSimplify.cpp:529
@@ +528,3 @@
+    if (!match(BB->getTerminator(),
+               m_Br(m_ICmp(Pred, m_Instruction(LHS), m_Instruction(RHS)),
+                    TrueBB, FalseBB)))
----------------
hfinkel wrote:
> The somewhat arbitrary nature of this heuristic is bothersome, although I can certainly understand why this is a common case.
> 
> Nevertheless, I can't think of anything better at the moment.
> 
> The somewhat arbitrary nature of this heuristic is bothersome

Agreed.  I initially wanted to do a more sophisticated crawl through the use list, but then decided to cross that bridge after I actually see real-world examples -- no point burning compile time on cases that don't really happen in practice.


http://reviews.llvm.org/D10782







More information about the llvm-commits mailing list