[PATCH] D50377: [MustExecute] Rework LoopSafetyInfo to make it more optimistic about throws
Fedor Sergeev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 31 01:15:57 PDT 2018
fedor.sergeev added inline comments.
================
Comment at: lib/Transforms/Scalar/LoopUnswitch.cpp:525
if (SanitizeMemory)
- SafetyInfo.computeLoopSafetyInfo(L);
+ SafetyInfo->computeLoopSafetyInfo(L);
----------------
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)
https://reviews.llvm.org/D50377
More information about the llvm-commits
mailing list