[llvm-branch-commits] [llvm] [CodeGenPrepare] Keep the old option names as aliases (PR #232090)

Fangrui Song via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Oct 14 20:56:05 PDT 2026


MaskRay wrote:

LLVM upstream doesn't guarantee compatibility for `cl::opt` spellings. In practice we keep frequently used ones, and I don't think these qualify. A GitHub code search for the 20 old spellings finds, apart from LLVM copies and forks, only fuzzer flag lists, a `-help` dump, a one-off ablation and one real user of `-cgpp-huge-func` (revmc, which pins its LLVM version). If you can share which of these your build relies on, I'm happy to discuss keeping those. Otherwise I'd prefer to keep these aliases downstream rather than add them upstream.

For libraries ported from now on, I'd like to bundle the renaming with the TableGen port and keep aliases for the old spellings, then drop the aliases in a follow-up. For that, an alias shouldn't have to name its target `defm`. Here every renamed row changes from `defm :` to `defm cgp_xxx :`, so removing the aliases later either leaves those names or touches the rows again. Could the alias refer to its target by spelling instead, e.g. `def : AliasOf<"disable-cgp-branch-opts", "cgp-branch-opts", ["false"]>;`, with the emitter resolving it within the struct?

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


More information about the llvm-branch-commits mailing list