History log of /external/llvm/lib/CodeGen/Analysis.cpp
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/lib/CodeGen/Analysis.cpp
dce4a407a24b04eebc6a376f8e62b41aaa7b071f 29-May-2014 Stephen Hines <srhines@google.com> Update LLVM for 3.5 rebase (r209712).

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

Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
/external/llvm/lib/CodeGen/Analysis.cpp
9d6852cf98dd1e6a939b3469ea49ff7cbc15ad73 20-Aug-2013 Michael Gottesman <mgottesman@apple.com> [stackprotector] Refactor out the end of isInTailCallPosition into the function returnTypeIsEligibleForTailCall.

This allows me to use returnTypeIsEligibleForTailCall in the stack protector pass.

rdar://13935163

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188765 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
6a4e44f0de6e59d4458e3795c765a9001ba1b87f 12-Aug-2013 Tim Northover <tnorthover@apple.com> Allow compatible extension attributes for tail calls

If the tail-callee and caller give the same bits via the same signext/zeroext
attribute then a tail-call should be allowed, since the extension has already
been done by the callee.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188159 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
b0e8d37240835c68357be061de5f2e5fb69dd7ac 09-Aug-2013 Benjamin Kramer <benny.kra@googlemail.com> Make helper static and fix formatting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
d113448c1dd5f40522c3c02db96e87a9eb59eaf4 06-Aug-2013 Tim Northover <tnorthover@apple.com> Refactor isInTailCallPosition handling

This change came about primarily because of two issues in the existing code.
Niether of:

define i64 @test1(i64 %val) {
%in = trunc i64 %val to i32
tail call i32 @ret32(i32 returned %in)
ret i64 %val
}

define i64 @test2(i64 %val) {
tail call i32 @ret32(i32 returned undef)
ret i32 42
}

should be tail calls, and the function sameNoopInput is responsible. The main
problem is that it is completely symmetric in the "tail call" and "ret" value,
but in reality different things are allowed on each side.

For these cases:
1. Any truncation should lead to a larger value being generated by "tail call"
than needed by "ret".
2. Undef should only be allowed as a source for ret, not as a result of the
call.

Along the way I noticed that a mismatch between what this function treats as a
valid truncation and what the backends see can lead to invalid calls as well
(see x86-32 test case).

This patch refactors the code so that instead of being based primarily on
values which it recurses into when necessary, it starts by inspecting the type
and considers each fundamental slot that the backend will see in turn. For
example, given a pathological function that returned {{}, {{}, i32, {}}, i32}
we would consider each "real" i32 in turn, and ask if it passes through
unchanged. This is much closer to what the backend sees as a result of
ComputeValueVTs.

Aside from the bug fixes, this eliminates the recursion that's going on and, I
believe, makes the bulk of the code significantly easier to understand. The
trade-off is the nasty iterators needed to find the real types inside a
returned value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187787 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
9cb1685158f690d80a02819fff9ea2aed2feae87 22-Jul-2013 Michael Gottesman <mgottesman@apple.com> [stackprotector] Changed isNoopBitcast/sameNoopInput to take TargetLoweringBase instead of TargetLowering.

Both functions only use functionality from TargetLoweringBase.

rdar://13935163

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186874 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
3484da9479a4daff3efc7febe004e1f4d69b3b4a 01-May-2013 Stephen Lin <stephenwlin@gmail.com> Only pass 'returned' to target-specific lowering code when the value of entire register is guaranteed to be preserved.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180825 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
13aba14eb5c643234f5d756b94f30afb28f8cd5d 23-Apr-2013 Stephen Lin <stephenwlin@gmail.com> Add some constraints to use of 'returned':

1) Disallow 'returned' on parameter that is also 'sret' (no sensible semantics, as far as I can tell).
2) Conservatively disallow tail calls through 'returned' parameters that also are 'zext' or 'sext' (for consistency with treatment of other zero-extending and sign-extending operations in tail call position detection...can be revised later to handle situations that can be determined to be safe).

This is a new attribute that is not yet used, so there is no impact.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180118 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
456ca048af35163b9f52187e92a23ee0a9f059e8 20-Apr-2013 Stephen Lin <stephenwlin@gmail.com> Add CodeGen support for functions that always return arguments via a new parameter attribute 'returned', which is taken advantage of in target-independent tail call opportunity detection and in ARM call lowering (when placed on an integral first parameter).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179925 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
5c34e08b9fff9d4df2421e4f41ff15b85f638dd1 20-Apr-2013 Stephen Lin <stephenwlin@gmail.com> Allow tail call opportunity detection through nested and/or multiple iterations of extractelement/insertelement indirection


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
69d37fa6351d5fe2a97ea24a2d0d667a92f14a9c 05-Mar-2013 Bill Wendling <isanbard@gmail.com> Remove unused #includes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
1a17bd21ff64968817dedb6cd2b7c809cee90804 18-Jan-2013 Bill Wendling <isanbard@gmail.com> Remove unused parameter. Also use the AttributeSet query methods instead of the Attribute query methods.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
40b2c32475572d33ede7cf202f2d49cab9b43bb4 08-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Sink a function that refers to the SelectionDAG into that library in the
one file where it is called as a static function. Nuke the declaration
and the definition in lib/CodeGen, along with the include of
SelectionDAG.h from this file.

