[llvm] [GVN][PGO] Skip GVN if entry BlockFreq is 0 (PR #166336)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 7 06:19:10 PST 2025
rightrotate wrote:
> The problem is that this is papering over the issue in a way that might benefit some specific users, but still leaves it for everyone else (especially as this is behind a flag). _Everyone_ will be better off if the problematic case can be addressed directly.
>
> Is it possible to share any test cases that exhibit the compile time issue this PR is trying to address?
>
> At this point it's mainly not clear to me that it's really impossible (with reasonable effort) to fix this in a way that does not rely on PGO plus an internal option.
Unfortunately, I can't share the test case as it comes from a customer. However, I can share the nature of the file. It is a very large file, has 1000+ entrypoints called by another module. However, in one invocation, exactly one entry point is run. However, GVN and other passes are run on other entry points too, thus burning compile-time. We have seen that GVN is in top 3 in our profiling. This patch would allow us to skip the problematic pass and give us some breathing space. It may be possible to tune, but that will invite other issues like regression in unknown benchmarks, and thus tuning for just one case is what we want.
I still think having such an option would help us, thus, please allow it.
https://github.com/llvm/llvm-project/pull/166336
More information about the llvm-commits
mailing list