[llvm-branch-commits] [llvm] [CodeGen] Declare command line options in TableGen (PR #228729)
Fangrui Song via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sun Oct 4 00:06:20 PDT 2026
================
@@ -0,0 +1,200 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+include "llvm/Option/LibraryOptions.td"
+
+def CodeGenOptions : OptionsStruct;
+
+defm : BoolField<"addr-sink-combine-base-gv", "true",
+ "Allow combining of BaseGV field in Address sinking">;
+defm : BoolField<"addr-sink-combine-base-offs", "true",
+ "Allow combining of BaseOffs field in Address sinking">;
+defm : BoolField<"addr-sink-combine-base-reg", "true",
+ "Allow combining of BaseReg field in Address sinking">;
+defm : BoolField<"addr-sink-combine-scaled-reg", "true",
+ "Allow combining of ScaledReg field in Address sinking">;
+defm : BoolField<"addr-sink-new-phis", "false",
+ "Allow creation of Phis in Address sinking">;
+defm : BoolField<"addr-sink-new-select", "true",
+ "Allow creation of selects in Address sinking">;
+defm : OptionalBoolField<"addr-sink-using-gep",
+ "Address sinking in CGP using GEPs">;
+defm : BoolField<"basic-block-section-match-infer", "false",
+ "Enable matching and inference when generating basic block sections">;
+defm : BoolField<"bbsections-guided-section-prefix", "true",
+ "Use the basic-block-sections profile to determine the text section prefix for hot functions. "
+ "Functions with basic-block-sections profile will be placed in `.text.hot` regardless of their FDO profile info. "
+ "Other functions won't be impacted, i.e., their prefixes will be decided by FDO/sampleFDO profiles">;
+defm : ValueField<"cgp-freq-ratio-to-skip-merge", "uint64_t", "2",
+ "Skip merging empty blocks if (frequency of empty block) / (frequency of destination block) is greater than this ratio">;
+defm : BoolField<"cgp-icmp-eq2icmp-st", "false",
+ "Enable ICMP_EQ to ICMP_S(L|G)T conversion">;
+defm : ValueField<"cgp-max-address-users-to-scan", "unsigned", "100",
+ "Max number of address users to look at">;
+defm : BoolField<"cgp-optimize-phi-types", "true",
+ "Enable converting phi types in CodeGenPrepare">;
+defm : BoolField<"cgp-split-large-offset-gep", "true",
+ "Enable splitting large offset of GEP">;
+defm : BoolField<"cgp-type-promotion-merge", "true",
+ "Enable merging of redundant sexts when one is dominating the other">;
+defm : BoolField<"cgp-verify-bfi-updates", "false",
+ "Enable BFI update verification for CodeGenPrepare">;
+defm : ValueField<"cgpp-huge-func", "unsigned", "10000",
----------------
MaskRay wrote:
#228838
https://github.com/llvm/llvm-project/pull/228729
More information about the llvm-branch-commits
mailing list