[PATCH] D21165: Disable MSan-hostile loop unswitching.

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 10 11:10:17 PDT 2016


chandlerc added a comment.

Thanks for all the work to understand the nature of this discrepancy between MSan's semantics and the LLVM IR semantics. That bug will hopefully let us converge eventually. This seems like a reasonably isolated and minimal workaround in the mean time. Some factoring comments below.


================
Comment at: include/llvm/Transforms/Utils/LoopUtils.h:401-403
@@ -400,1 +400,5 @@
 
+bool isGuaranteedToExecute(const Instruction &Inst, const DominatorTree *DT,
+                           const Loop *CurLoop,
+                           const LICMSafetyInfo *SafetyInfo);
+
----------------
This no longer seems like LICM-specific safety?

================
Comment at: lib/Transforms/Scalar/LICM.cpp:737
@@ -739,4 +736,3 @@
 
-static bool isGuaranteedToExecute(const Instruction &Inst,
-                                  const DominatorTree *DT, const Loop *CurLoop,
-                                  const LICMSafetyInfo *SafetyInfo) {
+bool llvm::isGuaranteedToExecute(const Instruction &Inst,
+                                 const DominatorTree *DT, const Loop *CurLoop,
----------------
The definition should probably move out of LICM at this point.

Maybe do this in a separate patch if it is going to touch a bunch of stuff?


Repository:
  rL LLVM

http://reviews.llvm.org/D21165





More information about the llvm-commits mailing list