[llvm] [IR] Use block numbers in PredIteratorCache (PR #101885)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 4 07:55:20 PDT 2024
nikic wrote:
> I have no statistics about the PIC users, but I think that they probe >5% of the basic blocks of a function is a somewhat reasonable assumption?
Not really. For example LCSSA formation uses PredIterCache for exit blocks, so it probably usually only has one entry when forming LCSSA for a single loop? It could be pushed to a higher level and be used for e.g. full recursive LCSSA formation, but that's how it is right now. The use in scalar promotion is for all loop blocks using a pointer, which may also only be tiny fraction of all blocks.
The data does suggest that it does work out fine on average, but I'm concerned about degenerate cases.
https://github.com/llvm/llvm-project/pull/101885
More information about the llvm-commits
mailing list