There is no dependency edge from lib/CodeGen to
lib/CodeGen/SelectionDAG, so it isn't valid for a routine in lib/CodeGen
to reference the DAG. There is a dependency from
lib/CodeGen/SelectionDAG on lib/CodeGen. This breaks one violation of
this layering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171842 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
0b8c9a80f20772c3793201ab5b251d3520b9cea3 02-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Move all of the header files which are involved in modelling the LLVM IR
into their new header subdirectory: include/llvm/IR. This matches the
directory structure of lib, and begins to correct a long standing point
of file layout clutter in LLVM.

There are still more header files to move here, but I wanted to handle
them in separate commits to make tracking what files make sense at each
layer easier.

The only really questionable files here are the target intrinsic
tablegen files. But that's a battle I'd rather not fight today.

I've updated both CMake and Makefile build systems (I think, and my
tests think, but I may have missed something).

I've also re-sorted the includes throughout the project. I'll be
committing updates to Clang, DragonEgg, and Polly momentarily.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
034b94b17006f51722886b0f2283fb6fb19aca1f 19-Dec-2012 Bill Wendling <isanbard@gmail.com> Rename the 'Attributes' class to 'Attribute'. It's going to represent a single attribute in the future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170502 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
d04a8d4b33ff316ca4cf961e06c9e312eff8e64f 03-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Use the new script to sort the includes of every file under lib.

Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module
include to be the nearest plausible thing I could find. If you own or
care about any of these source files, I encourage you to take some time
and check that these edits were sensible. I can't have broken anything
(I strictly added headers, and reordered them, never removed), but they
may not be the headers you'd really like to identify as containing the
API being implemented.

Many forward declarations and missing includes were added to a header
files to allow them to parse cleanly when included first. The main
module rule does in fact have its merits. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
702cc91aa1bd41540e8674921ae7ac89a4ff061f 15-Oct-2012 Bill Wendling <isanbard@gmail.com> Move the Attributes::Builder outside of the Attributes class and into its own class named AttrBuilder. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165960 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
3756e70af69096a82b367ee9667e7720ca2201e4 14-Oct-2012 Bill Wendling <isanbard@gmail.com> Remove the bitwise XOR operator from the Attributes class. Replace it with the equivalent from the builder class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165893 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
7d2f2496c1d263eecdc104fd72e847a31d8695b9 10-Oct-2012 Bill Wendling <isanbard@gmail.com> Remove the final bits of Attributes being declared in the Attribute
namespace. Use the attribute's enum value instead. No functionality change
intended.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
6765834754cbb3cb0f15b4b15e98c5e73fa50066 09-Oct-2012 Bill Wendling <isanbard@gmail.com> Create enums for the different attributes.

We use the enums to query whether an Attributes object has that attribute. The
opaque layer is responsible for knowing where that specific attribute is stored.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165488 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
3574eca1b02600bac4e625297f4ecf745f4c4f32 08-Oct-2012 Micah Villmow <villmow@gmail.com> Move TargetData to DataLayout.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
e603fe46649aee6f6aeca1668f0b617818af1e1d 20-Sep-2012 Bill Wendling <isanbard@gmail.com> Convert some attribute existence queries over to use the predicate methods.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164268 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
74ee0ef6a72c61766523364f7c300c2a2612aae7 01-Jun-2012 Chris Lattner <sabre@nondot.org> quick fix for PR13006, will check in testcase later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157813 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
f59e4e34528a078c2db57ee72b2814b495989124 01-Jun-2012 Chris Lattner <sabre@nondot.org> enhance the logic for looking through tailcalls to look through transparent casts
in multiple-return value scenarios, like what happens on X86-64 when returning
small structs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
5b0d9465375c4e175f5805038c5ef1d7d11193bd 01-Jun-2012 Chris Lattner <sabre@nondot.org> enhance getNoopInput to know about vector<->vector bitcasts of legal
types, as well as int<->ptr casts. This allows us to tailcall functions
with some trivial casts between the call and return (i.e. because the
return types disagree).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157798 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
cd6015cc8a0da3981f298c2e92b145fe11e838e0 01-Jun-2012 Chris Lattner <sabre@nondot.org> rearrange some logic, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157796 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
bf010eb9110009d745382bf15131fbe556562ffe 10-Apr-2012 Evan Cheng <evan.cheng@apple.com> Fix a long standing tail call optimization bug. When a libcall is emitted
legalizer always use the DAG entry node. This is wrong when the libcall is
emitted as a tail call since it effectively folds the return node. If
the return node's input chain is not the entry (i.e. call, load, or store)
use that as the tail call input chain.

