[llvm] [MC][AArch64][LFI] Preserve policy options across .arch and .cpu (PR #220831)

Zachary Yedidia via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 3 01:49:18 PDT 2026


zyedidia wrote:

Thanks for bringing this up!

I think the fact that this would need a special exemption for LFI subtarget features is perhaps a sign that these mechanisms shouldn't be expressed as subtarget features in the first place, since they are used purely by the MC rewriter and not by codegen.

It may better overall to refactor the behavior in the rewriter to use configuration stored in MCTargetOptions instead, and use a module flag for the LTO case and detecting cross-module mismatch. I think this is more consistent with how things like RISC-V ABI and AArch64's BTI/PAC/GCS are tracked.

Perhaps worth more discussion to decide on a broader direction for this?

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


More information about the llvm-commits mailing list