[clang] [llvm] [LTO] Parse global inline assembly with +all target flags (PR #167439)

Andrew Savonichev via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 11 06:19:43 PST 2025


asavonic wrote:

> We can instead propagate a CPU and target flags from all tools that use ModuleSymbolTable

I checked this briefly, and there are quite a few places where target features are not really known, and only an IR module is available. So I think we have to keep this information in a Module.

> Some kind of module level directive should probably be represented as an IR module flag

RISC-V seems to have this already https://github.com/llvm/llvm-project/pull/80760. The discussion there went in favor of implementing a mechanism for module-level target features. Perhaps that is the way to fix the problem. 

We have `target-features` function attribute that is a comma separated list of features (string attribute). If we add a similar module-level flag, we can read it in `ModuleSymbolTable` and initialize the parser correctly.

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


More information about the llvm-commits mailing list