[PATCH] D145318: [IRLinker] Fix mapping of declaration metadata

Carl Ritson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 5 18:43:54 PST 2023


critson marked an inline comment as done.
critson added a comment.

In D145318#4169797 <https://reviews.llvm.org/D145318#4169797>, @tejohnson wrote:

> Is this a case where we didn't in the past have metadata attachments on declarations requiring mapping, and now we do? Also, the example uses a "!types" metadata - I'm familiar with !type metadata on definitions, but haven't seen !types before - is this new metadata? I can't find any uses of it in the test suite or any documentation.

!types is custom metadata we are investigating to handle DXIL bitcode.
An example of its generation can be seen in the tests for D127728 <https://reviews.llvm.org/D127728>.



================
Comment at: llvm/lib/Linker/IRMover.cpp:1142
   Mapper.scheduleRemapFunction(Dst);
+  UnmappedMetadata.erase(&Dst);
+
----------------
tejohnson wrote:
> GlobalVariable are also GlobalObjects, should they get the same treatment in linkGlobalVariable?
> 
> But is this removal needed at all, since the loop over UnmappedMetadata later on ignores definitions?
I think removing all the erase operations is probably sensible.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145318/new/

https://reviews.llvm.org/D145318



More information about the llvm-commits mailing list