[llvm] [LangRef] inline asm: the instructions are treated opaquely (PR #157080)

Patrick Simmons via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 10 02:32:44 PDT 2025


linuxrocks123 wrote:

@RalfJung

> Interesting. I know absolutely nothing about the AMDGPU backend (and hardly anything about the general execution model for GPU kernels), but from a purely conceptual point -- if the compiler needs more information about what happens inside the asm block, the usual way such information is provided is via clobbers.

What we want to do is allow the user to specify the scheduling unit for an inline asm instruction.  The current implementation does so in a specially formatted assembly language comment which is part of the inline asm string.  The comment looks like `; SGMASK:0x2`.

Do you have another way we could pass that information?  If not, it may be best not to add this to the specification so that we can give users the ability to specify this information, and perhaps other similar information in the future.

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


More information about the llvm-commits mailing list