[PATCH] Enable ExitValue rewrite only when expansion cost is low.

hfinkel at anl.gov hfinkel at anl.gov
Wed May 20 14:32:36 PDT 2015


Does this only apply when the loop otherwise has side effects? If the loop can be removed once the exit value is unused, maybe we should do it anyway?


REPOSITORY
  rL LLVM

================
Comment at: lib/Transforms/Scalar/IndVarSimplify.cpp:616
@@ +615,3 @@
+        if (ReplaceExitValue == OnlyCheapRepl &&
+            Rewriter.isHighCostExpansion(ExitValue, L)) {
+          continue;
----------------
No { } needed here.

http://reviews.llvm.org/D9800

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list