[PATCH] LSR: Account for 2 foldable register in addressing mode if the target allows that.

Quentin Colombet qcolombet at apple.com
Fri May 31 10:21:34 PDT 2013


Thanks.

Committed in r183021.

-Quentin

On May 31, 2013, at 9:40 AM, Andrew Trick <atrick at apple.com> wrote:

> 
> On May 31, 2013, at 9:35 AM, Quentin Colombet <qcolombet at apple.com> wrote:
> 
>> <Mail Attachment>
>> On May 29, 2013, at 12:48 PM, Quentin Colombet <qcolombet at apple.com> wrote:
>> 
>>> Hi,
>>> 
>>> Here is a patch that modifies how the formulae are rated in Loop Strength Reduce.
>>> Namely, this patch checks if the target allows to fold more that one register in the addressing mode and if yes, adjusts the cost accordingly.
>>> 
>>> Prior to this patch, reg1 + scale * reg2 accesses were artificially preferred to reg1 + reg2 accesses. Indeed, the cost model wrongly assumed that reg1 + reg2 needs a temporary register for the computation, whereas it was correctly estimated for reg1 + scale * reg2.
>>> 
>>> This patch fixes that.
>>> 
>>> Thanks for the reviews.
> 
> LGTM.
> 
> Thanks!
> 
> -Andy

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130531/b7cf4899/attachment.html>


More information about the llvm-commits mailing list