[all-commits] [llvm/llvm-project] 5fdf8c: [mlir][Transforms] `GreedyPatternRewriteDriver`: H...
Matthias Springer via All-commits
all-commits at lists.llvm.org
Thu Feb 1 00:21:34 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5fdf8c6faaa572d6c5e58d5c16d3b1e62782f7c4
https://github.com/llvm/llvm-project/commit/5fdf8c6faaa572d6c5e58d5c16d3b1e62782f7c4
Author: Matthias Springer <me at m-sp.org>
Date: 2024-02-01 (Thu, 01 Feb 2024)
Changed paths:
M mlir/include/mlir/IR/OperationSupport.h
M mlir/lib/IR/OperationSupport.cpp
M mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
Log Message:
-----------
[mlir][Transforms] `GreedyPatternRewriteDriver`: Hash ops separately (#78312)
The greedy pattern rewrite driver has multiple "expensive checks" to
detect invalid rewrite pattern API usage. As part of these checks, it
computes fingerprints for every op that is in scope, and compares the
fingerprints before and after an attempted pattern application.
Until now, each computed fingerprint took into account all nested
operations. That is quite expensive because it walks the entire IR
subtree. It is also redundant in the expensive checks because we already
compute a fingerprint for every op.
This commit significantly improves the running time of the "expensive
checks" in the greedy pattern rewrite driver.
More information about the All-commits
mailing list