[all-commits] [llvm/llvm-project] bde21b: [Verifier] Significantly speed up IsolatedFromAbov...

Chris Lattner via All-commits all-commits at lists.llvm.org
Fri May 28 16:14:00 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bde21b624585255dbd28c0bc0e93d37045b5a9a9
      https://github.com/llvm/llvm-project/commit/bde21b624585255dbd28c0bc0e93d37045b5a9a9
  Author: Chris Lattner <clattner at nondot.org>
  Date:   2021-05-28 (Fri, 28 May 2021)

  Changed paths:
    M mlir/include/mlir/IR/OpDefinition.h
    M mlir/include/mlir/IR/Region.h
    M mlir/lib/IR/Operation.cpp
    M mlir/lib/IR/Region.cpp

  Log Message:
  -----------
  [Verifier] Significantly speed up IsolatedFromAbove checking. NFC.

The implementation had a couple of problems, including checking
"isProperAncestor" in an inefficient way.  It also recursed into
other "isolated from above" ops.  In the case of CIRCT, we get
three levels of isolated ops:

  mlir::ModuleOp
    firrtl::CircuitOp
       firrtl::FModuleOp

The verification for module would recurse into the circuits and
fmodules checking them.  The verifier hook for circuit would
recurse into all the modules reverifying them, fmoduleop would
then reverify them.  The same happens for mlir::ModuleOp and Func.

While here, fix an old design problem: IsolatedFromAbove checking
was implemented by a method on the Region class, which isn't
actually general and isn't used by anything else.  Move it over
to be a trait impl verifier method like the others and specialize
it for its task.

Differential Revision: https://reviews.llvm.org/D103345




More information about the All-commits mailing list