[PATCH] D29110: LangRef: Document the allowed metadata dropping transforms.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 25 11:24:24 PST 2017


pcc added a comment.

In https://reviews.llvm.org/D29110#656597, @kparzysz wrote:

> In https://reviews.llvm.org/D29110#656562, @pcc wrote:
>
> > In https://reviews.llvm.org/D29110#656551, @kparzysz wrote:
> >
> > > Would it still look like metadata to someone who has not read that piece of documentation?  Would this information invalidate previously correct understanding of the IR?
> >
> >
> > [...] there's no magical way to make sure that clients don't make mistakes.
>
>
> I see what you were referring to.  What I meant there was that the design should make it harder for users to make such mistakes.  If non-metadata and metadata looks the same, and metadata is safely removable, then the risk of someone accidentally removing non-metadata increases.  This is separate from any impact on existing code.


Can we solve that problem by renaming getMetadata (etc) to getMDAttributes (etc)? That would make it clear to anyone using the feature that these are just attributes with a special representation.


https://reviews.llvm.org/D29110





More information about the llvm-commits mailing list