[all-commits] [llvm/llvm-project] ce7703: [Verifier] Parallelize verification and dom checki...

Chris Lattner via All-commits all-commits at lists.llvm.org
Mon Jun 14 10:03:30 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ce77039596a9bfb9f1649455ef4f26aeada2ee8c
      https://github.com/llvm/llvm-project/commit/ce77039596a9bfb9f1649455ef4f26aeada2ee8c
  Author: Chris Lattner <clattner at nondot.org>
  Date:   2021-06-14 (Mon, 14 Jun 2021)

  Changed paths:
    M mlir/lib/IR/Verifier.cpp

  Log Message:
  -----------
  [Verifier] Parallelize verification and dom checking.  NFC.

This changes the outer verification loop to not recurse into
IsolatedFromAbove operations - instead return them up to a place
where a parallel for loop can process them all in parallel.  This
also changes Dominance checking to happen on IsolatedFromAbove
chunks of the region tree, which makes it easy to fold operation
and dominance verification into a single simple parallel regime.

This speeds up firtool in CIRCT from ~40s to 31s on a large
testcase in -verify-each mode (the default).  The .fir parser and
module passes in particular benefit from this - FModule passes
(roughly analogous to function passes) were already running the
verifier in parallel as part of the pass manager.  This allows
the whole-module passes to verify their enclosed functions /
FModules in parallel.

-verify-each mode is still faster (26.3s on the same testcase),
but we do expect the verifier to take *some* time.

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




More information about the All-commits mailing list