[llvm] [NewPM][CodeGen] Port MachineLICM to NPM (PR #107376)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 11 04:48:33 PDT 2024
================
@@ -1731,3 +1769,20 @@ bool MachineLICMBase::isTgtHotterThanSrc(MachineBasicBlock *SrcBlock,
// Compare the block frequency ratio with the threshold
return Ratio > BlockFrequencyRatioThreshold;
}
+
+template class llvm::MachineLICMBasePass<EarlyMachineLICMPass, true>;
+template class llvm::MachineLICMBasePass<MachineLICMPass, false>;
+
+template <typename DerivedT, bool PreRegAlloc>
+PreservedAnalyses MachineLICMBasePass<DerivedT, PreRegAlloc>::run(
+ MachineFunction &MF, MachineFunctionAnalysisManager &MFAM) {
+ if (MF.getFunction().hasOptNone())
+ return PreservedAnalyses::all();
----------------
arsenm wrote:
IR passes have the same problem in the codegen pipeline
https://github.com/llvm/llvm-project/pull/107376
More information about the llvm-commits
mailing list