[llvm] [X86] Declare command line options in TableGen (PR #228327)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 4 14:14:11 PDT 2026
MaskRay wrote:
> > Migration PRs should faithfully translate existing options so they don't break downstream users. Prefix x86-specific library options with `x86-` (some don't), and handle the removal of obsolete options in separate PRs.
>
> Yes, happy to do both, what kind of time limit are you running to? Either we just dump everything across now or I try to do some/all the cleanup first.
No deadline. We can either land the faithful migration first, then do renaming/removal, or reverse the order.
The new revision also covers the MC layer. `X86Desc` and `X86AsmParser` options now live in `MCTargetDesc/X86MCOptions.td`, registered by `LLVMInitializeX86TargetMC()`. `-x86-align-branch` becomes a string that X86AsmBackend parses. (`llvm/lib/Target/*/TargetInfo/` files don't have cl::opt options)
The rows are grouped by source file and sorted as if every spelling had the x86- prefix, so a later rename patch won't reorder them. When renaming, please keep -x86-asm-syntax, `-x86-align-branch*` and -x86-branches-within-32B-boundaries as they are, since clang and flang pass them.
Also @aengelke who may have an opinion on the approach.
https://github.com/llvm/llvm-project/pull/228327
More information about the llvm-commits
mailing list