Currently if an operation requires additional verification, it specifies an inline
code block (let verifier = "blah"). This is quite problematic for various reasons, e.g.
it requires defining C++ inside of Tablegen which is discouraged when possible, but mainly because
nearly all usages simply forward to a static function static LogicalResult verify(SomeOp op).
This commit adds support for a hasVerifier bit field that specifies if an additional verifier
is needed, and when set to 1 declares a LogicalResult verify() method for operations to
override. For migration purposes, the existing behavior is untouched. Upstream usages will
be replaced in a followup to keep this patch focused on the hasVerifier implementation.
One main user facing change is that what was once MyOp::verify is now MyOp::verifyInvariants.
This better matches the name this method is called everywhere else, and also frees up verify for
the user defined additional verification. The verify function when generated now (for additional
verification) is private to the operation class, which should also help avoid accidental usages after
this switch.
The comment can be misleading for this now.