[llvm-dev] Metadata RAUW

Michael Kruse via llvm-dev llvm-dev at lists.llvm.org
Mon Jul 30 15:31:03 PDT 2018


RAUW on metadata is only possible for temporary nodes. Other
(non-distinct) nodes are merged when they are equal, so replacing one
node could also replace them in unrelated locations and potentially
dangerous. For instance, adding an element to list. The list could be
initially empty (!{}), thus this could replace any empty list
regardless of context.

However, replacing distinct metadata notes would be feasible. I'd look
into how RAUW works on temporary nodes and try to apply it on distinct
MDNodes as well.

Michael





2018-07-30 16:22 GMT-05:00 Son Tuan VU via llvm-dev <llvm-dev at lists.llvm.org>:
> Hello,
>
> Does anyone know if it is possible to RAUW the Metadata? I took a look at
> the source for it and IIUC, it is not possible. What should I do to
> implement the RAUW for DINode (more precisely DILocation)?
>
> Thank you for your help,
>
> Son Tuan Vu
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>


More information about the llvm-dev mailing list