[PATCH] D76903: Add a flag on the context to protect against creation of operations in unregistered dialects

Uday Bondhugula via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 29 15:00:39 PDT 2020


bondhugula added a comment.

In D76903#1948876 <https://reviews.llvm.org/D76903#1948876>, @mehdi_amini wrote:

> In D76903#1948842 <https://reviews.llvm.org/D76903#1948842>, @bondhugula wrote:
>
> > The commit summary opening "By default, the verifier won't allow operations with unregistered dialect. " reads as if this was the situation before.
>
>
> I used the future tense here to indicate the change.
>
> > Besides "operations with unregistered dialect", what about unregistered operations, i.e., operations that aren't part of any registered dialect?
>
> To me “operations with unregistered dialect” is the same as “ operations that aren't part of any registered dialect”.


But the two are clearly different. There could be an operation that is part of a dialect that is not registered, and you then could have operations that aren't part of any dialect like "foo"() : () -> () -- the latter isn't part of say any dialect.

> “Unregistered operations” on the other hand can refer to an operation with a known dialect but that isn’t registered within the dialect. There is 
>  already a per-dialect flag to control this.

If the dialect itself hasn't been registered with <whatever we are referring to>, then obviously its ops themselves aren't registered. I think you could consistently use "ops with no / unregistered dialects" everywhere to be accurate.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76903





More information about the llvm-commits mailing list