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

Christudasan Devadasan via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 28 06:49:32 PDT 2024


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

Missing the code that skips this optimization for -O0 (optNone). Insert the following code here.
if (MF.getFunction().hasOptNone())
   return false;

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


More information about the llvm-commits mailing list