diff options
author | Matthias Springer <me@m-sp.org> | 2024-12-13 11:26:12 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-13 11:26:12 +0100 |
commit | 79f41434460d3305c889a6483ea59f1e3ea19b5a (patch) | |
tree | d2eef25398c920ab85cb1cdac2f66c36f68fe4f0 /clang/unittests/Frontend/CompilerInvocationTest.cpp | |
parent | 473e2518e850598feae62916ebef4b4dbc88a0ee (diff) | |
download | llvm-79f41434460d3305c889a6483ea59f1e3ea19b5a.zip llvm-79f41434460d3305c889a6483ea59f1e3ea19b5a.tar.gz llvm-79f41434460d3305c889a6483ea59f1e3ea19b5a.tar.bz2 |
[mlir][Transforms] Dialect conversion: Move `hasRewrite` to expensive checks (#119848)
The dialect conversion has various checks that detect incorrect API
usage in patterns. One of these checks turned out to be quite expensive
(N*M complexity where N is the number of block rewrites and M is the
total number of rewrites) in NVIDIA-internal workloads: Checking that a
block is not converted multiple times.
This check iterates over the stack of all rewrites, which can be large.
We saw `hasRewrite` being called around 45000 times with an average
rewrite stack size of 500000.
This PR moves the check to `MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS`.
For consistency reasons, the other `hasRewrite`-based check is also
moved there.
Diffstat (limited to 'clang/unittests/Frontend/CompilerInvocationTest.cpp')
0 files changed, 0 insertions, 0 deletions