[llvm] [LangRef] inline asm: the instructions are treated opaquely (PR #157080)
James Y Knight via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 12 12:49:10 PDT 2025
jyknight wrote:
> 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.
IMO, we should not allow a magic comment in inline-asm strings to be semantically meaningful to the compiler. Additional information can be attached to inline assembly IR in other more suitable ways; for example, attributes or metadata attached to the call.
https://github.com/llvm/llvm-project/pull/157080
More information about the llvm-commits
mailing list