History log of /external/llvm/include/llvm/Analysis/TargetTransformInfo.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cd81d94322a39503e4a3e87b6ee03d4fcb3465fb 21-Jul-2014 Stephen Hines <srhines@google.com> Update LLVM for rebase to r212749.

Includes a cherry-pick of:
r212948 - fixes a small issue with atomic calls

Change-Id: Ib97bd980b59f18142a69506400911a6009d9df18
/external/llvm/include/llvm/Analysis/TargetTransformInfo.h
dce4a407a24b04eebc6a376f8e62b41aaa7b071f 29-May-2014 Stephen Hines <srhines@google.com> Update LLVM for 3.5 rebase (r209712).

Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
/external/llvm/include/llvm/Analysis/TargetTransformInfo.h
36b56886974eae4f9c5ebc96befd3e7bfe5de338 24-Apr-2014 Stephen Hines <srhines@google.com> Update to LLVM 3.5a.

Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
/external/llvm/include/llvm/Analysis/TargetTransformInfo.h
135fe6ac5f5b80ef68c19b3ec7bb0063e28f2bab 22-Oct-2013 Benjamin Kramer <benny.kra@googlemail.com> Speling fixes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193165 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/TargetTransformInfo.h
65457b679ae240c1a37da82c5484dac478c47b6d 17-Sep-2013 Arnold Schwaighofer <aschwaighofer@apple.com> Costmodel: Add support for horizontal vector reductions

Upcoming SLP vectorization improvements will want to be able to estimate costs
of horizontal reductions. Add infrastructure to support this.

We model reductions as a series of (shufflevector,add) tuples ultimately
followed by an extractelement. For example, for an add-reduction of <4 x float>
we could generate the following sequence:

(v0, v1, v2, v3)
\ \ / /
\ \ /
+ +

(v0+v2, v1+v3, undef, undef)
\ /
((v0+v2) + (v1+v3), undef, undef)

%rdx.shuf = shufflevector <4 x float> %rdx, <4 x float> undef,
<4 x i32> <i32 2, i32 3, i32 undef, i32 undef>
%bin.rdx = fadd <4 x float> %rdx, %rdx.shuf
%rdx.shuf7 = shufflevector <4 x float> %bin.rdx, <4 x float> undef,
<4 x i32> <i32 1, i32 undef, i32 undef, i32 undef>
%bin.rdx8 = fadd <4 x float> %bin.rdx, %rdx.shuf7
%r = extractelement <4 x float> %bin.rdx8, i32 0

This commit adds a cost model interface "getReductionCost(Opcode, Ty, Pairwise)"
that will allow clients to ask for the cost of such a reduction (as backends
might generate more efficient code than the cost of the individual instructions
summed up). This interface is excercised by the CostModel analysis pass which
looks for reduction patterns like the one above - starting at extractelements -
and if it sees a matching sequence will call the cost model interface.

We will also support a second form of pairwise reduction that is well supported
on common architectures (haddps, vpadd, faddp).

(v0, v1, v2, v3)
\ / \ /
(v0+v1, v2+v3, undef, undef)
\ /
((v0+v1)+(v2+v3), undef, undef, undef)

%rdx.shuf.0.0 = shufflevector <4 x float> %rdx, <4 x float> undef,
<4 x i32> <i32 0, i32 2 , i32 undef, i32 undef>
%rdx.shuf.0.1 = shufflevector <4 x float> %rdx, <4 x float> undef,
<4 x i32> <i32 1, i32 3, i32 undef, i32 undef>
%bin.rdx.0 = fadd <4 x float> %rdx.shuf.0.0, %rdx.shuf.0.1
%rdx.shuf.1.0 = shufflevector <4 x float> %bin.rdx.0, <4 x float> undef,
<4 x i32> <i32 0, i32 undef, i32 undef, i32 undef>
%rdx.shuf.1.1 = shufflevector <4 x float> %bin.rdx.0, <4 x float> undef,
<4 x i32> <i32 1, i32 undef, i32 undef, i32 undef>
%bin.rdx.1 = fadd <4 x float> %rdx.shuf.1.0, %rdx.shuf.1.1
%r = extractelement <4 x float> %bin.rdx.1, i32 0

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190876 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/TargetTransformInfo.h
4f7e2c38e864d7eaeb407ac501478e9579624d1b 11-Sep-2013 Hal Finkel <hfinkel@anl.gov> Add getUnrollingPreferences to TTI

