[flang][NFC] speedup BoxedProcedure for derived types with many components (#86144)
This patch speeds up the compilation time of the example in https://github.com/llvm/llvm-project/issues/76478#issuecomment-2011023289 from 2 minutes with my builds to about 2 seconds. MLIR timers showed more than 98% of the time was spend in BoxedProcedure trying to figure out if a type needs to be converted. This is because walking the fir.type members is very expansive for types containing many components and/or components with many sub-components. Increase the caching time of visited types from "the type being visited" to "the whole pass". Use DenseMap since it is not ok anymore to assume this container will only have a few elements.
parent
f0eb9083
Please register or sign in to comment