llvm-project/flang/tools
River Riddle 42e5f1d97b [mlir] Refactor how additional verification is specified in ODS
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 one `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.

Differential Revision: https://reviews.llvm.org/D118742
2022-02-02 13:34:28 -08:00
..
bbc [flang] Fix/work around warnings from GCC 11 2022-02-01 11:54:04 -08:00
f18 [flang] Get rid of code duplication in wrapper. Fix checking of undefined variables. 2022-01-26 11:42:03 +03:00
f18-parse-demo [flang] Produce proper "preprocessor output" for -E option 2021-07-30 15:13:56 -07:00
fir-opt [fir] Clean up InitFIR.h 2021-10-11 15:41:50 +02:00
flang-driver [flang] Use `GNUInstallDirs` to support custom installation dirs. 2021-12-31 18:58:35 +00:00
tco [mlir] Refactor how additional verification is specified in ODS 2022-02-02 13:34:28 -08:00
.clang-tidy [flang] Add clang-tidy check for braces around if 2021-06-16 09:13:53 +00:00
CMakeLists.txt [flang] Initial lowering for empty program 2022-01-28 22:39:58 +01:00