[llvm] Reapply "[GVN] MemorySSA for GVN: add optional AllowMemorySSA" (PR #122482)
Alina Sbirlea via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 10 15:33:27 PST 2025
================
@@ -3329,7 +3343,8 @@ class llvm::gvn::GVNLegacyPass : public FunctionPass {
AU.addPreserved<TargetLibraryInfoWrapperPass>();
AU.addPreserved<LoopInfoWrapperPass>();
AU.addRequired<OptimizationRemarkEmitterWrapperPass>();
- AU.addPreserved<MemorySSAWrapperPass>();
+ if (Impl.isMemorySSAEnabled())
+ AU.addRequired<MemorySSAWrapperPass>();
----------------
alinas wrote:
(legacy pass so doesn't matter much, but..) MSSA is always preserved with the above change (if getAnalysisIfAvailable is kept)
https://github.com/llvm/llvm-project/pull/122482
More information about the llvm-commits
mailing list