[llvm] [AMDGPU] Add `.amdgpu.info` section for per-function metadata (PR #192384)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Sat May 9 13:03:09 PDT 2026
================
@@ -537,6 +538,133 @@ void AMDGPUAsmPrinter::validateMCResourceInfo(Function &F) {
}
}
+static void appendTypeEncoding(std::string &Enc, Type *Ty,
+ const DataLayout &DL) {
+ if (Ty->isVoidTy()) {
+ Enc += 'v';
+ return;
+ }
+ unsigned Bits = DL.getTypeSizeInBits(Ty);
+ // Zero-sized non-void types (e.g. `{}` or `[0 x i8]`) would collapse to the
+ // same encoding as i32, which would silently conflate distinct signatures.
+ // These aren't expected in indirect-callable signatures in practice.
+ assert(Bits > 0 && "Unexpected zero-sized non-void type in type-ID "
+ "encoding; encoding would be ambiguous");
+ if (Bits <= 32)
----------------
shiltian wrote:
I don't think our CC has changed for true16, and I'm also not sure how the CC would be if we want to use half register for 16-bit argument.
https://github.com/llvm/llvm-project/pull/192384
More information about the llvm-commits
mailing list