[PATCH] D45940: [LoopUnroll] Fix potentially incorrect SCEV invalidation in UnrollRuntime
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 23 03:43:05 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL330577: [LoopUnroll] Fix potentially incorrect SCEV invalidation in UnrollRuntime (authored by mkazantsev, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D45940?vs=143510&id=143521#toc
Repository:
rL LLVM
https://reviews.llvm.org/D45940
Files:
llvm/trunk/lib/Transforms/Utils/LoopUnrollRuntime.cpp
Index: llvm/trunk/lib/Transforms/Utils/LoopUnrollRuntime.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Utils/LoopUnrollRuntime.cpp
+++ llvm/trunk/lib/Transforms/Utils/LoopUnrollRuntime.cpp
@@ -878,10 +878,9 @@
NewPreHeader, VMap, DT, LI, PreserveLCSSA);
}
- // If this loop is nested, then the loop unroller changes the code in the
- // parent loop, so the Scalar Evolution pass needs to be run again.
- if (Loop *ParentLoop = L->getParentLoop())
- SE->forgetLoop(ParentLoop);
+ // If this loop is nested, then the loop unroller changes the code in the any
+ // of its parent loops, so the Scalar Evolution pass needs to be run again.
+ SE->forgetTopmostLoop(L);
// Canonicalize to LoopSimplifyForm both original and remainder loops. We
// cannot rely on the LoopUnrollPass to do this because it only does
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45940.143521.patch
Type: text/x-patch
Size: 903 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180423/5137dd7a/attachment.bin>
More information about the llvm-commits
mailing list