[llvm] [AMDGPU][AsmParser][NFC] Give isImmLiteral() a better name. (PR #153395)

Ivan Kosarev via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 20 03:14:10 PDT 2025


kosarev wrote:

> Is ImmTyNone used both for values that can be encoded as inlines (like 3) and those that need to be literals (like 999)?
>
> So you want a name that means something like "an immediate that is rendered as a plain old number in assembler source"?

Yes and yes. As we create asm operands, we don't know it yet if numeric ones are going to be inline constants or what we call literals, so `isImmLiteral()` is misleading. Calling them none-typed immediates doesn't help reading the code either, I feel.

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


More information about the llvm-commits mailing list