[Unroll] Replace a hand-wavy FIXME with a FIXME that explains the actual
authorChandler Carruth <chandlerc@gmail.com>
Fri, 22 May 2015 03:07:28 +0000 (03:07 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Fri, 22 May 2015 03:07:28 +0000 (03:07 +0000)
problem instead of suggesting doing something that is trivial to do but
incorrect given the current design of the libraries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237994 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/LoopUnrollPass.cpp

index a5e5ffec695bf452b4a2a8ad4cd4270515b19761..7bd1fcffbd57801d96e94fe5ba9c57720db5871b 100644 (file)
@@ -349,9 +349,14 @@ buildSCEVGEPCache(const Loop &L, ScalarEvolution &SE) {
         if (!SE.isSCEVable(V->getType()))
             continue;
         const SCEV *S = SE.getSCEV(V);
         if (!SE.isSCEVable(V->getType()))
             continue;
         const SCEV *S = SE.getSCEV(V);
-        // FIXME: Hoist the initialization out of the loop.
+
+        // FIXME: It'd be nice if the worklist and set used by the
+        // SCEVTraversal could be re-used between loop iterations, but the
+        // interface doesn't support that. There is no way to clear the visited
+        // sets between uses.
         FindConstantPointers Visitor(&L, SE);
         SCEVTraversal<FindConstantPointers> T(Visitor);
         FindConstantPointers Visitor(&L, SE);
         SCEVTraversal<FindConstantPointers> T(Visitor);
+
         // Try to find (BaseAddress+Step+Offset) tuple.
         // If succeeded, save it to the cache - it might help in folding
         // loads.
         // Try to find (BaseAddress+Step+Offset) tuple.
         // If succeeded, save it to the cache - it might help in folding
         // loads.