Allow targets to customize the default behavior of the generic loop unrolling
transformation. This will be used by the PowerPC backend when targeting the A2
core (which is in-order with a deep pipeline), and using more aggressive
defaults is important.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190542 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/TargetTransformInfo.h
f208398528efde82bc49f48d0fef0587c1f192bb 29-Aug-2013 Hal Finkel <hfinkel@anl.gov> Revert: r189565 - Add getUnrollingPreferences to TTI

Revert unintentional commit (of an unreviewed change).

Original commit message:

Add getUnrollingPreferences to TTI

Allow targets to customize the default behavior of the generic loop unrolling
transformation. This will be used by the PowerPC backend when targeting the A2
core (which is in-order with a deep pipeline), and using more aggressive
defaults is important.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189566 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/TargetTransformInfo.h
32f258b96a723b771eb44a2c0689b8bf4dd871ee 29-Aug-2013 Hal Finkel <hfinkel@anl.gov> Add getUnrollingPreferences to TTI

Allow targets to customize the default behavior of the generic loop unrolling
transformation. This will be used by the PowerPC backend when targeting the A2
core (which is in-order with a deep pipeline), and using more aggressive
defaults is important.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189565 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/TargetTransformInfo.h
a8a7099c1849fcbb4a68642a292fd0250aa46505 23-Aug-2013 Richard Sandiford <rsandifo@linux.vnet.ibm.com> Turn MipsOptimizeMathLibCalls into a target-independent scalar transform

...so that it can be used for z too. Most of the code is the same.
The only real change is to use TargetTransformInfo to test when a sqrt
instruction is available.

The pass is opt-in because at the moment it only handles sqrt.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189097 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/TargetTransformInfo.h
57e6b2d1f3de0bf459e96f7038e692d624f7e580 27-Jul-2013 Tom Stellard <thomas.stellard@amd.com> SimplifyCFG: Use parallel-and and parallel-or mode to consolidate branch conditions

Merge consecutive if-regions if they contain identical statements.
Both transformations reduce number of branches. The transformation
is guarded by a target-hook, and is currently enabled only for +R600,
but the correctness has been tested on X86 target using a variety of
CPU benchmarks.

Patch by: Mei Ye

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187278 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/TargetTransformInfo.h
c0a11edba6ea46c782672ab3fb4e4ab3dc267a22 12-Jul-2013 Arnold Schwaighofer <aschwaighofer@apple.com> TargetTransformInfo: address calculation parameter for gather/scather

Address calculation for gather/scather in vectorized code can incur a
significant cost making vectorization unbeneficial. Add infrastructure to add
cost.
Tests and cost model for targets will be in follow-up commits.

radar://14351991

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186187 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/TargetTransformInfo.h
06f5ebc5a1604b01689cf2d482dd05f956538af6 31-May-2013 Quentin Colombet <qcolombet@apple.com> Loop Strength Reduce: Scaling factor cost.

Account for the cost of scaling factor in Loop Strength Reduce when rating the
formulae. This uses a target hook.

The default implementation of the hook is: if the addressing mode is legal, the
scaling factor is free.

<rdar://problem/13806271>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183045 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/TargetTransformInfo.h
6bf4f676413b8f7d97aaff289997aab344180957 05-Apr-2013 Arnold Schwaighofer <aschwaighofer@apple.com> CostModel: Add parameter to instruction cost to further classify operand values

On certain architectures we can support efficient vectorized version of
instructions if the operand value is uniform (splat) or a constant scalar.
An example of this is a vector shift on x86.

We can efficiently support

for (i = 0 ; i < ; i += 4)
w[0:3] = v[0:3] << <2, 2, 2, 2>

but not

for (i = 0; i < ; i += 4)
w[0:3] = v[0:3] << x[0:3]

This patch adds a parameter to getArithmeticInstrCost to further qualify operand
values as uniform or uniform constant.

Targets can then choose to return a different cost for instructions with such
operand values.

A follow-up commit will test this feature on x86.

