[PATCH] D8817: Estimate DCE effect in heuristic for estimating complete-unroll optimization effects.

Gerolf Hoflehner ghoflehner at apple.com
Tue Jul 7 22:20:10 PDT 2015


Gerolf added a subscriber: Gerolf.

================
Comment at: lib/Transforms/Scalar/LoopUnrollPass.cpp:633
@@ -618,3 +632,3 @@
 
     // If we found no optimization opportunities on the first iteration, we
     // won't find them on later ones too.
----------------
How about: // When there is no optimization opportunity in the first iteration, we won't find opportunities in later iterations because ...

================
Comment at: lib/Transforms/Scalar/LoopUnrollPass.cpp:635
@@ -620,3 +634,3 @@
     // won't find them on later ones too.
     if (UnrolledCost == RolledDynamicCost)
       return None;
----------------
I'm missing context. Where do the costs get computed?

================
Comment at: test/Transforms/LoopUnroll/full-unroll-heuristics-dce.ll:6
@@ +5,3 @@
+
+; If a load becomes a constant after loop unrolling, we sometimes can simplify
+; CFG. This test verifies that we handle such cases.
----------------
This should be true for expressions also, not just loads.


http://reviews.llvm.org/D8817







More information about the llvm-commits mailing list