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

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 29 16:04:38 PDT 2020


mehdi_amini marked 2 inline comments as done.
mehdi_amini added inline comments.


================
Comment at: mlir/tools/mlir-opt/mlir-opt.cpp:169
+                            splitInputFile, verifyDiagnostics, verifyPasses,
+                            allowUnregisteredDialects));
 }
----------------
bondhugula wrote:
> mehdi_amini wrote:
> > bondhugula wrote:
> > > `clAllowUnregisteredDialects` ?
> > Is this a documented or widespread convention?
> I thought it was a convention - unless folks started deviating from it. Readability-wise IMO it's a win because it's easily distinguishable as a cmd line flag, and you would in many cases want the same name with cl dropped somewhere in that pass.
The other variables above: `passPipeline`, `splitInputFile`, `verifyDiagnostics`, and `verifyPasses` are all cl flags and not using this convention, so I just followed what is there at the moment.

I don't mind the cl prefix, but I'd rather apply it consistently.


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