================
@@ -163,31 +166,32 @@ void 
RISCVPostLegalizerCombiner::getAnalysisUsage(AnalysisUsage &AU) const {
   MachineFunctionPass::getAnalysisUsage(AU);
 }
 
-RISCVPostLegalizerCombiner::RISCVPostLegalizerCombiner()
-    : MachineFunctionPass(ID) {
-  if (!RuleConfig.parseCommandLineOption())
-    report_fatal_error("Invalid rule identifier");
-}
+RISCVPostLegalizerCombinerLegacy::RISCVPostLegalizerCombinerLegacy()
+    : MachineFunctionPass(ID) {}
 
-bool RISCVPostLegalizerCombiner::runOnMachineFunction(MachineFunction &MF) {
+static bool
+runCombinerOnMachineFunction(MachineFunction &MF,
+                             function_ref<bool()> ShouldSkip,
+                             function_ref<GISelValueTracking *()> GetVT,
+                             function_ref<MachineDominatorTree *()> GetMDT,
+                             function_ref<GISelCSEInfo *()> GetCSEInfo) {
   if (MF.getProperties().hasFailedISel())
     return false;
   assert(MF.getProperties().hasLegalized() && "Expected a legalized 
function?");
-  auto *TPC = &getAnalysis<TargetPassConfig>();
   const Function &F = MF.getFunction();
   bool EnableOpt =
-      MF.getTarget().getOptLevel() != CodeGenOptLevel::None && 
!skipFunction(F);
+      MF.getTarget().getOptLevel() != CodeGenOptLevel::None && !ShouldSkip();
+
+  RISCVPostLegalizerCombinerImplRuleConfig RuleConfig;
----------------
boomanaiden154 wrote:

Negligible from my understanding. It only holds a SparseBitVector, and the 
command line parsing is also super cheap.

https://github.com/llvm/llvm-project/pull/235951
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to