[PATCH] D123216: [LoopSink] Use MemorySSA with legacy pass manager

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 6 06:40:22 PDT 2022


nikic created this revision.
nikic added a reviewer: asbirlea.
Herald added subscribers: george.burgess.iv, hiraditya.
Herald added a project: All.
nikic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

LoopSink with the legacy pass manager still uses AST, because we can't compute MemorySSA conditionally. I think now that the legacy pass manager will be removed soon(TM) we don't need to care about compile-time impact here anymore. Additionally, since MemorySSA is no longer eagerly optimized, the impact is actually not that high anymore (0.2% regression: http://llvm-compile-time-tracker.com/compare.php?from=ed4e6e03981a37d54c4ac635b2bdb2c2fe8fec92&to=c3bfd875b637503adbeaccc59d19d8eb934bcfa7&stat=instructions)

This just makes legacy PM and new PM behavior line up -- as a followup I'll drop these options entirely and make MemorySSA use mandatory.


https://reviews.llvm.org/D123216

Files:
  llvm/lib/Transforms/Scalar/LoopSink.cpp


Index: llvm/lib/Transforms/Scalar/LoopSink.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/LoopSink.cpp
+++ llvm/lib/Transforms/Scalar/LoopSink.cpp
@@ -70,7 +70,7 @@
     cl::desc("Enable MemorySSA for LoopSink in new pass manager"));
 
 static cl::opt<bool> EnableMSSAInLegacyLoopSink(
-    "enable-mssa-in-legacy-loop-sink", cl::Hidden, cl::init(false),
+    "enable-mssa-in-legacy-loop-sink", cl::Hidden, cl::init(true),
     cl::desc("Enable MemorySSA for LoopSink in legacy pass manager"));
 
 /// Return adjusted total frequency of \p BBs.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123216.420823.patch
Type: text/x-patch
Size: 601 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220406/0511c125/attachment.bin>


More information about the llvm-commits mailing list