[PATCH] D16300: Enable LoopLoadElimination by default
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 27 16:58:38 PST 2016
On 01/22/2016 12:16 PM, Adam Nemet wrote:
> anemet added a comment.
> It seems to me that partial redundancy means slightly different things between GVN Load-PRE and LLE.
I think that terminology wise, we actually mean the same thing by
"partially redundant". We mean there's one or more paths where it
wasn't previously available where we need to make it available to remove
the load candidate. The difference is what subset of possible partially
redundant cases each one handles.
(The preceding is probably a nit, just getting terminology clear.)
> In LLE, a load is partially redundant, if the forwarding store does not dominate all the loop latches. To make it fully redundant we would have to add loads on the unavailable paths.
> I think that in GVN, the loopy case is always considered a partial redundancy case because you'd have to insert a load in the preheader. Let me know if I am getting this wrong.
This is likely to be true.
> So it seems to me that the LLE partial redundancy case is equivalent to the case in GVN Load-PRE when we need *more than one* load inserted.
This seems reasonable, but note that we currently only insert a single
load when doing Load-PRE in GVN. This is a heuristic/profitability
decision, not a legality one.
> Does this make sense?
More information about the llvm-commits