[llvm] [NewPM][CodeGen] Port MachineLICM to NPM (PR #107376)

via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 16 03:38:38 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>;
----------------
paperchalice wrote:

Move them after the definition, see https://en.cppreference.com/w/cpp/language/class_template#Class_template_instantiation

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


More information about the llvm-commits mailing list