[PATCH] D29104: Add !associated metadata.

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 17 15:00:46 PST 2017


mehdi_amini added inline comments.


================
Comment at: docs/LangRef.rst:5112
+unless the referenced object is also discarded. All IR transforms must
+preserve this metadata.
+
----------------
eugenis wrote:
> eugenis wrote:
> > mehdi_amini wrote:
> > > I don't think this is an OK property of metadata.
> > > Have you look for another representation that would not have this constraint?
> > It does not seem to be that bad. After all, !type and !absolute_symbol already have that property, they just don't document it.
> How about now?
> Under this list of conditions the metadata can be discarded, which will make the global non-discardable.
From LangRef:

```
A transformation is required to drop any metadata attachment that it does not know or know it can’t preserve. Currently there is an exception for metadata attachment to globals for !type and !absolute_symbol which can’t be unconditionally dropped unless the global is itself deleted.
```


Repository:
  rL LLVM

https://reviews.llvm.org/D29104





More information about the llvm-commits mailing list