[llvm] [InstCombine] Declare command line options in TableGen (PR #227948)

Alexis Engelke via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 30 22:50:21 PDT 2026


================
@@ -77,12 +74,16 @@ class LLVM_LIBRARY_VISIBILITY InstCombinerImpl final
                    OptimizationRemarkEmitter &ORE, BlockFrequencyInfo *BFI,
                    BranchProbabilityInfo *BPI, ProfileSummaryInfo *PSI,
                    const DataLayout &DL,
-                   ReversePostOrderTraversal<BasicBlock *> &RPOT)
+                   ReversePostOrderTraversal<BasicBlock *> &RPOT,
+                   const InstCombineCLOptions &CLOpts)
       : InstCombiner(Worklist, F, AA, AC, TLI, TTI, DT, ORE, BFI, BPI, PSI, DL,
-                     RPOT) {}
+                     RPOT),
+        CLOpts(CLOpts) {}
 
   ~InstCombinerImpl() override = default;
 
+  const InstCombineCLOptions CLOpts;
----------------
aengelke wrote:

reference? Conceptually, options can contain reference types, so copying wouldn't help with lifetime issues anyway.

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


More information about the llvm-commits mailing list