radar://13576547

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178807 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/TargetTransformInfo.h
e939a066c85a21e86d32e0a57fd16f4188576633 10-Mar-2013 Jakub Staszak <kubastaszak@gmail.com> Remove unneeded #includes. Use forward declarations instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/TargetTransformInfo.h
f84606732c76899af54c295ec987c96c88452747 05-Mar-2013 Jakub Staszak <kubastaszak@gmail.com> Fix a few typos in comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176519 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/TargetTransformInfo.h
fb55a8fd7c38aa09d9c243d48a8a72d890f36a3d 08-Feb-2013 Arnold Schwaighofer <aschwaighofer@apple.com> 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174713 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/TargetTransformInfo.h
13086a658ae06046ded902229f9918b8bad505bd 22-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Begin fleshing out an interface in TTI for modelling the costs of
generic function calls and intrinsics. This is somewhat overlapping with
an existing intrinsic cost method, but that one seems targetted at
vector intrinsics. I'll merge them or separate their names and use cases
in a separate commit.

This sinks the test of 'callIsSmall' down into TTI where targets can
control it. The whole thing feels very hack-ish to me though. I've left
a FIXME comment about the fundamental design problem this presents. It
isn't yet clear to me what the users of this function *really* care
about. I'll have to do more analysis to figure that out. Putting this
here at least provides it access to proper analysis pass tools and other
such. It also allows us to more cleanly implement the baseline cost
interfaces in TTI.

With this commit, it is now theoretically possible to simplify much of
the inline cost analysis's handling of calls by calling through to this
interface. That conversion will have to happen in subsequent commits as
it requires more extensive restructuring of the inline cost analysis.

The CodeMetrics class is now really only in the business of running over
a block of code and aggregating the metrics on that block of code, with
the actual cost evaluation done entirely in terms of TTI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173148 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/TargetTransformInfo.h
c61aa59bcc62019b8e31fcbb3582255be3a63052 21-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Remove the comma from the last enumerator to fix -pedantic warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172999 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/TargetTransformInfo.h
1e05bd9e714934a71ff933ad15f0b884808b405f 21-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Introduce a generic interface for querying an operation's expected
lowered cost.

Currently, this is a direct port of the logic implementing
isInstructionFree in CodeMetrics. The hope is that the interface can be
improved (f.ex. supporting un-formed instruction queries) and the
implementation abstracted so that as we have test cases and target
knowledge we can expose increasingly accurate heuristics to clients.

I'll start switching existing consumers over and kill off the routine in
CodeMetrics in subsequent commits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172998 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/TargetTransformInfo.h
053a2119835ac6ca3484f1b496cabd43c37e4279 20-Jan-2013 Renato Golin <renato.golin@linaro.org> Revert CostTable algorithm, will re-write

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/TargetTransformInfo.h
90230c84668269fbd53d163e398cd16486d5d414 19-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Sort all of the includes. Several files got checked in with mis-sorted
includes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172891 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/TargetTransformInfo.h
d3c965d6251e6d939f7797f8704d4e3a82f7e274 16-Jan-2013 Renato Golin <renato.golin@linaro.org> Change CostTable model to be global to all targets

Moving the X86CostTable to a common place, so that other back-ends
can share the code. Also simplifying it a bit and commoning up
tables with one and two types on operations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172658 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/TargetTransformInfo.h
674be02d525d4e24bc6943ed9274958c580bcfbc 10-Jan-2013 Jakub Staszak <kubastaszak@gmail.com> Fix include guards so they exactly match file names.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172025 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/TargetTransformInfo.h
14925e6b885f8bd8cf448627386d412831f4bf1b 09-Jan-2013 Nadav Rotem <nrotem@apple.com> ARM Cost model: Use the size of vector registers and widest vectorizable instruction to determine the max vectorization factor.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172010 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/TargetTransformInfo.h
83be7b0dd3ae9a3cb22d36ae4c1775972553b94b 09-Jan-2013 Nadav Rotem <nrotem@apple.com> Cost Model: Move the 'max unroll factor' variable to the TTI and add initial Cost Model support on ARM.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171928 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/TargetTransformInfo.h
bb00800ff46e7a2a628d0a6741a7f0422c74c198 07-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Fix the enumerator names for ShuffleKind to match tho coding standards,
and make its comments doxygen comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171688 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/TargetTransformInfo.h
d1b8ef97c47d347f2a2261a0d6de4872f248321f 07-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Make the popcnt support enums and methods have more clear names and
follow the conding conventions regarding enumerating a set of "kinds" of
things.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171687 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/TargetTransformInfo.h
be04929f7fd76a921540e9901f24563e51dc1219 07-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Move TargetTransformInfo to live under the Analysis library. This no
longer would violate any dependency layering and it is in fact an
analysis. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171686 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/include/llvm/Analysis/TargetTransformInfo.h