[all-commits] [llvm/llvm-project] 2a7438: [Flang][CMake] Limit MLIR dependencies to register...
Mehdi Amini via All-commits
all-commits at lists.llvm.org
Mon Sep 7 13:23:10 PDT 2026
Branch: refs/heads/users/mamini/flang-minimize-mlir-dependencies
Home: https://github.com/llvm/llvm-project
Commit: 2a7438d12626e139da623f4b6132fa20bb803352
https://github.com/llvm/llvm-project/commit/2a7438d12626e139da623f4b6132fa20bb803352
Author: Mehdi Amini <joker.eph at gmail.com>
Date: 2026-09-07 (Mon, 07 Sep 2026)
Changed paths:
M flang/CMakeLists.txt
M flang/include/flang/Optimizer/Support/InitFIR.h
M flang/lib/Frontend/CMakeLists.txt
M flang/lib/Lower/CMakeLists.txt
M flang/lib/Optimizer/Builder/CMakeLists.txt
M flang/lib/Optimizer/Dialect/Support/CMakeLists.txt
M flang/lib/Optimizer/HLFIR/IR/CMakeLists.txt
M flang/lib/Optimizer/HLFIR/Transforms/CMakeLists.txt
M flang/lib/Optimizer/OpenACC/Support/CMakeLists.txt
M flang/lib/Optimizer/OpenMP/CMakeLists.txt
M flang/lib/Optimizer/OpenMP/Support/CMakeLists.txt
M flang/lib/Optimizer/Passes/CMakeLists.txt
M flang/lib/Optimizer/Support/CMakeLists.txt
M flang/test/lib/Analysis/AliasAnalysis/CMakeLists.txt
M flang/tools/bbc/CMakeLists.txt
M flang/tools/fir-lsp-server/CMakeLists.txt
M flang/tools/fir-opt/CMakeLists.txt
M flang/tools/tco/CMakeLists.txt
M flang/unittests/Optimizer/CMakeLists.txt
Log Message:
-----------
[Flang][CMake] Limit MLIR dependencies to registered dialects
Flang currently consumes MLIR_DIALECT_LIBS and MLIR_EXTENSION_LIBS in many
libraries and tools. These global collections include every configured MLIR
dialect and extension, including test-only components when MLIR tests are
available.
Define Flang-specific dialect and extension lists matching the registry in
InitFIR.h, and use them in place of the global collections. Remove the unused
InitAllDialects include and register-all libraries. List MemRef explicitly for
fir-opt's additional registration.
For a dependency-only MLIR configuration with tests enabled, archives reachable
from Ninja all fall from 500 to 355. The libMLIR*.a subset falls from 317 to
172, and Ninja dry-run edges fall from 6,969 to 6,493.
Validation:
- Configured Flang with dependency-only MLIR, with and without tests.
- Configured Flang and MLIR explicitly with tests.
- Configured standalone Flang against LLVM, MLIR, and Clang packages.
- Verified Ninja all graphs and dry-run edge counts without rebuilding.
Assisted-by: Codex
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list