[PATCH] D50377: [MustExecute] Rework LoopSafetyInfo to make it more optimistic about throws

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 2 20:02:17 PDT 2018


mkazantsev added inline comments.


================
Comment at: lib/Transforms/Scalar/LoopUnswitch.cpp:525
   if (SanitizeMemory)
-    SafetyInfo.computeLoopSafetyInfo(L);
+    SafetyInfo->computeLoopSafetyInfo(L);
 
----------------
fedor.sergeev wrote:
> Since we only need SafetyInfo for SanitizeMemory and it has already been converted to a pointer...
> Perhaps it will be cleaner to:
>   - initialize SafetyInfo to non-null only under SanitizeMemory.
>   - operate on SafetyInfo (e.g. dropping caches) only under if (SanityInfo)
>   - setting SafetyInfo to null at the end of this function (just to avoid leaving dangling pointer)
Good idea. I would rather not do it in this patch because I want everything which is not connected to the logic be straightforward. Will prepare a follow-up.


https://reviews.llvm.org/D50377





More information about the llvm-commits mailing list