[llvm] AMDGPU/NewPM Port SILoadStoreOptimizer to NPM (PR #106362)

Akshat Oke via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 29 02:07:23 PDT 2024


================
@@ -2571,3 +2580,24 @@ bool SILoadStoreOptimizer::runOnMachineFunction(MachineFunction &MF) {
 
   return Modified;
 }
+
+PreservedAnalyses
+SILoadStoreOptimizerPass::run(MachineFunction &MF,
+                              MachineFunctionAnalysisManager &MFAM) {
+  if (MF.getFunction().hasOptNone())
+    return PreservedAnalyses::all();
+
+  MFPropsModifier _(*this, MF);
----------------
Akshat-Oke wrote:

optnone is like `skipFunction` and properties check is a part of the pass, so I thought we should skip the check as well.

https://github.com/llvm/llvm-project/pull/106362


More information about the llvm-commits mailing list