RFC? Moving `InitAll***` implementation into static library

InitAll*** functions are used by opt-style tools to init all MLIR dialects/passes/extensions. Currently they are implemeted as inline functions and include essentially the entire MLIR header tree. Each file which includes this header (~10 currently) can take 10+ sec and multiple GB of ram to compile (tested with clang-19), which limits amount of parallel compiler jobs which can be run. Also, flang just includes this file into one of its headers.

I propose to move actual implementation into static library, so it’s compiled only once.

Draft PR [mlir][core] Move `InitAll***` implementation into static library. by Hardcode84 · Pull Request #150805 · llvm/llvm-project · GitHub

8 Likes

This is a really good finding! Thanks :slight_smile: