[PATCH] D39236: [SCEV][NFC] Introduce isSafeToExpandAt function to SCEVExpander

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 8 23:17:53 PST 2017


mkazantsev added inline comments.


================
Comment at: lib/Analysis/ScalarEvolutionExpander.cpp:2294
+                      ScalarEvolution &SE) {
+  return isSafeToExpand(S, SE) && SE.dominates(S, InsertionPoint->getParent());
+}
----------------
reames wrote:
> From the comment, this sounds like it's going to be smarted than isSafeToExpand where it's really more restrictive.
> 
> Maybe add a TODO about handling cases which aren't *generally* safe to speculate but are safe to speculate *at this particular location*?
Let's not do it until we know the application for that.


https://reviews.llvm.org/D39236





More information about the llvm-commits mailing list