[PATCH] D20638: [LIR] Fix mis-compilation with unwinding
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 6 09:53:04 PDT 2016
eli.friedman added a comment.
The code looks fine. The comments could use a bit of refinement.
================
Comment at: lib/Transforms/Scalar/LoopIdiomRecognize.cpp:220
@@ +219,3 @@
+
+ // Compute loop safety information.
+ LoopSafetyInfo SafetyInfo;
----------------
Useless comment.
================
Comment at: lib/Transforms/Scalar/LoopIdiomRecognize.cpp:223
@@ +222,3 @@
+ computeLoopSafetyInfo(&SafetyInfo, CurLoop);
+ // Give up if the loop may throw.
+ if (SafetyInfo.MayThrow)
----------------
It would be useful to explain why this check is necessary. Among other things, it would be good to mention that existing transforms involve hoisting stores into the loop pre-header.
Repository:
rL LLVM
http://reviews.llvm.org/D20638
More information about the llvm-commits
mailing list