PR12419
rdar://9770785
rdar://11195178


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154370 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
4d6ccb5f68cd7c6418a209f1fa4dbade569e4493 20-Jan-2012 David Blaikie <dblaikie@gmail.com> More dead code removal (using -Wunreachable-code)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
164b86b4399559e45fab7846f1e3e09119cab4e2 20-Jan-2012 Kostya Serebryany <kcc@google.com> Extend Attributes to 64 bits

Problem: LLVM needs more function attributes than currently available (32 bits).
One such proposed attribute is "address_safety", which shows that a function is being checked for address safety (by AddressSanitizer, SAFECode, etc).

Solution:
- extend the Attributes from 32 bits to 64-bits
- wrap the object into a class so that unsigned is never erroneously used instead
- change "unsigned" to "Attributes" throughout the code, including one place in clang.
- the class has no "operator uint64 ()", but it has "uint64_t Raw() " to support packing/unpacking.
- the class has "safe operator bool()" to support the common idiom: if (Attributes attr = getAttrs()) useAttrs(attr);
- The CTOR from uint64_t is marked explicit, so I had to add a few explicit CTOR calls
- Add the new attribute "address_safety". Doing it in the same commit to check that attributes beyond first 32 bits actually work.
- Some of the functions from the Attribute namespace are worth moving inside the class, but I'd prefer to have it as a separate commit.

Tested:
"make check" on Linux (32-bit and 64-bit) and Mac (10.6)
built/run spec CPU 2006 on Linux with clang -O2.


This change will break clang build in lib/CodeGen/CGCall.cpp.
The following patch will fix it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148553 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
f0426601977c3e386d2d26c72a2cca691dc42072 15-Dec-2011 Dan Gohman <gohman@apple.com> Move Instruction::isSafeToSpeculativelyExecute out of VMCore and
into Analysis as a standalone function, since there's no need for
it to be in VMCore. Also, update it to use isKnownNonZero and
other goodies available in Analysis, making it more precise,
enabling more aggressive optimization.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146610 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
8a8d479214745c82ef00f08d4e4f1c173b5f9ce2 02-Dec-2011 Nick Lewycky <nicholas@mxc.ca> Move global variables in TargetMachine into new TargetOptions class. As an API
change, now you need a TargetOptions object to create a TargetMachine. Clang
patch to follow.

One small functionality change in PTX. PTX had commented out the machine
verifier parts in their copy of printAndVerify. That now calls the version in
LLVMTargetMachine. Users of PTX who need verification disabled should rely on
not passing the command-line flag to enable it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145714 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
db125cfaf57cc83e7dd7453de2d509bc8efd0e5e 18-Jul-2011 Chris Lattner <sabre@nondot.org> land David Blaikie's patch to de-constify Type, with a few tweaks.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
9344f97108b9d5c8a5d7070d5393f107475aead0 19-Mar-2011 Evan Cheng <evan.cheng@apple.com> Minor code re-structuring.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
3d2125c9dbac695c93f42c0f59fd040e413fd711 01-Dec-2010 Evan Cheng <evan.cheng@apple.com> Enable sibling call optimization of libcalls which are expanded during
legalization time. Since at legalization time there is no mapping from
SDNode back to the corresponding LLVM instruction and the return
SDNode is target specific, this requires a target hook to check for
eligibility. Only x86 and ARM support this form of sibcall optimization
right now.
rdar://8707777


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
44ab89eb376af838d1123293a79975aede501464 29-Oct-2010 John Thompson <John.Thompson.JTSoftware@gmail.com> Inline asm multiple alternative constraints development phase 2 - improved basic logic, added initial platform support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
0dadb15927b912c98918e8a9e7466af77062149f 06-Oct-2010 Dan Gohman <gohman@apple.com> ComputeLinearIndex doesn't need its TLI argument.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115792 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
23295cc1dd6dd42b999588f6de85cb52c9651165 27-Jul-2010 Bill Wendling <isanbard@gmail.com> Using llvm.eh.catch.all.value instead of .llvm.eh.catch.all.value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109462 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
60108e96bbc5432f4fe06ba313e64448e97a0e15 16-Jul-2010 Evan Cheng <evan.cheng@apple.com> Split -enable-finite-only-fp-math to two options:
-enable-no-nans-fp-math and -enable-no-infs-fp-math. All of the current codegen fp math optimizations only care whether the fp arithmetics arguments and results can never be NaN.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp
5eb6d65a27fd77a0bf10bd49f5cccb9f1796d98b 21-Apr-2010 Dan Gohman <gohman@apple.com> Move several SelectionDAG-independent utility functions out of the
SelectionDAG directory and into a new Analysis.cpp file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101975 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/Analysis.cpp