[PATCH] D110026: [Verifier] Verify scoped noalias metadata

Hendrik Greving via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 21 09:02:18 PDT 2021


hgreving added a comment.

In D110026#3012827 <https://reviews.llvm.org/D110026#3012827>, @nikic wrote:

> In D110026#3012747 <https://reviews.llvm.org/D110026#3012747>, @hgreving wrote:
>
>> Seems like that this patch now contradicts the methods MDBuilder.h:createAnonymousAliasScopeDomain and createAnonymousAliasScope. If you actually give it a string, it won't verify. I wonder if you should amend this changing the methods as well?
>
> These methods are intended to be supported and are used in-tree and do verify there. Could you provide an example that would fail? Please keep in mind that scoped alias metadata always deals in scope lists, while createAnonymousAliasScope() only creates an isolated scope. You cannot pass the result of createAnonymousAliasScope() directly to `!noalias`, `!alias.scope`, etc.

Yes. But MDB.createAnonymousAliasScopeDomain("mystring") noew creates e.g. the domain !33 = distinct !{!33, !"mystring"}, which leads to the verifier error "second scope operand must be MDNode". This seems inconsistent. Same happens for createAnonymousAliasScope().


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110026



More information about the llvm-commits mailing list