Skip to content

Commit b02f572

Browse files
committed
Hide new/recently inherited LLVM command-line options
Based on checking the `ldc2 -help` output when using LLVM 20 and 19 on Linux x86_64 (with all targets enabled, incl. experimental SPIRV/ Xtensa). And comparing that against official LDC v1.34 with LLVM 16.
1 parent cc3bfbb commit b02f572

File tree

1 file changed

+39
-21
lines changed

1 file changed

+39
-21
lines changed

driver/cl_options.cpp

Lines changed: 39 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -818,17 +818,21 @@ void hideLLVMOptions() {
818818
"amdgpu-dump-hsa-metadata", "amdgpu-enable-flat-scratch",
819819
"amdgpu-enable-global-sgpr-addr", "amdgpu-enable-merge-m0",
820820
"amdgpu-enable-power-sched", "amdgpu-igrouplp",
821-
"amdgpu-kernarg-preload-count", "amdgpu-promote-alloca-to-vector-limit",
821+
"amdgpu-indirect-call-specialization-threshold",
822+
"amdgpu-kernarg-preload-count", "amdgpu-module-splitting-max-depth",
823+
"amdgpu-promote-alloca-to-vector-limit",
822824
"amdgpu-reserve-vgpr-for-sgpr-spill", "amdgpu-sdwa-peephole",
823825
"amdgpu-use-aa-in-codegen", "amdgpu-verify-hsa-metadata",
824-
"amdgpu-vgpr-index-mode", "arm-add-build-attributes",
826+
"amdgpu-vgpr-index-mode", "argext-abi-check",
827+
"arm-add-build-attributes",
825828
"arm-implicit-it", "asm-instrumentation", "asm-show-inst",
826829
"atomic-counter-update-promoted", "atomic-first-counter",
827-
"basic-block-sections",
830+
"basic-block-address-map", "basic-block-sections",
828831
"basicblock-sections", "bounds-checking-single-trap",
829832
"bounds-checking-unique-traps", "bpf-stack-size", "cfg-hide-cold-paths",
830833
"cfg-hide-deoptimize-paths", "cfg-hide-unreachable-paths",
831-
"code-model", "cost-kind", "cppfname", "cppfor", "cppgen",
834+
"check-functions-filter", "code-model", "conditional-counter-update",
835+
"cost-kind", "cppfname", "cppfor", "cppgen", "crel",
832836
"cvp-dont-add-nowrap-flags",
833837
"cvp-dont-process-adds", "debug-counter", "debug-entry-values",
834838
"debugger-tune", "debugify-func-limit", "debugify-level",
@@ -847,27 +851,32 @@ void hideLLVMOptions() {
847851
"enable-cse-in-irtranslator", "enable-cse-in-legalizer",
848852
"enable-emscripten-cxx-exceptions", "enable-emscripten-sjlj",
849853
"enable-fp-mad", "enable-gvn-hoist", "enable-gvn-memdep",
854+
"enable-gvn-memoryssa",
850855
"enable-gvn-sink", "enable-implicit-null-checks", "enable-jmc-instrument",
851-
"enable-load-in-loop-pre",
856+
"enable-jump-table-to-switch", "enable-load-in-loop-pre",
852857
"enable-load-pre", "enable-loop-simplifycfg-term-folding",
853858
"enable-misched", "enable-name-compression", "enable-no-infs-fp-math",
854859
"enable-no-nans-fp-math", "enable-no-signed-zeros-fp-math",
855860
"enable-no-trapping-fp-math", "enable-objc-arc-annotations",
856-
"enable-objc-arc-opts", "enable-pie", "enable-scoped-noalias",
861+
"enable-objc-arc-opts", "enable-pgo-force-function-attrs",
862+
"enable-pie", "enable-scoped-noalias",
857863
"enable-split-backedge-in-load-pre", "enable-split-loopiv-heuristic",
858864
"enable-tbaa", "enable-tlsdesc", "enable-unsafe-fp-math",
859-
"exception-model", "exhaustive-register-search", "expensive-combines",
865+
"enable-vtable-profile-use", "enable-vtable-value-profiling",
866+
"exception-model", "exhaustive-register-search",
867+
"expand-variadics-override", "expensive-combines",
860868
"experimental-debug-variable-locations",
861869
"experimental-debuginfo-iterators",
862-
"fatal-assembler-warnings", "filter-print-funcs",
870+
"fatal-assembler-warnings", "fdpic", "filter-print-funcs",
863871
"force-dwarf-frame-section", "force-opaque-pointers",
864872
"force-tail-folding-style",
865873
"fs-profile-debug-bw-threshold", "fs-profile-debug-prob-diff-threshold",
866874
"generate-merged-base-profiles",
867-
"gpsize", "hash-based-counter-split", "hexagon-rdf-limit",
868-
"hot-cold-split", "ignore-xcoff-visibility",
875+
"gpsize", "hash-based-counter-split", "hexagon-add-build-attributes",
876+
"hexagon-rdf-limit", "hot-cold-split", "hwasan-percentile-cutoff-hot",
877+
"hwasan-random-rate", "ignore-xcoff-visibility",
869878
"imp-null-check-page-size", "imp-null-max-insts-to-consider",
870-
"import-all-index", "incremental-linker-compatible",
879+
"implicit-mapsyms", "import-all-index", "incremental-linker-compatible",
871880
"instcombine-code-sinking", "instcombine-guard-widening-window",
872881
"instcombine-max-iterations", "instcombine-max-num-phis",
873882
"instcombine-max-sink-users",
@@ -876,7 +885,9 @@ void hideLLVMOptions() {
876885
"instrprof-atomic-counter-update-all", "internalize-public-api-file",
877886
"internalize-public-api-list", "iterative-counter-promotion",
878887
"join-liveintervals", "jump-table-type", "large-data-threshold",
879-
"limit-float-precision", "lower-global-dtors-via-cxa-atexit",
888+
"limit-float-precision", "lint-abort-on-error", "loongarch-use-aa",
889+
"lower-allow-check-percentile-cutoff-hot",
890+
"lower-allow-check-random-rate", "lower-global-dtors-via-cxa-atexit",
880891
"lto-embed-bitcode", "matrix-default-layout",
881892
"matrix-print-after-transpose-opt", "matrix-propagate-shape",
882893
"max-counter-promotions", "max-counter-promotions-per-loop",
@@ -888,7 +899,7 @@ void hideLLVMOptions() {
888899
"mno-fixup", "mno-ldc1-sdc1", "mno-pairing", "mwarn-missing-parenthesis",
889900
"mwarn-noncontigious-register", "mwarn-sign-mismatch", "mxcoff-roptr",
890901
"no-discriminators", "no-integrated-as", "no-type-check", "no-xray-index",
891-
"nozero-initialized-in-bss", "nvptx-sched4reg",
902+
"nozero-initialized-in-bss", "nvptx-approx-log2f32", "nvptx-sched4reg",
892903
"objc-arc-annotation-target-identifier",
893904
"object-size-offset-visitor-max-visit-instructions",
894905
"pgo-block-coverage", "pgo-temporal-instrumentation",
@@ -900,21 +911,26 @@ void hideLLVMOptions() {
900911
"print-pipeline-passes", "profile-correlate",
901912
"profile-estimator-loop-weight", "profile-estimator-loop-weight",
902913
"profile-file", "profile-info-file", "profile-verifier-noassert",
903-
"pseudo-probe-for-profiling",
914+
"promote-alloca-vector-loop-user-weight", "pseudo-probe-for-profiling",
904915
"r600-ir-structurize", "rdf-dump", "rdf-limit", "recip", "regalloc",
905916
"relax-elf-relocations", "remarks-section", "rewrite-map-file",
906917
"riscv-add-build-attributes", "riscv-use-aa", "rng-seed",
907918
"runtime-counter-relocation", "safepoint-ir-verifier-print-only",
908919
"sample-profile-check-record-coverage",
909920
"sample-profile-check-sample-coverage",
910921
"sample-profile-inline-hot-threshold",
911-
"sample-profile-max-propagate-iterations", "shrink-wrap", "simplify-mir",
922+
"sample-profile-max-propagate-iterations",
923+
"sampled-instr-burst-duration", "sampled-instr-period",
924+
"sampled-instrumentation", "save-temp-labels", "separate-named-sections",
925+
"shrink-wrap", "simplify-mir",
912926
"skip-ret-exit-block",
913927
"speculative-counter-promotion-max-exiting",
914928
"speculative-counter-promotion-to-loop", "spiller", "spirv-debug",
915-
"spirv-erase-cl-md", "spirv-lower-const-expr", "spirv-mem2reg",
929+
"spirv-erase-cl-md", "spirv-ext", "spirv-lower-const-expr",
930+
"spirv-mem2reg",
916931
"spirv-no-deref-attr", "spirv-text", "spirv-verify-regularize-passes",
917932
"split-machine-functions", "spv-dump-deps",
933+
"spv-emit-nonsemantic-debug-info",
918934
"spv-lower-saddwithoverflow-validate", "spvbool-validate",
919935
"spvmemmove-validate", "stack-alignment", "stack-protector-guard",
920936
"stack-protector-guard-offset", "stack-protector-guard-reg",
@@ -923,21 +939,23 @@ void hideLLVMOptions() {
923939
"static-func-strip-dirname-prefix", "stats", "stats-json", "strict-dwarf",
924940
"strip-debug", "struct-path-tbaa", "summary-file", "sve-tail-folding",
925941
"swift-async-fp",
926-
"tail-predication", "tailcallopt", "thinlto-assume-merged",
942+
"tail-predication", "tailcallopt", "target-abi", "thinlto-assume-merged",
927943
"thread-model", "time-passes", "time-trace-granularity", "tls-size",
944+
"translator-compatibility-mode",
928945
"type-based-intrinsic-cost", "unfold-element-atomic-memcpy-max-elements",
929946
"unique-basic-block-section-names", "unique-bb-section-names",
930947
"unique-section-names", "unit-at-a-time", "use-ctors",
931948
"vec-extabi", "verify-debug-info", "verify-dom-info",
932949
"verify-legalizer-debug-locs", "verify-loop-info",
933950
"verify-loop-lcssa", "verify-machine-dom-info", "verify-regalloc",
934951
"verify-region-info", "verify-scev", "verify-scev-maps",
935-
"vp-counters-per-site", "vp-static-alloc",
936-
"wasm-enable-eh", "wasm-enable-sjlj",
952+
"vp-counters-per-site", "vp-static-alloc", "wasm-enable-eh",
953+
"wasm-enable-exnref", "wasm-enable-sjlj", "wasm-use-legacy-eh",
954+
"wholeprogramdevirt-cutoff", "write-experimental-debuginfo",
937955
"x86-align-branch", "x86-align-branch-boundary",
938956
"x86-branches-within-32B-boundaries", "x86-early-ifcvt",
939-
"x86-pad-max-prefix-size",
940-
"x86-recip-refinement-steps", "x86-use-vzeroupper",
957+
"x86-pad-max-prefix-size", "x86-recip-refinement-steps",
958+
"x86-relax-relocations", "x86-sse2avx", "x86-use-vzeroupper",
941959
"xcoff-traceback-table", "xray-function-index",
942960

943961
// We enable -fdata-sections/-ffunction-sections by default where it makes

0 commit comments

Comments
 (0)