[PATCH] D116660: [LoopFlatten] Update MemorySSA state
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 18 03:15:07 PST 2022
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LoopFlatten.cpp:886
auto *AC = &getAnalysis<AssumptionCacheTracker>().getAssumptionCache(F);
+ MemorySSA *MSSA = &getAnalysis<MemorySSAWrapperPass>().getMSSA();
+ MemorySSAUpdater MSSAU(MSSA);
----------------
nikic wrote:
> Shouldn't this be using `getAnalysisIfAvailable`? MSSA is not a required analysis here. Also, `getAnalysisUsage()` should be adjusted to mark MSSA as preserved.
This doesn't look right ... won't this crash if getAnalysisIfAvailable() returns nullptr?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116660/new/
https://reviews.llvm.org/D116660
More information about the llvm-commits
mailing list