[PATCH] D17652: [CGP] Duplicate addressing computation in cold paths if required to sink addressing mode

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 2 16:12:21 PST 2016


reames added a comment.

In http://reviews.llvm.org/D17652#364797, @davidxl wrote:

> A general problem I see in address sinking optimization is the lack of global cost analysis -- the analysis should consider
>
> 1. the cost of the folded instruction (if the address can be folded in)
> 2. whether the original address instruction can be eliminated (for instance, only sunk into some of the uses)
> 3. if the address can not be folded, what is the additional cost
> 4. what is the estimated register pressure reduction with the address sinking


I'm confused by your comment.  Are you talking about my changes, or the existing code?  The existing code does most of this (except 1) and my extension preserves all of that except when duplicating into a cold call.

> The above should be all weighted with the block frequency information.


While I agree, that's a separate change - particularly since CFG does not currently use profiling info at all.


http://reviews.llvm.org/D17652





More information about the llvm-commits mailing list