[PATCH] [LoopReroll] Refactor most of reroll() into a helper class

hfinkel at anl.gov hfinkel at anl.gov
Tue Jan 27 09:31:32 PST 2015


With modifications suggested below, LGTM. Thanks!


REPOSITORY
  rL LLVM

================
Comment at: lib/Transforms/Scalar/LoopRerollPass.cpp:143
@@ +142,3 @@
+    // DAGRootTracker can access analyses such as SCEV.
+    friend class DAGRootTracker;
+
----------------
I'd prefer that we not do this just for access to the analysis variables. Just pass what is needed to the child class's constructor.

================
Comment at: lib/Transforms/Scalar/LoopRerollPass.cpp:698
@@ +697,3 @@
+        if (Roots[Idx-1])
+          // No duplicates allowed.
+          return false;
----------------
IIRC, the current version deals with duplicated. I'm not sure this is necessary (one could certainly argue that CSE should take care of anything interesting). Please explain why, however, you're ignoring duplicates in this comment.

http://reviews.llvm.org/D7197

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






More information about the llvm-commits mailing list