topperc wrote:

> Whether modeling per-Module behavior with TM.STI is not suitable, since 
> TM.STI is never intended to be in sync with and serve only one specific 
> Module?

TM.STI is set based on what arguments are passed to the -mcpu and -mattr 
`cl::opt` in LLVM. clang does not always set these in the LTO step of an LTO 
build. If it does set them it would only be based on the command line of the 
LTO command not based on the individual Modules that are part of the LTO build. 
This means different Modules in the LTO build could have been built with 
different CFI settings and the attributes on their individual functions would 
be different.

If all the Modules in the LTO build need to have the same CFI setting, I think 
it needs to be a Module flag. That's what we use for target-abi for example.

https://github.com/llvm/llvm-project/pull/152121
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to