[llvm] [GVN] Permit load PRE to happen in more cases (PR #76063)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 20 08:17:08 PST 2023


nikic wrote:

> > Your new check says that instead we can insert an arbitrary number of loads in unavailable predecessors, as long as there is at least one available load (and we don't have to split more than one critical edge). This is not a reasonable heuristic.
> 
> Fair enough! But I would like to fix the problem highlighted in test7a, which is definitely blocked by this check. Given the potential performance gains, I'd still like to pursue this and I'm happy to do more detailed analysis. What would you consider a reasonable heuristic?

You should start by trying to understand why GVN does not recognize the available load in that test case. It probably has something to do with the the fact that one block contains two available loads for different phi translated pointers.

https://github.com/llvm/llvm-project/pull/76063


More information about the llvm-commits mailing list