[llvm] [AMDGPU] MCExpr-ify MC layer kernel descriptor (PR #80855)

Janek van Oirschot via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 12 05:50:20 PST 2024


JanekvO wrote:

> > As in, amdgpu directives instead of .set? e.g.,
> 
> I mean what precisely does .set do? Is it defining a new external symbol for each field? I'm worried about blowing up the size of the symbol table by N entries for every function, and how you map from one function to the fields of another function

It defines a symbol with its assigned MCExpr. Do correct me if I'm wrong, but can't we set them as temporary symbols that don't end up in the symbol table (i.e., prefix the symbols with ".L")?

When going from IR to the object file directly, it will just use fixups so no symbols end up in the symbol table. These symbols won't be needed after assembling as well but given how there is no concept of fixups in the asm emit mechanism, we'll need them to avoid being order dependent for propagating the resource info in the case of going from .s -> .o.

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


More information about the llvm-commits mailing list