[llvm-branch-commits] [clang] [llvm] [llvm] Introduce type id operand bundle (PR #87573)
Nikita Popov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Feb 4 12:49:28 PST 2025
nikic wrote:
> Reason for using operand bundle -- The original discussion for this change is captured here: https://reviews.llvm.org/D105909 - My takeaway from the discussion is that the type id metadata was dropped by optimizations leading to not so clean implementation using metadata.
To avoid dropping call metadata during optimizations you need to implement combineMetadata handling for it -- and design the metadata to be amenable to preservation during optimizations. In particular, rather than a single !type, you'd want a list of !types, such that when two indirect calls are merged (e.g. by SimplifyCFG) it is possible to preserve the callee type information.
> Dropping the OB -- Yes. Dropping it will not affect correctness.
If dropping it doesn't affect correctness, I don't think the use of operand bundles is appropriate.
> "type" as a name -- Do you have recommendations for name? -- here's some that comes to my mind - "type_hash", "fn_type_hash".
Is the content of this OB the same as CFI `!type` metadata on function definitions? If so, I guess the use of "type" terminology is okay, though I'd at least make it the `callee_type`.
https://github.com/llvm/llvm-project/pull/87573
More information about the llvm-branch-commits
mailing list