[all-commits] [llvm/llvm-project] 944da4: [CIR][mlir] Use cached symbol tables for comdat lo...
Bruno Cardoso Lopes via All-commits
all-commits at lists.llvm.org
Fri Oct 2 11:03:23 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 944da4158b5347817aec787790219f42ab320801
https://github.com/llvm/llvm-project/commit/944da4158b5347817aec787790219f42ab320801
Author: Bruno Cardoso Lopes <bruno.cardoso at gmail.com>
Date: 2026-10-02 (Fri, 02 Oct 2026)
Changed paths:
M clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
Log Message:
-----------
[CIR][mlir] Use cached symbol tables for comdat lookups (#227127)
Every function or global with a comdat looked its selector up by name
with a linear scan of the comdat region, making CIR to LLVM lowering
quadratic in the number of comdats. This happened in three places:
- CIR's lowering of functions and globals: use the patterns' shared
SymbolTableCollection.
- The LLVM dialect comdat verifier, run on every function and global in
each verification: check the comdat in verifySymbolUses, which gets a
SymbolTableCollection.
- ModuleTranslation: use its existing SymbolTableCollection.
On the most expensive self-host TUs this cuts lowering from 30-96 s to
8-11 s and total compile time by 18-61%. Output is unchanged.
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