[Mlir-commits] [mlir] [MLIR][spirv] Shard generated operation definitions (NFC) (PR #221811)

Mehdi Amini llvmlistbot at llvm.org
Mon Sep 7 12:48:10 PDT 2026


joker-eph wrote:

FYI, here are some stats:

The baseline had two generated-code hotspots. SPIRVOpDefinition.cpp took an 87.714s Ninja edge and 87.302s ExecuteCompiler, including 25.794s frontend and 61.232s backend. SPIRVDialect.cpp took an 84.334s Ninja edge and 83.921s ExecuteCompiler, including 38.294s frontend and 44.996s backend.

Together the baseline TUs totaled 171.223s ExecuteCompiler, 64.088s frontend, 106.227s backend, 61.542s optimizer, 44.534s code generation, 30.043s function instantiation, 16.321s class instantiation, 27.690s source processing, and 11.651s class parsing.

The eight shards plus the remaining dialect and helper TUs totaled 129.831s ExecuteCompiler, 75.478s frontend, 53.463s backend, 32.319s optimizer, 21.070s code generation, 21.471s function instantiation, 22.085s class instantiation, 52.613s source processing, and 36.961s class parsing. The slowest new compile edge was 15.987s.

Aggregate compiler time fell 24.2%, backend time fell 49.7%, optimizer time fell 47.5%, code-generation time fell 52.7%, and function-instantiation time fell 28.5%. The longest compile edge fell 81.8%. Repeated work increased frontend time 17.8%, class-instantiation time 35.3%, source-processing time 90.0%, and class-parsing time 217.2%.

The affected-target build ran 36 steps in 25.72s wall time, including 3.5s of CMake configuration and 4.2s of generation. It used 212.12s user time and 12.47s system time at 873% CPU, with 945,124 KiB peak RSS and zero swaps. The public generated-header change also rebuilt 18 otherwise unchanged SPIR-V implementation TUs, so this wall time is not limited to the ten measured TUs.

The two baseline objects contained 9,312,757 text bytes; the remaining dialect and helper objects plus eight shard objects contain 10,062,118 text bytes, an increase of 8.0%. The static archive grew from 47,932,124 to 49,655,616 bytes, an increase of 3.6%.

Rebuilding mlir-opt and running six focused suites took 30.57s wall time, 572.23s user time, and 47.65s system time at 2,027% CPU, with 1,634,280 KiB peak RSS and zero swaps. The suites ran 15 tests in 0.14s, 23 in 0.16s, 52 in 0.28s, 36 in 0.25s, 12 in 0.17s, and 59 in 0.26s; all 197 tests passed.

The full check-mlir invocation took 6.34s wall time, 1.52s user time, and 0.35s system time at 29% CPU, with 175,504 KiB peak RSS and zero swaps. Its lit suite ran in 5.52s with 3,937 passed, 619 unsupported, and 1 expected failure.


https://github.com/llvm/llvm-project/pull/221811


More information about the Mlir-commits mailing list