[llvm] r207301 - [X86] Implement TargetLowering::getScalingFactorCost hook.

Quentin Colombet qcolombet at apple.com
Fri Apr 25 19:11:32 PDT 2014


Hi Chandler,

What allocation means here (on a second thought that is not super clear) is the number of ports an instruction uses.

Regarding the benchmarks, the numbers are unchanged on the llvm test suite + specs.

In fact, this commit is just the first step toward performance improvements. Indeed, this hook is not yet sufficient to make LSR to prefer the addressing mode of the form 'reg'  compared to those of the form 'reg1 + reg2 * scale'.
Indeed, currently we still prefer 'reg1 + reg2 * scale' to 'reg', in many cases and in particular with scale = 1, which is wrong performance wise. I am working on fixing this.

With my current prototype, I see up to 30% speed up on small kernels.

Thanks,
-Quentin

Envoyé de mon iPhone

> Le 25 avr. 2014 à 18:23, Chandler Carruth <chandlerc at google.com> a écrit :
> 
> 
>> On Fri, Apr 25, 2014 at 6:11 PM, Quentin Colombet <qcolombet at apple.com> wrote:
>> [X86] Implement TargetLowering::getScalingFactorCost hook.
>> Scaling factors are not free on X86 because every "complex" addressing mode
>> breaks the related instruction into 2 allocations instead of 1.
> 
> I have no idea what you mean by "allocations" here.
> 
> Also, benchmarks?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140425/d107e650/attachment.html>


More information about the llvm-commits mailing list