diff options
author | jeanPerier <jperier@nvidia.com> | 2024-04-02 14:29:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-02 14:29:29 +0200 |
commit | a4798bb0b67533b37d6b34fd5292714aac3b17d9 (patch) | |
tree | 4c2aba998e0b1ffdce015955f0bad3ba86646e1b /clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | |
parent | 2950283dddab03c183c1be2d7de9d4999cc86131 (diff) | |
download | llvm-a4798bb0b67533b37d6b34fd5292714aac3b17d9.zip llvm-a4798bb0b67533b37d6b34fd5292714aac3b17d9.tar.gz llvm-a4798bb0b67533b37d6b34fd5292714aac3b17d9.tar.bz2 |
[flang][NFC] use mlir::SymbolTable in lowering (#86673)
Whenever lowering is checking if a function or global already exists in
the mlir::Module, it was doing module->lookup.
On big programs (~5000 globals and functions), this causes important
slowdowns because these lookups are linear. Use mlir::SymbolTable to
speed-up these lookups. The SymbolTable has to be created from the
ModuleOp and maintained in sync. It is therefore placed in the
converter, and FirOPBuilders can take a pointer to it to speed-up the
lookups.
This patch does not bring mlir::SymbolTable to FIR/HLFIR passes, but
some passes creating a lot of runtime calls could benefit from it too.
More analysis will be needed.
As an example of the speed-ups, this patch speeds-up compilation of
Whizard compare_amplitude_UFO.F90 from 5 mins to 2 mins on my machine
(there is still room for speed-ups).
Diffstat (limited to 'clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions