[llvm-branch-commits] [llvm] [AMDGPU][NewPM] Port SIOptimizeExecMaskingPreRA to NPM (PR #125351)
Christudasan Devadasan via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Feb 7 01:41:46 PST 2025
================
@@ -340,15 +348,29 @@ bool SIOptimizeExecMaskingPreRA::optimizeElseBranch(MachineBasicBlock &MBB) {
return true;
}
-bool SIOptimizeExecMaskingPreRA::runOnMachineFunction(MachineFunction &MF) {
+PreservedAnalyses
+SIOptimizeExecMaskingPreRAPass::run(MachineFunction &MF,
+ MachineFunctionAnalysisManager &MFAM) {
+ auto &LIS = MFAM.getResult<LiveIntervalsAnalysis>(MF);
+ SIOptimizeExecMaskingPreRA(&LIS).run(MF);
+ return PreservedAnalyses::all();
+}
+
+bool SIOptimizeExecMaskingPreRALegacy::runOnMachineFunction(
+ MachineFunction &MF) {
if (skipFunction(MF.getFunction()))
return false;
+ auto *LIS = &getAnalysis<LiveIntervalsWrapperPass>().getLIS();
+ return SIOptimizeExecMaskingPreRA(LIS).run(MF);
+}
+
+bool SIOptimizeExecMaskingPreRA::run(MachineFunction &MF) {
const GCNSubtarget &ST = MF.getSubtarget<GCNSubtarget>();
TRI = ST.getRegisterInfo();
TII = ST.getInstrInfo();
MRI = &MF.getRegInfo();
- LIS = &getAnalysis<LiveIntervalsWrapperPass>().getLIS();
+ // LIS = &getAnalysis<LiveIntervalsWrapperPass>().getLIS();
----------------
cdevadas wrote:
Remove it.
https://github.com/llvm/llvm-project/pull/125351
More information about the llvm-branch-commits
mailing list