[all-commits] [llvm/llvm-project] f0c22c: [Verifier] Tidy up the code a bit, NFC.
Chris Lattner via All-commits
all-commits at lists.llvm.org
Mon Apr 26 11:54:25 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f0c22c3d584c5f335b2457b6f9c2723ebdcfa06e
https://github.com/llvm/llvm-project/commit/f0c22c3d584c5f335b2457b6f9c2723ebdcfa06e
Author: Chris Lattner <clattner at nondot.org>
Date: 2021-04-26 (Mon, 26 Apr 2021)
Changed paths:
M mlir/lib/IR/Verifier.cpp
Log Message:
-----------
[Verifier] Tidy up the code a bit, NFC.
This tidies up the code a bit:
* Eliminate the ctx member, which doesn't need to be stored.
* Rename verify(Operation) to make it more clear that it is
doing more than verifyOperation and that the dominance check
isn't being done multiple times.
* Rename mayNotHaveTerminator which was confusing about whether
it wasn't known whether it had a terminator, when it is really
about whether it is legal to have a terminator.
* Some minor optimizations: don't check for RegionKindInterface
if there are no regions. Don't do two passes over the
operations in a block in OperationVerifier::verifyDominance when
one will do.
The optimizations are actually a measurable (but minor) win in some
CIRCT cases.
Differential Revision: https://reviews.llvm.org/D101267
More information about the All-commits
mailing list