[clang] [llvm] [RISCV][Zicfilp] Enable Zicfilp CFI compiler behaviors by looking at module flags (PR #152121)

Craig Topper via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 4 00:34:27 PDT 2025


topperc wrote:

The features in STI.TM are basically all 0 in LTO linking. It’s populated by mcpu and mattr backend command line options. Clang sets them when generating IR, but they aren’t set during LTO linking. For LTO, everything needs to be in IR. Each Function gets its own target-cpu and target-feature attributes that are used to construct a subtarget for that Function. There is no module subtarget.

I’ll look more at the patch tomorrow.

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


More information about the cfe-commits mailing list