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

Akshat Oke via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 28 23:27:00 PDT 2024


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

If `MFPropsModifier` is new pass only, it seems that legacy passes do not use this either.

Should I add this to the legacy pass as well? Which is:

```cpp
bool GCNDPPCombineLegacy::runOnMachineFunction(MachineFunction &MF) {
  if (skipFunction(MF.getFunction()))
    return false;

  MFPropsModifier _(*this, MF);
  return GCNDPPCombine().run(MF);
}
```

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


More information about the llvm-commits mailing list