[llvm] [AMDGPU] Account for inline asm size in inst_pref_size calculation (PR #192133)

Stanislav Mekhanoshin via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 15 00:53:58 PDT 2026


rampitec wrote:

The main problem is that you need to either underestimate or to be sharply right here. An attempt to prefetch beyond actual mapped memory is a segfault returned to the host and killed process. You basically cannot correctly estimate inline asm size via the text asm analysis. One probable solution is to raise inline asm to MIR (note, MIR, not even MC). There is nothing in llvm which can raise MC into MIR. This is a one to many relation w/o any path to solve. Another one and achievable solution is to make MCExpr resolved at a RT link time. This is incomplete but at least in the line of sight.

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


More information about the llvm-commits mailing list