[PATCH] LSR: Account for 2 foldable register in addressing mode if the target allows that.
Andrew Trick
atrick at apple.com
Fri May 31 09:40:14 PDT 2013
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/4e267676/attachment.html>
More information about the llvm-commits
mailing list