[llvm] r174713 - ARM cost model: Address computation in vector mem ops not free

Arnold Schwaighofer aschwaighofer at apple.com
Fri Feb 8 09:20:55 PST 2013


On Feb 8, 2013, at 10:58 AM, Hal Finkel <hfinkel at anl.gov> wrote:

> ----- Original Message -----
>> From: "Arnold Schwaighofer" <aschwaighofer at apple.com>
>> To: llvm-commits at cs.uiuc.edu
>> Sent: Friday, February 8, 2013 8:50:48 AM
>> Subject: [llvm] r174713 - ARM cost model: Address computation in vector mem	ops not free
>> 
>> Author: arnolds
>> Date: Fri Feb  8 08:50:48 2013
>> New Revision: 174713
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=174713&view=rev
>> Log:
>> ARM cost model: Address computation in vector mem ops not free
>> 
>> Adds a function to target transform info to query for the cost of
>> address
>> computation. The cost model analysis pass now also queries this
>> interface.
>> The code in LoopVectorize adds the cost of address computation as
>> part of the
>> memory instruction cost calculation. Only there, we know whether the
>> instruction
>> will be scalarized or not.
>> Increase the penality for inserting in to D registers on swift. This
>> becomes
>> necessary because we now always assume that address computation has a
>> cost and
>> three is a closer value to the architecture.
>> 
>> radar://13097204
> 
> It looks like, for all uses in the loop vectorizer, this addressing code is just added to the memory operation cost. That being the case, why not just do that addition within the cost model?

You are right, the way it is there is no difference than adding the cost to the memory operation cost it is just being more explicit in the API.





More information about the llvm-commits mailing list