[RFC] Target CPU and features for module-level inline assembly

IMO, we need to stop scanning inline asm from LLVM IR to generate a symbol table. It causes really weird layering artifacts, and has long seemed unfortunate and in need of change, but this issue just adds more reason to do so.

That does mean that we need another solution to achieve LTO’s requirements.

My suggestion: have the IR-producer encode the list of symbols into the IR. In Clang’s case, that will mean doing similar asm scanning, but it will be done at IR generation, not IR parsing, which IMO makes a lot more sense, and, also, avoids the problem presented here.

2 Likes