[clang] [RISCV] Add -march string as Module metadata in IR. (PR #80760)
Jessica Clarke via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 5 16:57:44 PST 2024
jrtc27 wrote:
My thoughts on this in the past have been:
1. target-abi should really be a target-independent thing we record; its meaning depends on the target, but the ABI exists throughout LLVM as a concept regardless of the target
2. module-level target features in general likely should be the thing we record, corresponding to the subtarget, not some target-dependent representation, as, again, all targets have that throughout LLVM and just use them to a greater or lesser extent
RISC-V is the most sensitive to this, but it's just a symptom of not having the general mechanism in place, and I'm not a huge fan of adding ad-hoc stuff specific to RISC-V rather than addressing the underlying problem. Other targets just care less upstream today so get away with this lack of information in practice, but that won't always true (e.g. I believe we need this information on Morello (CHERI+AArch64 prototype) downstream, not just for CHERI-RISC-V).
https://github.com/llvm/llvm-project/pull/80760
More information about the cfe-commits
mailing list