[llvm-branch-commits] [clang] [llvm] [llvm] Introduce type id operand bundle (PR #87573)
Paul Kirth via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Feb 5 09:54:02 PST 2025
ilovepi wrote:
I'd hazard that "correctness" here depends on if you mean the "correctness of the compiled code`"or the "correctness of the call graph section". The lang ref for operand bundle states that "dropping them is incorrect and will change program semantics". It goes on to say that "Operand bundles are a generic mechanism intended to support runtime-introspection-like functionality...", which is pretty close to the use (it isn't for a "runtime" exactly but is introspecting on what can happen at runtime). So, I'd say its a bit of a grey area here if using the Operand Bundle is or isn't appropriate. On the one hand, dripping such metadata wouldn't cause miscompilation, but on the other hand, the call graph section would likely be incorrect. From what I can tell, The call graph section isn't going to gracefully fall back to a conservative approximation of all possible callees.
TBH, I'm not sure if its best to continue to use operand bundle, extend the `!type` metadata the way @nikic described, or if we should have a new metadata that contains a list of `!types` and handles the merging.
https://github.com/llvm/llvm-project/pull/87573
More information about the llvm-branch-commits
mailing list