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

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

Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
77e30195a006a022b1554933bc766b604692b9d1 15-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r197047:
------------------------------------------------------------------------
r197047 | d0k | 2013-12-11 08:36:09 -0800 (Wed, 11 Dec 2013) | 3 lines

SelectionDAG: Fix a typo.

Found by "cppcheck". PR18208.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@197355 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
4fe5b640ee935f983db9445dc9fdb4009d4fa639 16-Nov-2013 Matt Arsenault <Matthew.Arsenault@amd.com> Fix codegen for null different sized pointer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194932 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
59d3ae6cdc4316ad338cd848251f33a236ccb36c 15-Nov-2013 Matt Arsenault <Matthew.Arsenault@amd.com> Add addrspacecast instruction.

Patch by Michele Scandale!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194760 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
72cf01cc7c8f668a17e7fdfe6aaed50e164cac1b 14-Nov-2013 Andrew Trick <atrick@apple.com> Minor extension to llvm.experimental.patchpoint: don't require a call.

If a null call target is provided, don't emit a dummy call. This
allows the runtime to reserve as little nop space as it needs without
the requirement of emitting a call.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194676 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
d4f5a615674aaabeee4e444e708d1fa00a41495e 09-Nov-2013 Juergen Ributzka <juergen@apple.com> [Stackmap] Materialize the jump address within the patchpoint noop slide.

This patch moves the jump address materialization inside the noop slide. This
enables patching of the materialization itself or its complete removal. This
patch also adds the ability to define scratch registers that can be used safely
by the code called from the patchpoint intrinsic. At least one scratch register
is required, because that one is used for the materialization of the jump
address. This patch depends on D2009.

Differential Revision: http://llvm-reviews.chandlerc.com/D2074

Reviewed by Andy

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194306 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
623d2e618f4e672c47edff9ec63ed6d733ac81d3 09-Nov-2013 Juergen Ributzka <juergen@apple.com> [Stackmap] Add AnyReg calling convention support for patchpoint intrinsic.

The idea of the AnyReg Calling Convention is to provide the call arguments in
registers, but not to force them to be placed in a paticular order into a
specified set of registers. Instead it is up tp the register allocator to assign
any register as it sees fit. The same applies to the return value (if
applicable).

Differential Revision: http://llvm-reviews.chandlerc.com/D2009

Reviewed by Andy

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194293 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
dc8224def3d88915b0ff830687815a9a0aad5f63 05-Nov-2013 Andrew Trick <atrick@apple.com> Slightly change the way stackmap and patchpoint intrinsics are lowered.

MorphNodeTo is not safe to call during DAG building. It eagerly
deletes dependent DAG nodes which invalidates the NodeMap. We could
expose a safe interface for morphing nodes, but I don't think it's
worth it. Just create a new MachineNode and replaceAllUsesWith.

My understaning of the SD design has been that we want to support
early target opcode selection. That isn't very well supported, but
generally works. It seems reasonable to rely on this feature even if
it isn't widely used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194102 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
26cc826a0e4693b861776d6b349d41d0e5c2678e 01-Nov-2013 Juergen Ributzka <juergen@apple.com> [Stackmap] Remove erroneous assert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193871 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
307cfaeaf0bc629357725fb0c471e45319d48ff1 01-Nov-2013 Aaron Ballman <aaron@aaronballman.com> Commenting out this assert because it is causing the build bots to fail. This effectively reverts r193861, but needs to be fixed as part of r193769.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193862 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
8d13de3f0900e674920921bfb2d1b4c1893c0f27 01-Nov-2013 Aaron Ballman <aaron@aaronballman.com> Fixing an order of evaluation error in an assert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193861 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
3d74dea4bddc84d1881efc21eb5eefbddbfa9aed 31-Oct-2013 Andrew Trick <atrick@apple.com> Add support for stack map generation in the X86 backend.

Originally implemented by Lang Hames.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193811 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
2343e3b228c02896f4779962a91aaa659356fe2a 31-Oct-2013 Andrew Trick <atrick@apple.com> Lower stackmap intrinsics directly to their target opcode in the DAG builder.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193769 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
d0716b064744598ba7df33b8b47de0375c450570 23-Oct-2013 Tom Stellard <thomas.stellard@amd.com> SelectionDAG: Pass along the original argument/element type in ISD::InputArg

For some targets, it is useful to be able to look at the original
type of an argument without having to dig through the original IR.

This also fixes a bug in SelectionDAGBuilder where InputArg.PartOffset
was not taking into account the offset of structure elements.

Patch by: Justin Holewinski

Tom Stellard:
- Changed the type of ArgVT to EVT, so it can store non-simple types
like v3i32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193214 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
ff71812dfaf30015a9abc5cb4712e67b96fe075e 21-Oct-2013 Matt Arsenault <Matthew.Arsenault@amd.com> Fix CodeGen for different size address space GEPs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193111 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
599c0afb244e61fed389ea0d4b5479fbc380dfbf 21-Oct-2013 Matt Arsenault <Matthew.Arsenault@amd.com> Reuse variable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193107 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
db3a9e64f856e3a233a427da1f3969fd3a65a438 09-Sep-2013 Bob Wilson <bob.wilson@apple.com> Revert patches to add case-range support for PR1255.

The work on this project was left in an unfinished and inconsistent state.
Hopefully someone will eventually get a chance to implement this feature, but
in the meantime, it is better to put things back the way the were. I have
left support in the bitcode reader to handle the case-range bitcode format,
so that we do not lose bitcode compatibility with the llvm 3.3 release.

This reverts the following commits: 155464, 156374, 156377, 156613, 156704,
156757, 156804 156808, 156985, 157046, 157112, 157183, 157315, 157384, 157575,
157576, 157586, 157612, 157810, 157814, 157815, 157880, 157881, 157882, 157884,
157887, 157901, 158979, 157987, 157989, 158986, 158997, 159076, 159101, 159100,
159200, 159201, 159207, 159527, 159532, 159540, 159583, 159618, 159658, 159659,
159660, 159661, 159703, 159704, 160076, 167356, 172025, 186736

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190328 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
edd08f74289c6ba3b3f8e730e4ab825ef9bd6492 26-Aug-2013 Tom Stellard <thomas.stellard@amd.com> SelectionDAG: Remove unnecessary uses of TargetLowering::getPointerTy()

If we have a binary operation like ISD:ADD, we can set the result type
equal to the result type of one of its operands rather than using
TargetLowering::getPointerTy().

Also, any use of DAG.getIntPtrConstant(C) as an operand for a binary
operation can be replaced with:
DAG.getConstant(C, OtherOperand.getValueType());

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189227 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
da25cd3e6de8f21005590c2de49868f883cf2410 26-Aug-2013 Tom Stellard <thomas.stellard@amd.com> SelectionDAG: Use correct pointer size when lowering function arguments v2

This adds minimal support to the SelectionDAG for handling address spaces
with different pointer sizes. The SelectionDAG should now correctly
lower pointer function arguments to the correct size as well as generate
the correct code when lowering getelementptr.

This patch also updates the R600 DataLayout to use 32-bit pointers for
the local address space.

v2:
- Add more helper functions to TargetLoweringBase
- Use CHECK-LABEL for tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
58a9b4388bcace0f332205f960c6c8705fb5a24b 23-Aug-2013 Michael Gottesman <mgottesman@apple.com> [stack protector] Work around an issue with the BMOVPCB_CALL instruction on ARM by disabling does not return on __stack_chk_fail.

This is to fix the bots while I look to see if there is something I can do here.

rdar://14811848

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189076 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
8c20158fb0e1e5d747077f065eb0170c5af1fbfa 20-Aug-2013 Richard Sandiford <rsandifo@linux.vnet.ibm.com> [SystemZ] Use SRST to optimize memchr

SystemZTargetLowering::emitStringWrapper() previously loaded the character
into R0 before the loop and made R0 live on entry. I'd forgotten that
allocatable registers weren't allowed to be live across blocks at this stage,
and it confused LiveVariables enough to cause a miscompilation of f3 in
memchr-02.ll.

This patch instead loads R0 in the loop and leaves LICM to hoist it
after RA. This is actually what I'd tried originally, but I went for
the manual optimisation after noticing that R0 often wasn't being hoisted.
This bug forced me to go back and look at why, now fixed as r188774.

We should also try to optimize null checks so that they test the CC result
of the SRST directly. The select between null and the SRST GPR result could
then usually be deleted as dead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
657484f494edbac571ce2a91b8ac227e5011321d 20-Aug-2013 Michael Gottesman <mgottesman@apple.com> Teach selectiondag how to handle the stackprotectorcheck intrinsic.

Previously, generation of stack protectors was done exclusively in the
pre-SelectionDAG Codegen LLVM IR Pass "Stack Protector". This necessitated
splitting basic blocks at the IR level to create the success/failure basic
blocks in the tail of the basic block in question. As a result of this,
calls that would have qualified for the sibling call optimization were no
longer eligible for optimization since said calls were no longer right in
the "tail position" (i.e. the immediate predecessor of a ReturnInst
instruction).

Then it was noticed that since the sibling call optimization causes the
callee to reuse the caller's stack, if we could delay the generation of
the stack protector check until later in CodeGen after the sibling call
decision was made, we get both the tail call optimization and the stack
protector check!

A few goals in solving this problem were:

1. Preserve the architecture independence of stack protector generation.

2. Preserve the normal IR level stack protector check for platforms like
OpenBSD for which we support platform specific stack protector
generation.

The main problem that guided the present solution is that one can not
solve this problem in an architecture independent manner at the IR level
only. This is because:

1. The decision on whether or not to perform a sibling call on certain
platforms (for instance i386) requires lower level information
related to available registers that can not be known at the IR level.

2. Even if the previous point were not true, the decision on whether to
perform a tail call is done in LowerCallTo in SelectionDAG which
occurs after the Stack Protector Pass. As a result, one would need to
put the relevant callinst into the stack protector check success
basic block (where the return inst is placed) and then move it back
later at SelectionDAG/MI time before the stack protector check if the
tail call optimization failed. The MI level option was nixed
immediately since it would require platform specific pattern
matching. The SelectionDAG level option was nixed because
SelectionDAG only processes one IR level basic block at a time
implying one could not create a DAG Combine to move the callinst.

To get around this problem a few things were realized:

1. While one can not handle multiple IR level basic blocks at the
SelectionDAG Level, one can generate multiple machine basic blocks
for one IR level basic block. This is how we handle bit tests and
switches.

2. At the MI level, tail calls are represented via a special return
MIInst called "tcreturn". Thus if we know the basic block in which we
wish to insert the stack protector check, we get the correct behavior
by always inserting the stack protector check right before the return
statement. This is a "magical transformation" since no matter where
the stack protector check intrinsic is, we always insert the stack
protector check code at the end of the BB.

Given the aforementioned constraints, the following solution was devised:

1. On platforms that do not support SelectionDAG stack protector check
generation, allow for the normal IR level stack protector check
generation to continue.

2. On platforms that do support SelectionDAG stack protector check
generation:

a. Use the IR level stack protector pass to decide if a stack
protector is required/which BB we insert the stack protector check
in by reusing the logic already therein. If we wish to generate a
stack protector check in a basic block, we place a special IR
intrinsic called llvm.stackprotectorcheck right before the BB's
returninst or if there is a callinst that could potentially be
sibling call optimized, before the call inst.

b. Then when a BB with said intrinsic is processed, we codegen the BB
normally via SelectBasicBlock. In said process, when we visit the
stack protector check, we do not actually emit anything into the
BB. Instead, we just initialize the stack protector descriptor
class (which involves stashing information/creating the success
mbbb and the failure mbb if we have not created one for this
function yet) and export the guard variable that we are going to
compare.

c. After we finish selecting the basic block, in FinishBasicBlock if
the StackProtectorDescriptor attached to the SelectionDAGBuilder is
initialized, we first find a splice point in the parent basic block
before the terminator and then splice the terminator of said basic
block into the success basic block. Then we code-gen a new tail for
the parent basic block consisting of the two loads, the comparison,
and finally two branches to the success/failure basic blocks. We
conclude by code-gening the failure basic block if we have not
code-gened it already (all stack protector checks we generate in
the same function, use the same failure basic block).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188755 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
66d1fa6f4b443ac9f8bcea5d1f71a73ada733a42 20-Aug-2013 Hal Finkel <hfinkel@anl.gov> Add a llvm.copysign intrinsic

This adds a llvm.copysign intrinsic; We already have Libfunc recognition for
copysign (which is turned into the FCOPYSIGN SDAG node). In order to
autovectorize calls to copysign in the loop vectorizer, we need a corresponding
intrinsic as well.

In addition to the expected changes to the language reference, the loop
vectorizer, BasicTTI, and the SDAG builder (the intrinsic is transformed into
an FCOPYSIGN node, just like the function call), this also adds FCOPYSIGN to a
few lists in LegalizeVector{Ops,Types} so that vector copysigns can be
expanded.

In TargetLoweringBase::initActions, I've made the default action for FCOPYSIGN
be Expand for vector types. This seems correct for all in-tree targets, and I
think is the right thing to do because, previously, there was no way to generate
vector-values FCOPYSIGN nodes (and most targets don't specify an action for
vector-typed FCOPYSIGN).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188728 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
19262ee0725a09b7c621a3d2eb66ba1513ae932a 16-Aug-2013 Richard Sandiford <rsandifo@linux.vnet.ibm.com> [SystemZ] Use SRST to implement strlen and strnlen

It would also make sense to use it for memchr; I'm working on that now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188547 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
4fc7355a21e1fa838406e15459aaf54a58fcf909 16-Aug-2013 Richard Sandiford <rsandifo@linux.vnet.ibm.com> [SystemZ] Use MVST to implement strcpy and stpcpy


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188546 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
e1b2af731e2a45344a7c502232f66c55cd746da0 16-Aug-2013 Richard Sandiford <rsandifo@linux.vnet.ibm.com> [SystemZ] Use CLST to implement strcmp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188544 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
6a079fef4fad3e6c2e07c9e1d0776e20a0b05b1e 16-Aug-2013 Richard Sandiford <rsandifo@linux.vnet.ibm.com> [SystemZ] Fix handling of 64-bit memcmp results

Generalize r188163 to cope with return types other than MVT::i32, just
as the existing visitMemCmpCall code did. I've split this out into a
subroutine so that it can be used for other upcoming patches.

I also noticed that I'd used the wrong API to record the out chain.
It's a load that uses DAG.getRoot() rather than getRoot(), so the out
chain should go on PendingLoads. I don't have a testcase for that because
we don't do any interesting scheduling on z yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188540 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
0ff1190888f5b24f64a196392c452800447186d8 15-Aug-2013 Craig Topper <craig.topper@gmail.com> Replace getValueType().getSimpleVT() with getSimpleValueType().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188442 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
ac168b8bc8773a083a10902f64e4ae57a925aee4 12-Aug-2013 Richard Sandiford <rsandifo@linux.vnet.ibm.com> [SystemZ] Use CLC and IPM to implement memcmp

For now this is restricted to fixed-length comparisons with a length
in the range [1, 256], as for memcpy() and MVC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188163 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
41418d17cced656f91038b2482bc9d173b4974b0 08-Aug-2013 Hal Finkel <hfinkel@anl.gov> Add ISD::FROUND for libm round()

All libm floating-point rounding functions, except for round(), had their own
ISD nodes. Recent PowerPC cores have an instruction for round(), and so here I'm
adding ISD::FROUND so that round() can be custom lowered as well.

For the most part, this is straightforward. I've added an intrinsic
and a matching ISD node just like those for nearbyint() and friends. The
SelectionDAG pattern I've named frnd (because ISD::FP_ROUND has already claimed
fround).

This will be used by the PowerPC backend in a follow-up commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
425b76c2314ff7ee7ad507011bdda1988ae481ef 06-Aug-2013 Tom Stellard <thomas.stellard@amd.com> TargetLowering: Add getVectorIdxTy() function v2

This virtual function can be implemented by targets to specify the type
to use for the index operand of INSERT_VECTOR_ELT, EXTRACT_VECTOR_ELT,
INSERT_SUBVECTOR, EXTRACT_SUBVECTOR. The default implementation returns
the result from TargetLowering::getPointerTy()

The previous code was using TargetLowering::getPointerTy() for vector
indices, because this is guaranteed to be legal on all targets. However,
using TargetLowering::getPointerTy() can be a problem for targets with
pointer sizes that differ across address spaces. On such targets,
when vectors need to be loaded or stored to an address space other than the
default 'zero' address space (which is the address space assumed by
TargetLowering::getPointerTy()), having an index that
is a different size than the pointer can lead to inefficient
pointer calculations, (e.g. 64-bit adds for a 32-bit address space).

There is no intended functionality change with this patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187748 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
1a54c57cf654e001c078c7064123d30e6c03e349 31-Jul-2013 Eric Christopher <echristo@gmail.com> Fix crashing on invalid inline asm with matching constraints.

For a testcase like the following:

typedef unsigned long uint64_t;

typedef struct {
uint64_t lo;
uint64_t hi;
} blob128_t;

void add_128_to_128(const blob128_t *in, blob128_t *res) {
asm ("PAND %1, %0" : "+Q"(*res) : "Q"(*in));
}

where we'll fail to allocate the register for the output constraint,
our matching input constraint will not find a register to match,
and could try to search past the end of the current operands array.

On the idea that we'd like to attempt to keep compilation going
to find more errors in the module, change the error cases when
we're visiting inline asm IR to return immediately and avoid
trying to create a node in the DAG. This leaves us with only
a single error message per inline asm instruction, but allows us
to safely keep going in the general case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187470 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
b0bee810e7f980ccb4c0ee56aed948716a51d0ab 31-Jul-2013 Eric Christopher <echristo@gmail.com> Reflow this to be easier to read.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187459 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
893ae83f421c20cf34622b355c5aaba32b2c019a 10-Jul-2013 Adrian Prantl <aprantl@apple.com> Document a known limitation of the status quo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
3517640443f0b5224e2a6414c246ac60016ee9d4 09-Jul-2013 Adrian Prantl <aprantl@apple.com> Reapply an improved version of r180816/180817.

Change the informal convention of DBG_VALUE machine instructions so that
we can express a register-indirect address with an offset of 0.
The old convention was that a DBG_VALUE is a register-indirect value if
the offset (operand 1) is nonzero. The new convention is that a DBG_VALUE
is register-indirect if the first operand is a register and the second
operand is an immediate. For plain register values the combination reg,
reg is used. MachineInstrBuilder::BuildMI knows how to build the new
DBG_VALUES.

rdar://problem/13658587

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
e54885af9b54bfc7436a928a48d3db1ef88a2a70 09-Jul-2013 Stephen Lin <stephenwlin@gmail.com> AArch64/PowerPC/SystemZ/X86: This patch fixes the interface, usage, and all
in-tree implementations of TargetLoweringBase::isFMAFasterThanMulAndAdd in
order to resolve the following issues with fmuladd (i.e. optional FMA)
intrinsics:

1. On X86(-64) targets, ISD::FMA nodes are formed when lowering fmuladd
intrinsics even if the subtarget does not support FMA instructions, leading
to laughably bad code generation in some situations.

2. On AArch64 targets, ISD::FMA nodes are formed for operations on fp128,
resulting in a call to a software fp128 FMA implementation.

3. On PowerPC targets, FMAs are not generated from fmuladd intrinsics on types
like v2f32, v8f32, v4f64, etc., even though they promote, split, scalarize,
etc. to types that support hardware FMAs.

The function has also been slightly renamed for consistency and to force a
merge/build conflict for any out-of-tree target implementing it. To resolve,
see comments and fixed in-tree examples.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185956 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
155615d7dc4e4fbfd3b7273720a76356468edf46 08-Jul-2013 Stephen Lin <stephenwlin@gmail.com> Remove trailing whitespace from SelectionDAG/*.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185780 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
09f8ca3986cbe89d897765926462476f345a25d0 06-Jul-2013 Stephen Lin <stephenwlin@gmail.com> SelectionDAGBuilder: style fixes (add space between end parentheses and open brace)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
e5a81a130f26b0b2651ad6a22e3748703b11cb46 06-Jul-2013 Tim Northover <tnorthover@apple.com> Stop putting operations after a tail call.

This prevents the emission of DAG-generated vreg definitions after a
tail call be dropping them entirely (on the grounds that nothing could
use them anyway, and they interfere with O0 CodeGen).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185754 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
918b7c82f8f53241a5bb354931abfe53634bfc4c 04-Jul-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Simplify landing pad lowering.

Stop using the ISD::EXCEPTIONADDR and ISD::EHSELECTION when lowering
landing pad arguments. These nodes were previously legalized into
CopyFromReg nodes, but that never worked properly because the
CopyFromReg node weren't guaranteed to be scheduled at the top of the
basic block.

This meant the exception pointer and selector registers could be
clobbered before being copied to a virtual register.

This patch copies the two physical registers to virtual registers at
the beginning of the basic block, and lowers the landingpad instruction
directly to two CopyFromReg nodes reading the *virtual* registers. This
is safe because virtual registers don't get clobbered.

A future patch will remove the ISD::EXCEPTIONADDR and ISD::EHSELECTION
nodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185617 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c93822901aef17aaf8bb1303f27b47025fd1d582 04-Jul-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Revert r185595-185596 which broke buildbots.

Revert "Simplify landing pad lowering."
Revert "Remove the EXCEPTIONADDR, EHSELECTION, and LSDAADDR ISD opcodes."

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185600 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
9c0e9217325db888331c23ad7c332c09d64b02d4 04-Jul-2013 Jakob Stoklund Olesen <stoklund@2pi.dk> Simplify landing pad lowering.

Stop using the ISD::EXCEPTIONADDR and ISD::EHSELECTION when lowering
landing pad arguments. These nodes were previously legalized into
CopyFromReg nodes, but that never worked properly because the
CopyFromReg node weren't guaranteed to be scheduled at the top of the
basic block.

This meant the exception pointer and selector registers could be
clobbered before being copied to a virtual register.

This patch copies the two physical registers to virtual registers at
the beginning of the basic block, and lowers the landingpad instruction
directly to two CopyFromReg nodes reading the *virtual* registers. This
is safe because virtual registers don't get clobbered.

A future patch will remove the ISD::EXCEPTIONADDR and ISD::EHSELECTION
nodes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185595 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
f22fd3f7b557a967b1edc1fa9ae770006a39e97c 03-Jul-2013 Craig Topper <craig.topper@gmail.com> Use SmallVectorImpl instead of SmallVector for iterators and references to avoid specifying the vector size unnecessarily.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185512 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
cbafae6d33031a72ba8219c28cb0e852511f79a3 28-Jun-2013 Manman Ren <mren@apple.com> Debug Info: clean up usage of Verify.

No functionality change.
It should suffice to check the type of a debug info metadata, instead of
calling Verify. For cases where we know the type of a DI metadata, use
assert.

Also update testing cases to make them conform to the format of DI classes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185135 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
ba54bca472a15d0657e1b88776f7069042b60b4e 19-Jun-2013 Bill Wendling <isanbard@gmail.com> Access the TargetLoweringInfo from the TargetMachine object instead of caching it. The TLI may change between functions. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184360 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
a3fb49cd851cd3b593fc653dc3ba4434c2e1232f 18-Jun-2013 Quentin Colombet <qcolombet@apple.com> During SelectionDAG building explicitly set a node to constant zero when the
value is zero.
This allows optmizations to kick in more easily.
Fix some test cases so that they remain meaningful (i.e., not completely dead
coded) when optimizations apply.

<rdar://problem/14096009> superfluous multiply by high part of zero-extended
value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184222 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
6d9dbd5526e3161db884fc4fe99c278bb59ccc19 16-Jun-2013 David Blaikie <dblaikie@gmail.com> Debug Info: Simplify Frame Index handling in DBG_VALUE Machine Instructions

Rather than using the full power of target-specific addressing modes in
DBG_VALUEs with Frame Indicies, simply use Frame Index + Offset. This
reduces the complexity of debug info handling down to two
representations of values (reg+offset and frame index+offset) rather
than three or four.

Ideally we could ensure that frame indicies had been eliminated by the
time we reached an assembly or dwarf generation, but I haven't spent the
time to figure out where the FIs are leaking through into that & whether
there's a good place to convert them. Some FI+offset=>reg+offset
conversion is done (see PrologEpilogInserter, for example) which is
necessary for some SelectionDAG assumptions about registers, I believe,
but it might be possible to make this a more thorough conversion &
ensure there are no remaining FIs no matter how instruction selection
is performed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184066 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
6a2e7ac0b6647a409394e58b385e579ea62b5cba 06-Jun-2013 Bill Wendling <isanbard@gmail.com> Cache the TargetLowering info object as a pointer.

Caching it as a pointer allows us to reset it if the TargetMachine object
changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183361 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
b704d23062aa78b00999b75dcdcb628d4d84ee3f 27-May-2013 Preston Gurd <preston.gurd@intel.com> Convert sqrt functions into sqrt instructions when -ffast-math is in effect.

When -ffast-math is in effect (on Linux, at least), clang defines
__FINITE_MATH_ONLY__ > 0 when including <math.h>. This causes the
preprocessor to include <bits/math-finite.h>, which renames the sqrt functions.
For instance, "sqrt" is renamed as "__sqrt_finite".

This patch adds the 3 new names in such a way that they will be treated
as equivalent to their respective original names.





git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182739 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
dd0fb018a7cd2214c7bc5c6c767f626f99b47ba9 25-May-2013 Andrew Trick <atrick@apple.com> Track IR ordering of SelectionDAG nodes 3/4.

Remove the old IR ordering mechanism and switch to new one. Fix unit
test failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182704 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
ac6d9bec671252dd1e596fa71180ff6b39d06b5d 25-May-2013 Andrew Trick <atrick@apple.com> Track IR ordering of SelectionDAG nodes 2/4.

Change SelectionDAG::getXXXNode() interfaces as well as call sites of
these functions to pass in SDLoc instead of DebugLoc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182703 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
ea5db0c315f1ab8ee3be52e0e765c32d3efff024 25-May-2013 Andrew Trick <atrick@apple.com> Track IR ordering of SelectionDAG nodes 1/4.

Use a field in the SelectionDAGNode object to track its IR ordering.
This adds fields and utility classes without changing existing
interfaces or functionality.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182701 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c6af2432c802d241c8fffbe0371c023e6c58844e 25-May-2013 Michael J. Spencer <bigcheesegs@gmail.com> Replace Count{Leading,Trailing}Zeros_{32,64} with count{Leading,Trailing}Zeros.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182680 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
5da4e4f3b10148e811de82ec57b3f82c15411a81 22-May-2013 Adrian Prantl <aprantl@apple.com> Unify formatting of debug output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182495 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c2b7f5fa511420b99dd8238ab4ba769a6a6015a5 21-May-2013 Justin Holewinski <jholewinski@nvidia.com> Drop @llvm.annotation and @llvm.ptr.annotation intrinsics during codegen.

The intrinsic calls are dropped, but the annotated value is propagated.

Fixes PR 15253

Original patch by Zeng Bin!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182387 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
225ed7069caae9ece32d8bd3d15c6e41e21cc04b 18-May-2013 Matt Arsenault <Matthew.Arsenault@amd.com> Add LLVMContext argument to getSetCCResultType

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182180 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
df68803890ecae2e8cfabdaa9122cb2ccbf5b89c 17-May-2013 Adrian Prantl <aprantl@apple.com> Generate debug info for by-value struct args even if they are not used.
radar://problem/13865940

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182062 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
f0b0755b6ea0b5c55bbf51ddd29439c01c7102e5 01-May-2013 Chad Rosier <mcrosier@apple.com> [inline asm] Return an undef SDValue of the expected value type, rather than
report a fatal error. This allows us to continue processing the translation
unit. Test case to come on the clang side because we need an inline asm
diagnostics handler in place.
rdar://13446483

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180873 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.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/SelectionDAG/SelectionDAGBuilder.cpp
86a87d9ba1faf153e0e6eaddfd3e95595c83bcb1 01-May-2013 Adrian Prantl <aprantl@apple.com> Temporarily revert "Change the informal convention of DBG_VALUE so that we can express a"
because it breaks some buildbots.

This reverts commit 180816.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180819 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
a2b56692c8b824b8cc4a0927bb555f3718e9bee8 01-May-2013 Adrian Prantl <aprantl@apple.com> Change the informal convention of DBG_VALUE so that we can express a
register-indirect address with an offset of 0.
It used to be that a DBG_VALUE is a register-indirect value if the offset
(operand 1) is nonzero. The new convention is that a DBG_VALUE is
register-indirect if the first operand is a register and the second
operand is an immediate. For plain registers use the combination reg, reg.

rdar://problem/13658587

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180816 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
2871ba90a3d3544fa1f136c7d4efbb619298d6e8 25-Apr-2013 Chad Rosier <mcrosier@apple.com> [inline asm] Fix a crasher for an invalid value type/register class.
rdar://13731657


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180226 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.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/SelectionDAG/SelectionDAGBuilder.cpp
7834c7143384bfde38e39e01158546304ca4f0c2 23-Mar-2013 Owen Anderson <resistor@mac.com> Remove the type legality check from the SelectionDAGBuilder when it lowers @llvm.fmuladd to ISD::FMA nodes.
Performing this check unilaterally prevented us from generating FMAs when the incoming IR contained illegal vector types which would eventually be legalized to underlying types that *did* support FMA.
For example, an @llvm.fmuladd on an OpenCL float16 should become a sequence of float4 FMAs, not float4 fmul+fadd's.

NOTE: Because we still call the target-specific profitability hook, individual targets can reinstate the old behavior, if desired, by simply performing the legality check inside their callback hook. They can also perform more sophisticated legality checks, if, for example, some illegal vector types can be productively implemented as FMAs, but not others.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177820 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
e36b47e17be0e3289890f33fe8aaecfc231d83a0 08-Mar-2013 Bill Wendling <isanbard@gmail.com> Revert r176154 in favor of a better approach.

Code generation makes some basic assumptions about the IR it's been given. In
particular, if there is only one 'invoke' in the function, then that invoke
won't be going away. However, with the advent of the `llvm.donothing' intrinsic,
those invokes may go away. If all of them go away, the landing pad no longer has
any users. This confuses the back-end, which asserts.

This happens with SjLj exceptions, because that's the model that modifies the IR
based on there being invokes, etc. in the function.

Remove any invokes of `llvm.donothing' during SjLj EH preparation. This will
give us a CFG that the back-end won't be confused about. If all of the invokes
in a function are removed, then the SjLj EH prepare pass won't insert the bogus
code the relies upon the invokes being there.
<rdar://problem/13228754&13316637>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176677 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
7590022f4079dcd956b99e2f10a028f2158ece53 01-Mar-2013 Chad Rosier <mcrosier@apple.com> Generate an error message instead of asserting or segfaulting when we can't
handle indirect register inputs.
rdar://13322011

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
a6b20ced765b67a85d9219d0c8547fc9c133e14f 01-Mar-2013 Michael Liao <michael.liao@intel.com> Fix PR10475

- ISD::SHL/SRL/SRA must have either both scalar or both vector operands
but TLI.getShiftAmountTy() so far only return scalar type. As a
result, backend logic assuming that breaks.
- Rename the original TLI.getShiftAmountTy() to
TLI.getScalarShiftAmountTy() and re-define TLI.getShiftAmountTy() to
return target-specificed scalar type or the same vector type as the
1st operand.
- Fix most TICG logic assuming TLI.getShiftAmountTy() a simple scalar
type.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176364 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
6437d38a0deb0cd51607dd624a70d093ae347156 01-Mar-2013 Eli Bendersky <eliben@google.com> A small refactoring + adding comments.

SelectionDAGIsel::LowerArguments needs a function, not a basic block. So it
makes sense to pass it the function instead of extracting a basic-block from
the function and then tossing it. This is also more self-documenting (functions
have arguments, BBs don't).

In addition, added comments to a couple of Select* methods.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176305 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
5e5974f51ad079a3ed890ca8be1d3f50150320ad 27-Feb-2013 Manman Ren <mren@apple.com> SelectionDAG: If llvm.donothing has a landingpad, we should clear
CurrentCallSite to avoid an assertion failure:
assert(MMI.getCurrentCallSite() == 0 && "Overlapping call sites!");

rdar://problem/13228754


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176154 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
50e75bfc29269def44981ab5f109334d95f55007 25-Feb-2013 Matt Beaumont-Gay <matthewbg@google.com> 'Hexadecimal' has two 'a's and only one 'i'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176031 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
af23f8e403d68e3f96eb5eb63e50e3aec4ea01c9 25-Feb-2013 Chandler Carruth <chandlerc@gmail.com> Fix the root cause of PR15348 by correctly handling alignment 0 on
memory intrinsics in the SDAG builder.

When alignment is zero, the lang ref says that *no* alignment
assumptions can be made. This is the exact opposite of the internal API
contracts of the DAG where alignment 0 indicates that the alignment can
be made to be anything desired.

There is another, more explicit alignment that is better suited for the
role of "no alignment at all": an alignment of 1. Map the intrinsic
alignment to this early so that we don't end up generating aligned DAGs.

It is really terrifying that we've never seen this before, but we
suddenly started generating a large number of alignment 0 memcpys due to
the new code to do memcpy-based copying of POD class members. That patch
contains a bug that rounds bitfield alignments down when they are the
first field. This can in turn produce zero alignments.

This fixes weird crashes I've seen in library users of LLVM on 32-bit
hosts, etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176022 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
5f352cc6e49d714bd5c14c952aa5c394fc9897bf 11-Feb-2013 Evan Cheng <evan.cheng@apple.com> Remove unnecessary code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174854 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
8f637adbd383afc2defb5d3f75433b6f2c25d527 08-Feb-2013 Bob Wilson <bob.wilson@apple.com> Revert 172027 and 174336. Remove diagnostics about over-aligned stack objects.

Aside from the question of whether we report a warning or an error when we
can't satisfy a requested stack object alignment, the current implementation
of this is not good. We're not providing any source location in the diagnostics
and the current warning is not connected to any warning group so you can't
control it. We could improve the source location somewhat, but we can do a
much better job if this check is implemented in the front-end, so let's do that
instead. <rdar://problem/13127907>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174741 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
607acd66f400045919b1067432927a53484eaec1 06-Feb-2013 Evan Cheng <evan.cheng@apple.com> Tweak check to avoid integer overflow (for insanely large alignments)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174482 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
5882e566a560691bef3eb817f6390ee93242b6a6 01-Feb-2013 Nadav Rotem <nrotem@apple.com> Fix errant fallthrough in the generation of the lifetime markers.
Found by Alexander Kornienko.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174207 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
0a29cb045444c13160e90fe7942a9d7c720185ed 22-Jan-2013 Tim Northover <Tim.Northover@arm.com> Make APFloat constructor require explicit semantics.

Previously we tried to infer it from the bit width size, with an added
IsIEEE argument for the PPC/IEEE 128-bit case, which had a default
value. This default value allowed bugs to creep in, where it was
inappropriate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.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/SelectionDAG/SelectionDAGBuilder.cpp
fffe3634933471ee9805412ffa221080c9e9e8fd 11-Jan-2013 Eric Christopher <echristo@gmail.com> For inline asm:

- recognize string "{memory}" in the MI generation
- mark as mayload/maystore when there's a memory clobber constraint.

PR14859.

Patch by Krzysztof Parzyszek

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172228 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
81bfd711de84310232354dcc971b8ec45206716a 10-Jan-2013 Jakub Staszak <kubastaszak@gmail.com> Remove unneeded includes from FunctionLoweringInfo.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172123 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
86441169da23959c81d8648c3dfdc7a0bb8d2225 10-Jan-2013 Manman Ren <mren@apple.com> Stack Alignment: throw error if we can't satisfy the minimal alignment
requirement when creating stack objects in MachineFrameInfo.

Add CreateStackObjectWithMinAlign to throw error when the minimal alignment
can't be achieved and to clamp the alignment when the preferred alignment
can't be achieved. Same is true for CreateVariableSizedObject.
Will not emit error in CreateSpillStackObject or CreateStackObject.

As long as callers of CreateStackObject do not assume the object will be
aligned at the requested alignment, we should not have miscompile since
later optimizations which look at the object's alignment will have the correct
information.

rdar://12713765


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.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/SelectionDAG/SelectionDAGBuilder.cpp
8b62abdd7b9c8fc5d78dad86093f4afdfeba949d 30-Dec-2012 Bill Wendling <isanbard@gmail.com> Remove the Function::getRetAttributes method in favor of using the AttributeSet accessor method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171256 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
39cd0c8e477255a7296b2bd1dc67193f8d38c003 30-Dec-2012 Bill Wendling <isanbard@gmail.com> Remove Function::getParamAttributes and use the AttributeSet accessor methods instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171255 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
831737d329a727f53a1fb0572f7b7a8127208881 30-Dec-2012 Bill Wendling <isanbard@gmail.com> Remove the Function::getFnAttributes method in favor of using the AttributeSet
directly.

This is in preparation for removing the use of the 'Attribute' class as a
collection of attributes. That will shift to the AttributeSet class instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171253 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c698d3a2a40f0909d16cbe857685f0f22cb9ae43 19-Dec-2012 Patrik Hagglund <patrik.h.hagglund@ericsson.com> Change AsmOperandInfo::ConstraintVT to MVT, instead of EVT.

Accordingly, add MVT::getVT.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170550 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
b9e12e519e01078663941ddfbecccf1432c1120c 19-Dec-2012 Patrik Hagglund <patrik.h.hagglund@ericsson.com> Split the usage of 'EVT PartVT' into 'MVT PartVT' and 'EVT PartEVT'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170540 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
8963fecc86def73634dabf7545322287aa6ae9f8 19-Dec-2012 Patrik Hagglund <patrik.h.hagglund@ericsson.com> Change RegVT in BitTestBlock and RegsForValue, to contain MVTs,
instead of EVTs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170538 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
e5c65911a659e49320d214bf0702793ad37b5ed5 19-Dec-2012 Patrik Hagglund <patrik.h.hagglund@ericsson.com> Change TargetLowering::getTypeForExtArgOrReturn to take and return
MVTs, instead of EVTs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
ee211d2b8da98a549f7c68401aba866fa2a0eee2 19-Dec-2012 Patrik Hagglund <patrik.h.hagglund@ericsson.com> Change a parameter of TargetLowering::getVectorTypeBreakdown to MVT,
from EVT.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
dfcf33a287d1756721f1f735af687595ce2f5a21 19-Dec-2012 Patrik Hagglund <patrik.h.hagglund@ericsson.com> Change TargetLowering::RegisterTypeForVT to contain MVTs, instead of
EVTs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170535 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.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/SelectionDAG/SelectionDAGBuilder.cpp
a61b17c18a67f1b3faef2f2108379c4337ce9bb7 13-Dec-2012 Patrik Hagglund <patrik.h.hagglund@ericsson.com> Change TargetLowering::getRegClassFor to take an MVT, instead of EVT.

Accordingly, add helper funtions getSimpleValueType (in parallel to
getValueType) in SDValue, SDNode, and TargetLowering.

This is the first, in a series of patches.

This is the second attempt. In the first attempt (r169837), a few
getSimpleVT() were hoisted too far, detected by bootstrap failures.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170104 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
34525f9ac098c1c6bc9002886d6da3039a284fd2 11-Dec-2012 Patrik Hagglund <patrik.h.hagglund@ericsson.com> Revert EVT->MVT changes, r169836-169851, due to buildbot failures.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169854 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
05749cff9b045505f08313b4c2d1bd9a4fb84970 11-Dec-2012 Patrik Hagglund <patrik.h.hagglund@ericsson.com> Change RegVT in BitTestBlock and RegsForValue, to contain MVTs,
instead of EVTs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169851 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
47fd10f2fc45d280308b77ed4eda16f3c9c88248 11-Dec-2012 Patrik Hagglund <patrik.h.hagglund@ericsson.com> Change TargetLowering::getTypeForExtArgOrReturn to take and return
MVTs, instead of EVTs.

Accordingly, add bitsLT (and similar) to MVT.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169850 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
1d367e9bccf1f374a92c4337251ea541118fdcc9 11-Dec-2012 Patrik Hagglund <patrik.h.hagglund@ericsson.com> Change a parameter of TargetLowering::getVectorTypeBreakdown to MVT,
from EVT.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169849 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
2d916231ff503b995bf3b65a338c9bf0d84ee7c7 11-Dec-2012 Patrik Hagglund <patrik.h.hagglund@ericsson.com> Change TargetLowering::RegisterTypeForVT to contain MVTs, instead of
EVTs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169848 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
8163ca76f0b0d336c5436364ffb3b85be1162e7a 11-Dec-2012 Patrik Hagglund <patrik.h.hagglund@ericsson.com> Change TargetLowering::getRegClassFor to take an MVT, instead of EVT.

Accordingly, add helper funtions getSimpleValueType (in parallel to
getValueType) in SDValue, SDNode, and TargetLowering.

This is the first, in a series of patches.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169837 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
425e951734c3a0615e22ec94ffa51cc16ce6e483 11-Dec-2012 Chad Rosier <mcrosier@apple.com> Fall back to the selection dag isel to select tail calls.

This shouldn't affect codegen for -O0 compiles as tail call markers are not
emitted in unoptimized compiles. Testing with the external/internal nightly
test suite reveals no change in compile time performance. Testing with -O1,
-O2 and -O3 with fast-isel enabled did not cause any compile-time or
execution-time failures. All tests were performed on my x86 machine.
I'll monitor our arm testers to ensure no regressions occur there.

In an upcoming clang patch I will be marking the objc_autoreleaseReturnValue
and objc_retainAutoreleaseReturnValue as tail calls unconditionally. While
it's theoretically true that this is just an optimization, it's an
optimization that we very much want to happen even at -O0, or else ARC
applications become substantially harder to debug.

Part of rdar://12553082

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169796 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
2766a47310b05228e9bbc536d9f3a593fc31cd12 06-Dec-2012 Evan Cheng <evan.cheng@apple.com> Replace r169459 with something safer. Rather than having computeMaskedBits to
understand target implementation of any_extend / extload, just generate
zero_extend in place of any_extend for liveouts when the target knows the
zero_extend will be implicit (e.g. ARM ldrb / ldrh) or folded (e.g. x86 movz).

rdar://12771555


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.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/SelectionDAG/SelectionDAGBuilder.cpp
327e4cba0929f65bf32ecbbc9dc664793e5b51f7 25-Nov-2012 Craig Topper <craig.topper@gmail.com> Refactor to make helper method static.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168557 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c1aa638fff4d253286c601ae9fdf9e98d4bb1a3d 25-Nov-2012 Craig Topper <craig.topper@gmail.com> Remove duplicate check of LimitFloatPrecision. It was already checked earlier before IsExp10 could be set to true.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168553 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
915562e7620ef8a307c20df95bfb07f8514cf413 25-Nov-2012 Craig Topper <craig.topper@gmail.com> Factor common code out of individual if blocks into common tail.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168551 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
134f78cf4166841227ad125363066507f484ad5d 25-Nov-2012 Craig Topper <craig.topper@gmail.com> Remove redundant calls to getCurDebugLoc in visitIntrinsicCall. It's already called at the start of the function and captured in a local variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168548 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
538cd48455e78bb3f1bf3573ebb2ea266a21cd24 24-Nov-2012 Craig Topper <craig.topper@gmail.com> Refactor a bit to make some helper methods static.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168546 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
b315772cc9d52fef49bbe9b4e8d5e1bdf618755a 24-Nov-2012 Craig Topper <craig.topper@gmail.com> Factor some common code out of individual if blocks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168538 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
5d1e089eaa4ab0080da4e5f61379bba596a4f2b5 23-Nov-2012 Craig Topper <craig.topper@gmail.com> Refactor a bit to make some helper functions static.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168524 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
b47ec4087cc1d4cdc647cce7acf03b5c34f91722 22-Nov-2012 Lang Hames <lhames@gmail.com> llvm.fmuladd.* lowering should be checking isOperationLegalOrCustom, rather than
isOperationLegal. Thanks to Craig Topper for pointing this out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168485 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
08ac4691c61c4fab449ecf34913fa8ac9fde3517 16-Nov-2012 Craig Topper <craig.topper@gmail.com> Remove conditions from 'else if' that were guaranteed by preceding 'if'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168191 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
df0ea8dcad612185a23b12e9ddf894b9ce744561 16-Nov-2012 Craig Topper <craig.topper@gmail.com> Factor out the final FADD that's common to multiple code paths in the visitLog* functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168183 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
9bd4dd742e20e99e8bc31c510ee790c95f680993 16-Nov-2012 Craig Topper <craig.topper@gmail.com> Factor some common code to reduce compile size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168143 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
490104720db9e1e0eb9cc27e88e2d7288ac27ff0 15-Nov-2012 Craig Topper <craig.topper@gmail.com> Add llvm.ceil, llvm.trunc, llvm.rint, llvm.nearbyint intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168025 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
b2df01ab2a311688c9c4ca4eb8a93ae1bf40d468 13-Nov-2012 Duncan Sands <baldrick@free.fr> Codegen support for arbitrary vector getelementptrs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167830 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
0a1544d2fd63d8101dc7d50974e65c95a0f6f98d 02-Nov-2012 Manman Ren <mren@apple.com> OutputArg: added an index of the original argument to match the change to
InputArg in r165616.

This will enable us to get the actual type for both InputArg and OutputArg.

rdar://9932559


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
dfa4cecb1e549d96f800f7ebc793a342d8df1244 30-Oct-2012 Chad Rosier <mcrosier@apple.com> Add a comment for r167040.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167046 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
3d71688476951d56ac00a81b17c2f83fd781b208 30-Oct-2012 Chad Rosier <mcrosier@apple.com> [inline asm] Implement mayLoad and mayStore for inline assembly. In general,
the MachineInstr MayLoad/MayLoad flags are based on the tablegen implementation.
For inline assembly, however, we need to compute these based on the constraints.

Revert r166929 as this is no longer needed, but leave the test case in place.
rdar://12033048 and PR13504

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
ee0ce15ce14474bdae1a9bad7a5a1d457ad8d959 23-Oct-2012 Nadav Rotem <nrotem@apple.com> Make the indirect branch optimization deterministic. No functionality change.

Patch by Daniel Reynaud.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
970755e5197afb42a76a24a74cd6dc17721daf50 19-Oct-2012 Shuxin Yang <shuxin.llvm@gmail.com> This patch is to fix radar://8426430. It is about llvm support of __builtin_debugtrap()
which is supposed to consistently raise SIGTRAP across all systems. In contrast,
__builtin_trap() behave differently on different systems. e.g. it raises SIGTRAP on ARM, and
SIGILL on X86. The purpose of __builtin_debugtrap() is to consistently provide "trap"
functionality, in the mean time preserve the compatibility with on gcc on __builtin_trap().

The X86 backend is already able to handle debugtrap(). This patch is to:
1) make front-end recognize "__builtin_debugtrap()" (emboddied in the one-line change to Clang).
2) In DAG legalization phase, by default, "debugtrap" will be replaced with "trap", which
make the __builtin_debugtrap() "available" to all existing ports without the hassle of
changing their code.
3) If trap-function is specified (via -trap-func=xyz to llc), both __builtin_debugtrap() and
__builtin_trap() will be expanded into the function call of the specified trap function.
This behavior may need change in the future.

The provided testing-case is to make sure 2) and 3) are working for ARM port, and we
already have a testing case for x86.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166300 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
661afe75e81431a66de3ed8e22d5aa91443367b3 10-Oct-2012 Stepan Dyatkovskiy <stpworld@narod.ru> Issue description:
SchedulerDAGInstrs::buildSchedGraph ignores dependencies between FixedStack
objects and byval parameters. So loading byval parameters from stack may be
inserted *before* it will be stored, since these operations are treated as
independent.

Fix:
Currently ARMTargetLowering::LowerFormalArguments saves byval registers with
FixedStack MachinePointerInfo. To fix the problem we need to store byval
registers with MachinePointerInfo referenced to first the "byval" parameter.

Also commit adds two new fields to the InputArg structure: Function's argument
index and InputArg's part offset in bytes relative to the start position of
Function's argument. E.g.: If function's argument is 128 bit width and it was
splitted onto 32 bit regs, then we got 4 InputArg structs with same arg index,
but different offset values.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165616 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
3e2d76c946ba753c2b11af192a52e25b6f9b46ff 09-Oct-2012 Bill Wendling <isanbard@gmail.com> Use the attribute enums to query if a parameter has an attribute.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165550 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.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/SelectionDAG/SelectionDAGBuilder.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/SelectionDAG/SelectionDAGBuilder.cpp
4c230b3338bc527fa62de1ea574019261316fcfb 03-Oct-2012 Bill Wendling <isanbard@gmail.com> Update to use the predicate methods to query if an attribute exists.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165163 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
2c189061184925c6a8ecbb5a19e648b230a41c0e 26-Sep-2012 Bill Wendling <isanbard@gmail.com> Remove the `hasFnAttr' method from Function.

The hasFnAttr method has been replaced by querying the Attributes explicitly. No
intended functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164725 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
f18eb5887f913bd9aa372005599d7375333cdce2 26-Sep-2012 Bill Wendling <isanbard@gmail.com> Generate an error message instead of asserting or segfaulting when we have a
scalar-to-vector conversion that we cannot handle. For instance, when an invalid
constraint is used in an inline asm statement.
<rdar://problem/12284092>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164662 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
1293130f4f53e736678c45e712802f0dd087c80b 26-Sep-2012 Bill Wendling <isanbard@gmail.com> Generate an error message instead of asserting or segfaulting when we have a
scalar-to-vector conversion that we cannot handle. For instance, when an invalid
constraint is used in an inline asm statement.
<rdar://problem/12284092>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164657 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
1a37d7e807ad6cc71fe3cffdf6674644c46a60eb 25-Sep-2012 Sebastian Pop <spop@codeaurora.org> TargetLowering interface to set/get minimum block entries for jump tables.

Provide interface in TargetLowering to set or get the minimum number of basic
blocks whereby jump tables are generated for switch statements rather than an
if sequence.

getMinimumJumpTableEntries() defaults to 4.
setMinimumJumpTableEntries() allows target configuration.

This patch changes the default for the Hexagon architecture to 5
as it improves performance on some benchmarks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164628 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
9a2ae00c85c553108f3d57b134f0aceef5ae3372 10-Sep-2012 Nadav Rotem <nrotem@apple.com> Teach the DAGBuilder about lifetime markers which are generated from PHINodes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
1fdaee9995f1bf1553cecd4da62daba91fd4fa1f 07-Sep-2012 Michael Liao <michael.liao@intel.com> Stop emitting lifetime region info when stack coloring is not enabled in O0

- this should fix PR13780



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163370 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c05d30601ced172b55be81bb529df6be91d6ae15 06-Sep-2012 Nadav Rotem <nrotem@apple.com> Add a new optimization pass: Stack Coloring, that merges disjoint static allocations (allocas). Allocas are known to be
disjoint if they are marked by disjoint lifetime markers (@llvm.lifetime.XXX intrinsics).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163299 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
2f1d8154795ad82e500fda27d75ec1449e7a0648 06-Sep-2012 Chad Rosier <mcrosier@apple.com> Cleanup a few magic numbers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163263 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
77fffa6fdd389ad6d70a42b36c1c36c768c2de41 06-Sep-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] We only need one bit to represent the AsmDialect in the
MachineInstr.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
576cd11ab8035d4240f7e6ea8d7c6c2e45154f86 05-Sep-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Propagate the asm dialect into the MachineInstr representation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163243 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
f6dc792df1452f015bc56590b77af9cb0d7b33d9 05-Sep-2012 Craig Topper <craig.topper@gmail.com> Convert vextracti128/vextractf128 intrinsics to extract_subvector at DAG build time. Similar was previously done for vinserti128/vinsertf128. Add patterns for folding these extract_subvectors with stores.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163192 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
1a710fdde197b00107ef55df51054925b9a5d2a2 24-Aug-2012 Manman Ren <mren@apple.com> BranchProb: modify the definition of an edge in BranchProbabilityInfo to handle
the case of multiple edges from one block to another.

A simple example is a switch statement with multiple values to the same
destination. The definition of an edge is modified from a pair of blocks to
a pair of PredBlock and an index into the successors.

Also set the weight correctly when building SelectionDAG from LLVM IR,
especially when converting a Switch.
IntegersSubsetMapping is updated to calculate the weight for each cluster.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162572 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
cb1f68d7c8bea99530ba55813c2b4ddd14556286 22-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> Initialize SelectionDAGBuilder's Context in 'init', not in its constructor. The
SelectionDAG's 'init' has not been called when the SelectionDAGBuilder is
constructed (in SelectionDAGISel's constructor), so this was previously always
initialized with 0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162333 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
e7fdef420d0c8a825555d246da259342c48bd527 20-Aug-2012 Jakob Stoklund Olesen <stoklund@2pi.dk> Don't add CFG edges for redundant conditional branches.

IR that hasn't been through SimplifyCFG can look like this:

br i1 %b, label %r, label %r

Make sure we don't create duplicate Machine CFG edges in this case.

Fix the machine code verifier to accept conditional branches with a
single CFG edge.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162230 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
fd45fa1503de725801be3db33c7e860298fc82a3 18-Aug-2012 Eli Friedman <eli.friedman@gmail.com> Make atomic load and store of pointers work. Tighten verification of atomic operations
so other unexpected operations don't slip through. Based on patch by Logan Chien.
PR11786/PR13186.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162146 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
53624a2df557b4a24f2ee98cfce1a69bf83243af 04-Aug-2012 Bob Wilson <bob.wilson@apple.com> Refactor and check "onlyReadsMemory" before optimizing builtins.

This patch is mostly just refactoring a bunch of copy-and-pasted code, but
it also adds a check that the call instructions are readnone or readonly.
That check was already present for sin, cos, sqrt, log2, and exp2 calls, but
it was missing for the rest of the builtins being handled in this code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161282 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
982dc84762fc0c2ca35e6947d648a690dd22343c 03-Aug-2012 Bob Wilson <bob.wilson@apple.com> Try to reduce the compile time impact of r161232.

The previous change caused fast isel to not attempt handling any calls to
builtin functions. That included things like "printf" and caused some
noticable regressions in compile time. I wanted to avoid having fast isel
keep a separate list of functions that had to be kept in sync with what the
code in SelectionDAGBuilder.cpp was handling. I've resolved that here by
moving the list into TargetLibraryInfo. This is somewhat redundant in
SelectionDAGBuilder but it will ensure that we keep things consistent.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161263 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
772af92cb16a5e11bd580f576643a6268e8a5bce 03-Aug-2012 Bob Wilson <bob.wilson@apple.com> Fix memcmp code-gen to honor -fno-builtin.

I noticed that SelectionDAGBuilder::visitCall was missing a check for memcmp
in TargetLibraryInfo, so that it would use custom code for memcmp calls even
with -fno-builtin. I also had to add a new -disable-simplify-libcalls option
to llc so that I could write a test for this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161262 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
27db99fcee85939f0b7580ad55303c4c60a3b98d 26-Jul-2012 Dan Gohman <gohman@apple.com> Add a floor intrinsic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160791 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
72ea0c9ffaa1700730c8ce36e9b73aef4b914988 19-Jul-2012 Galina Kistanova <gkistanova@gmail.com> Fixed few warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160493 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
96cb1128528a512f1ef9c28ae5e1b78a98dcc505 19-Jul-2012 Bill Wendling <isanbard@gmail.com> Remove tabs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
4532bf6ecf39d02b60d4c77f807c2f04e51e3583 18-Jul-2012 Nuno Lopes <nunoplopes@sapo.pt> ignore 'invoke @llvm.donothing', but still keep the edge to the continuation BB

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160411 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
66d79cefcb742bdbfef8823ac8491a7ebc4af5a7 04-Jul-2012 Stepan Dyatkovskiy <stpworld@narod.ru> Reverted r156659, due to probable performance regressions, DenseMap should be used here:
IntegersSubsetMapping
- Replaced type of Items field from std::list with std::map. In neares future I'll test it with DenseMap and do the correspond replacement
if possible.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159703 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
6a590737355e82d83729198715e3fff11b0c6f9e 03-Jul-2012 Stepan Dyatkovskiy <stpworld@narod.ru> Part of r159527. Splitted into series of patches and gone with fixed PR13256:
IntegersSubsetMapping
- Replaced type of Items field from std::list with std::map. In neares future I'll test it with DenseMap and do the correspond replacement
if possible.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159659 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c723eb1aef817d47feec620933ee1ec6005cdd14 03-Jul-2012 Eric Christopher <echristo@apple.com> Revert "IntRange:" as it appears to be breaking self hosting.

This reverts commit b2833d9dcba88c6f0520cad760619200adc0442c.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159618 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
769951f6cc6323821ce1e9f46a37817a541c884f 03-Jul-2012 Evan Cheng <evan.cheng@apple.com> Target option DisableJumpTables is a gross hack. Move it to TargetLowering instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159611 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
9eb4f8a3e665e0fe37509e632b97877b29b3c106 02-Jul-2012 Eric Christopher <echristo@apple.com> Turn an assert into an error to make it a bit more friendly.

Part of rdar://6880388 and rdar://11766377

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159590 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
b2833d9dcba88c6f0520cad760619200adc0442c 02-Jul-2012 Stepan Dyatkovskiy <stpworld@narod.ru> IntRange:
- Changed isSingleNumber method behaviour. Now this flag is calculated on demand.
IntegersSubsetMapping
- Optimized diff operation.
- Replaced type of Items field from std::list with std::map.
- Added new methods:
bool isOverlapped(self &RHS)
void add(self& RHS, SuccessorClass *S)
void detachCase(self& NewMapping, SuccessorClass *Succ)
void removeCase(SuccessorClass *Succ)
SuccessorClass *findSuccessor(const IntTy& Val)
const IntTy* getCaseSingleNumber(SuccessorClass *Succ)
IntegersSubsetTest
- DiffTest: Added checks for successors.
SimplifyCFG
Updated SwitchInst usage (now it is case-ragnes compatible) for
- SimplifyEqualityComparisonWithOnlyPredecessor
- FoldValueComparisonIntoPredecessors



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159527 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
85b408991aff28ffa4e9e113a5a8a35b0db505c2 29-Jun-2012 Nuno Lopes <nunoplopes@sapo.pt> add a new @llvm.donothing intrinsic that, well, does nothing, and teach CodeGen to ignore calls to it

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159383 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
0bcbd1df7a204e1e512f1a27066d725309de1b13 28-Jun-2012 Bill Wendling <isanbard@gmail.com> Move lib/Analysis/DebugInfo.cpp to lib/VMCore/DebugInfo.cpp and
include/llvm/Analysis/DebugInfo.h to include/llvm/DebugInfo.h.

The reasoning is because the DebugInfo module is simply an interface to the
debug info MDNodes and has nothing to do with analysis.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159312 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
e0231413225cf47aaf3238bf21afd0d59025028d 22-Jun-2012 Lang Hames <lhames@gmail.com> Rename -allow-excess-fp-precision flag to -fuse-fp-ops, and switch from a
boolean flag to an enum: { Fast, Standard, Strict } (default = Standard).

This option controls the creation by optimizations of fused FP ops that store
intermediate results in higher precision than IEEE allows (E.g. FMAs). The
behavior of this option is intended to match the behaviour specified by a
soon-to-be-introduced frontend flag: '-ffuse-fp-ops'.

Fast mode - allows formation of fused FP ops whenever they're profitable.

Standard mode - allow fusion only for 'blessed' FP ops. At present the only
blessed op is the fmuladd intrinsic. In the future more blessed ops may be
added.

Strict mode - allow fusion only if/when it can be proven that the excess
precision won't effect the result.

Note: This option only controls formation of fused ops by the optimizers. Fused
operations that are explicitly requested (e.g. FMA via the llvm.fma.* intrinsic)
will always be honored, regardless of the value of this option.

Internally TargetOptions::AllowExcessFPPrecision has been replaced by
TargetOptions::AllowFPOpFusion.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158956 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
5afba6f00c3e2eef83aebbcff5fcfca2fa3c978e 05-Jun-2012 Lang Hames <lhames@gmail.com> Add a new intrinsic: llvm.fmuladd. This intrinsic represents a multiply-add
expression (a * b + c) that can be implemented as a fused multiply-add (fma)
if the target determines that this will be more efficient. This intrinsic
will be used to implement FP_CONTRACT support and an aggressive FMA formation
mode.

If your target has a fast FMA instruction you should override the
isFMAFasterThanMulAndAdd method in TargetLowering to return true.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158014 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
d9b0b025612992a0b724eeca8bdf10b1d7a5c355 02-Jun-2012 Benjamin Kramer <benny.kra@googlemail.com> Fix typos found by http://github.com/lyda/misspell-check

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
43eb31bfae470b33bab9a6764b98b5e8a0beeda5 02-Jun-2012 Stepan Dyatkovskiy <stpworld@narod.ru> PR1255: case ranges.
IntRange converted from struct to class. So main change everywhere is replacement of ".Low/High" with ".getLow/getHigh()"



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157884 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
4319a552ac98137d511341905711293d541f15e7 02-Jun-2012 Stepan Dyatkovskiy <stpworld@narod.ru> PR1255: case ranges.
IntegersSubsetGeneric, IntegersSubsetMapping: added IntTy template parameter, that allows use either APInt or IntItem. This change allows to write unittest for these classes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157880 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
6bb5c0074dc4cede2ad8efd420ec91288f91b012 01-Jun-2012 Stepan Dyatkovskiy <stpworld@narod.ru> PR1255: case ranges.
IntegersSubset devided into IntegersSubsetGeneric and into IntegersSubset itself. The first has no references to ConstantInt and works with IntItem only.
IntegersSubsetMapping also made generic. Here added second template parameter "IntegersSubsetTy" that allows to use on of two IntegersSubset types described below.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157815 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
0aa32d5d0ff6cd65b6cff957858a79e2d2a614bd 29-May-2012 Stepan Dyatkovskiy <stpworld@narod.ru> ConstantRangesSet renamed to IntegersSubset. CRSBuilder renamed to IntegersSubsetMapping.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
b34d3aa35b199969168f41a12e92e5d2f0e9367f 28-May-2012 Peter Collingbourne <peter@pcc.me.uk> Add llvm.fabs intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157594 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
484fc93eff0295b1aa52b9a64d22346580e4b0e2 28-May-2012 Stepan Dyatkovskiy <stpworld@narod.ru> PR1255: Case Ranges
Implemented IntItem - the wrapper around APInt. Why not to use APInt item directly right now?
1. It will very difficult to implement case ranges as series of small patches. We got several large and heavy patches. Each patch will about 90-120 kb. If you replace ConstantInt with APInt in SwitchInst you will need to changes at the same time all Readers,Writers and absolutely all passes that uses SwitchInst.
2. We can implement APInt pool inside and save memory space. E.g. we use several switches that works with 256 bit items (switch on signatures, or strings). We can avoid value duplicates in this case.
3. IntItem can be easyly easily replaced with APInt.
4. Currenly we can interpret IntItem both as ConstantInt and as APInt. It allows to provide SwitchInst methods that works with ConstantInt for non-updated passes.

Why I need it right now? Currently I need to update SimplifyCFG pass (EqualityComparisons). I need to work with APInts directly a lot, so peaces of code
ConstantInt *V = ...;
if (V->getValue().ugt(AnotherV->getValue()) {
...
}
will look awful. Much more better this way:
IntItem V = ConstantIntVal->getValue();
if (AnotherV < V) {
}

Of course any reviews are welcome.

P.S.: I'm also going to rename ConstantRangesSet to IntegersSubset, and CRSBuilder to IntegersSubsetMapping (allows to map individual subsets of integers to the BasicBlocks).
Since in future these classes will founded on APInt, it will possible to use them in more generic ways.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
cf1d69df7e39a45fd1c7a07452271c586580164e 27-May-2012 Benjamin Kramer <benny.kra@googlemail.com> Missed parens.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157527 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
4fae58b32d4ff88f2df093514a0986c79e0c9e2c 27-May-2012 Benjamin Kramer <benny.kra@googlemail.com> r157525 didn't work, just disable iterator checking.

This is obviosly right but I don't see how to do this with proper vector
iterators without building a horrible mess of workarounds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157526 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
dc54f8ebe288c7313e22902d4bdfe030e479db48 27-May-2012 Benjamin Kramer <benny.kra@googlemail.com> SDAGBuilder: Avoid iterator invalidation harder.

vector.begin()-1 is invalid too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157525 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
5db954dab9a9e3c57c6e5194bf902a34a458d555 26-May-2012 Benjamin Kramer <benny.kra@googlemail.com> SDAGBuilder: Don't create an invalid iterator when there is only one switch case.

Found by libstdc++'s debug mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157522 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c511b2a5a1b91f08be6572ca7d7215c261176bc4 26-May-2012 Benjamin Kramer <benny.kra@googlemail.com> SelectionDAGBuilder: When emitting small compare chains for switches order them by using edge weights.

SimplifyCFG tends to form a lot of 2-3 case switches when merging branches. Move
the most likely condition to the front so it is checked first and the others can
be skipped. This is currently not as effective as it could be because SimplifyCFG
destroys profiling metadata when merging branches and switches. Merging branch
weight metadata is tricky though.

This code touches at most 3 cases so I didn't use a proper sorting algorithm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157521 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
d2ea0e10cbd158c93fb870cdd03001b9cd1156b8 25-May-2012 Justin Holewinski <jholewinski@nvidia.com> Change interface for TargetLowering::LowerCallTo and TargetLowering::LowerCall
to pass around a struct instead of a large set of individual values. This
cleans up the interface and allows more information to be added to the struct
for future targets without requiring changes to each and every target.

NV_CONTRIB

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157479 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
2db0e9ebb600a2e6b8f651f66a1ef50e0d3c3c6b 25-May-2012 Eli Friedman <eli.friedman@gmail.com> Simplify code for calling a function where CanLowerReturn fails, fixing a small bug in the process.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
05cfe2eda63e54a1e4c84b15136d154ab6393304 18-May-2012 Stepan Dyatkovskiy <stpworld@narod.ru> Recommited reworked r156804:
SelectionDAGBuilder::Clusterify : main functinality was replaced with CRSBuilder::optimize, so big part of Clusterify's code was reduced.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157046 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c187df2198bc6e2b038fa2d75af974644874d26f 17-May-2012 Stepan Dyatkovskiy <stpworld@narod.ru> SelectionDAGBuilder: CaseBlock, CaseRanges and CaseCmp changed representation of Low and High from signed to unsigned. Since unsigned ints usually simpler, faster and allows to reduce some extra signed bit checks needed before <,>,<=,>= comparisons.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156985 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c2c52a647098e72558f1831b7502a79fd22ead31 15-May-2012 Stepan Dyatkovskiy <stpworld@narod.ru> Rejected r156804 due to buildbots failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
a62e235c1c539aef38b94029035b46bd82f12357 15-May-2012 Stepan Dyatkovskiy <stpworld@narod.ru> SelectionDAGBuilder::Clusterify : main functinality was replaced with CRSBuilder::optimize, so big part of Clusterify's code was reduced.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156804 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
a6063c6e29746d9425bdf46d680e28a48dcf58f9 14-May-2012 Dan Gohman <gohman@apple.com> Rename @llvm.debugger to @llvm.debugtrap.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156774 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
d4347e1af9141ec9f8e3e527367bfd16c0cc4ffb 11-May-2012 Dan Gohman <gohman@apple.com> Define a new intrinsic, @llvm.debugger. It will be similar to __builtin_trap(),
but it generates int3 on x86 instead of ud2.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156593 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
95dd4420419a6daae6304ed490a50537094ed488 02-May-2012 Bill Wendling <isanbard@gmail.com> Strip the pointer casts off of allocas so that the selection DAG can find them.
PR10799


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155954 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
7eb46d834ccca887ab8fbd1d96080f9a4632bb48 11-Apr-2012 Craig Topper <craig.topper@gmail.com> Fix an overly indented line. Remove an 'else' after an 'if' that returns.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154479 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c42e640dc8a970c7d16934a16551c4c1a3b3acae 11-Apr-2012 Craig Topper <craig.topper@gmail.com> Inline implVisitAluOverflow by introducing a nested switch to convert the intrinsic to an nodetype.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154478 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
23de31b13bfde8dfe3d5c21322f5e08608725521 11-Apr-2012 Craig Topper <craig.topper@gmail.com> Optimize code a bit by calling push_back only once in some loops. Reduces compiled code size a bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154473 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
10612dc15f48cace9d62c7b5df772234a7c386e4 09-Apr-2012 Craig Topper <craig.topper@gmail.com> Optimize code a bit. No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154299 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
f873dde50264ffab16f3d12eaec8be91edfcc131 08-Apr-2012 Craig Topper <craig.topper@gmail.com> Simplify code that tries to do vector extracts for shuffles when the mask width and the input vector widths don't match. No need to check the min and max are in range before calculating the start index. The range check after having the start index is sufficient. Also no need to check for an extract from the beginning differently.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154295 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
b45c96995924d1b74f2a91e85e21be98709285cd 08-Apr-2012 Craig Topper <craig.topper@gmail.com> Turn avx2 vinserti128 intrinsic calls into INSERT_SUBVECTOR DAG nodes and remove patterns for selecting the intrinsic. Similar was already done for avx1.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154272 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
ad9fb01e86606e36965eb0cf53b27f296fd22948 07-Apr-2012 Craig Topper <craig.topper@gmail.com> Remove 'else' after 'if' that ends in return.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154267 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
95d594cac3737ae1594a391276942a443cac426b 31-Mar-2012 Rafael Espindola <rafael.espindola@gmail.com> Teach CodeGen's version of computeMaskedBits to understand the range metadata.
This is the CodeGen equivalent of r153747. I tested that there is not noticeable
performance difference with any combination of -O0/-O2 /-g when compiling
gcc as a single compilation unit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
9fc5c83fb7b86862d4a29bf416842a4f1a0084d5 28-Mar-2012 Eric Christopher <echristo@apple.com> More debug output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153571 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
7e1e18fa1eaac4019deeb0f0e9de93541c29a7a4 26-Mar-2012 Eric Christopher <echristo@apple.com> Add a debug statement.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
5aef7957ddf43d30c33137386fdd9cbfcc5944e4 22-Mar-2012 Evan Cheng <evan.cheng@apple.com> Assign node orders to target intrinsics which do not produce results. rdar://11096639

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153269 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
8f2a88d734601fe498564889bb2af877f4653ad9 15-Mar-2012 Eric Christopher <echristo@apple.com> Add another debug statement.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152843 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
3d3abe0852d5f499bed7ab014519dd582a0a795d 11-Mar-2012 Stepan Dyatkovskiy <stpworld@narod.ru> llvm::SwitchInst
Renamed methods caseBegin, caseEnd and caseDefault with case_begin, case_end, and case_default.
Added some notes relative to case iterators.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c10fa6c801e48771b5eade50afc2fe6abaf08227 08-Mar-2012 Stepan Dyatkovskiy <stpworld@narod.ru> Taken into account Duncan's comments for r149481 dated by 2nd Feb 2012:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120130/136146.html

Implemented CaseIterator and it solves almost all described issues: we don't need to mix operand/case/successor indexing anymore. Base iterator class is implemented as a template since it may be initialized either from "const SwitchInst*" or from "SwitchInst*".

ConstCaseIt is just a read-only iterator.
CaseIt is read-write iterator; it allows to change case successor and case value.

Usage of iterator allows totally remove resolveXXXX methods. All indexing convertions done automatically inside the iterator's getters.

Main way of iterator usage looks like this:
SwitchInst *SI = ... // intialize it somehow

for (SwitchInst::CaseIt i = SI->caseBegin(), e = SI->caseEnd(); i != e; ++i) {
BasicBlock *BB = i.getCaseSuccessor();
ConstantInt *V = i.getCaseValue();
// Do something.
}

If you want to convert case number to TerminatorInst successor index, just use getSuccessorIndex iterator's method.
If you want initialize iterator from TerminatorInst successor index, use CaseIt::fromSuccessorIndex(...) method.

There are also related changes in llvm-clients: klee and clang.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152297 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c27faccb3cf67e469f4217e98c20ef9ff2b95241 05-Mar-2012 Bill Wendling <isanbard@gmail.com> Fix warnings about adding a bool to a string.
Patch by Sean Silva!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152042 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
391016025a72612577cc7b8046fed60bed1aa858 01-Mar-2012 James Molloy <james.molloy@arm.com> Fix a codegen fault in which log2 or exp2 could be dead-code eliminated even though they could have sideeffects.

Only allow log2/exp2 to be converted to an intrinsic if they are declared "readnone".



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151807 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
4bfcd4acbc7d12aa55f8de9af84a38422f0f6d83 28-Feb-2012 Evan Cheng <evan.cheng@apple.com> Re-commit r151623 with fix. Only issue special no-return calls if it's a direct call.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
20bd5296cec8d8d597ab9db2aca7346a88e580c8 28-Feb-2012 Daniel Dunbar <daniel@zuster.org> Revert r151623 "Some ARM implementaions, e.g. A-series, does return stack prediction. ...", it is breaking the Clang build during the Compiler-RT part.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151630 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
1c239200e41a816dcd15f1c9a1ed911cb399bb2e 28-Feb-2012 Nadav Rotem <nadav.rotem@intel.com> Code cleanup following CR by Duncan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151627 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
21ef70ed4f655151a983788ce634787c995c7e2f 28-Feb-2012 Nadav Rotem <nadav.rotem@intel.com> Fix a bug in the code that builds SDNodes from vector GEPs.

When the GEP index is a vector of pointers, the code that calculated the size
of the element started from the vector type, and not the contained pointer type.
As a result, instead of looking at the data element pointed by the vector, this
code used the size of the vector. This works for 32bit members (on 32bit
systems), but not for other types. Added code to peel the vector type and
added a test.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151626 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
ec52aaa12f57896fc806e849fa21a61603050ac4 28-Feb-2012 Evan Cheng <evan.cheng@apple.com> Some ARM implementaions, e.g. A-series, does return stack prediction. That is,
the processor keeps a return addresses stack (RAS) which stores the address
and the instruction execution state of the instruction after a function-call
type branch instruction.

Calling a "noreturn" function with normal call instructions (e.g. bl) can
corrupt RAS and causes 100% return misprediction so LLVM should use a
unconditional branch instead. i.e.
mov lr, pc
b _foo
The "mov lr, pc" is issued in order to get proper backtrace.

rdar://8979299


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151623 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
8b93ff298cbaa8a16f950374e1be1f7e5114da8f 24-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> SDAGBuilder: Remove register sets that were never read and prune dead code surrounding it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151364 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
d18134f11621c2ff4d2bde6effb9c7115944f9fe 24-Feb-2012 Pete Cooper <peter_cooper@apple.com> Turn avx insert intrinsic calls into INSERT_SUBVECTOR DAG nodes and remove duplicate patterns for selecting the intrinsics

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151342 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
178606d92e636bb91ffbce3c4387ce059ed32953 24-Feb-2012 Eric Christopher <echristo@apple.com> If the Address of a variable is an argument then treat the entire
variable declaration as an argument because we want that address
anyhow for our debug information.

This seems to fix rdar://9965111, at least we have more debug
information than before and from reading the assembly it appears
to be the correct location.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151335 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
9e8ceb0bac778595c5dbabe900819c3f575c5e5f 24-Feb-2012 Bill Wendling <isanbard@gmail.com> Allow an integer to be converted into an MMX type when it's used in an inline
asm.
<rdar://problem/10106006>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151303 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
0822e010d1b55eb24e746a575a31235f45110ac3 23-Feb-2012 Eric Christopher <echristo@apple.com> More newline cleanups.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151235 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
244136770babf37d53db6b57a9e575097c73e3d0 23-Feb-2012 Eric Christopher <echristo@apple.com> Add some handy-dandy newlines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c9c137b463b953fbf8942f655d67f6dc1a0f7965 22-Feb-2012 Michael J. Spencer <bigcheesegs@gmail.com> Properly emit _fltused with FastISel. Refactor to share code with SDAG.
Patch by Joe Groff!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151183 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
0796134bde31f6d58d077f556fd08ca3734a9e6e 14-Feb-2012 Lang Hames <lhames@gmail.com> Rename getExceptionAddressRegister() to getExceptionPointerRegister() for consistency with setExceptionPointerRegister(...).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
bdf9db6f4905fcbbcdbdfed328ea8b36b655dd45 14-Feb-2012 Bill Wendling <isanbard@gmail.com> Don't reserve the R0 and R1 registers here. We don't use these registers, and
marking them as "live-in" into a BB ruins some invariants that the back-end
tries to maintain.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150437 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
8833ef03b9ceaa52063116819fff8b3d16fd8933 06-Feb-2012 Bill Wendling <isanbard@gmail.com> [unwind removal] Remove all of the code for the dead 'unwind' instruction. There
were no 'unwind' instructions being generated before this, so this is in effect
a no-op.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149906 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
24473120a253a05f3601cd3373403b47e6d03d41 01-Feb-2012 Stepan Dyatkovskiy <stpworld@narod.ru> SwitchInst refactoring.
The purpose of refactoring is to hide operand roles from SwitchInst user (programmer). If you want to play with operands directly, probably you will need lower level methods than SwitchInst ones (TerminatorInst or may be User). After this patch we can reorganize SwitchInst operands and successors as we want.

What was done:

1. Changed semantics of index inside the getCaseValue method:
getCaseValue(0) means "get first case", not a condition. Use getCondition() if you want to resolve the condition. I propose don't mix SwitchInst case indexing with low level indexing (TI successors indexing, User's operands indexing), since it may be dangerous.
2. By the same reason findCaseValue(ConstantInt*) returns actual number of case value. 0 means first case, not default. If there is no case with given value, ErrorIndex will returned.
3. Added getCaseSuccessor method. I propose to avoid usage of TerminatorInst::getSuccessor if you want to resolve case successor BB. Use getCaseSuccessor instead, since internal SwitchInst organization of operands/successors is hidden and may be changed in any moment.
4. Added resolveSuccessorIndex and resolveCaseIndex. The main purpose of these methods is to see how case successors are really mapped in TerminatorInst.
4.1 "resolveSuccessorIndex" was created if you need to level down from SwitchInst to TerminatorInst. It returns TerminatorInst's successor index for given case successor.
4.2 "resolveCaseIndex" converts low level successors index to case index that curresponds to the given successor.

Note: There are also related compatability fix patches for dragonegg, klee, llvm-gcc-4.0, llvm-gcc-4.2, safecode, clang.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149481 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
efd564fbd6b38964f717bf1c34f37f441eb5cf36 31-Jan-2012 Bill Wendling <isanbard@gmail.com> Remove the now-dead llvm.eh.exception and llvm.eh.selector intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
a78fa8cc2dd6d2ffe5e4fe605f38aae7b3d2fb7a 27-Jan-2012 Chris Lattner <sabre@nondot.org> continue making the world safe for ConstantDataVector. At this point,
we should (theoretically optimize and codegen ConstantDataVector as well
as ConstantVector.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149116 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
56243b89e7d5072d2d5498f806679d19ea483dac 26-Jan-2012 Chris Lattner <sabre@nondot.org> eliminate the Constant::getVectorElements method. There are better (and
more robust) ways to do what it was doing now. Also, add static methods
for decoding a ShuffleVector mask.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
0f193b8a6846dab25323788638e760ae03b7cd87 25-Jan-2012 Chris Lattner <sabre@nondot.org> Use the right method to get the # elements in a CDS.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148897 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
1ee0ecf84a07693c3a517ba030fac8ac1f9f3fbc 24-Jan-2012 Chris Lattner <sabre@nondot.org> add more support for ConstantDataSequential


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148802 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.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/SelectionDAG/SelectionDAGBuilder.cpp
f57e1c29dde4666ea4ec397dde72f991e5b9f854 17-Jan-2012 Pete Cooper <peter_cooper@apple.com> Changed flag operand of ISD::FP_ROUND to TargetConstant as it should not get checked for legalisation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148275 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
bf42139989695b35cf3e21be2e756bdc8c315ffb 16-Jan-2012 Pete Cooper <peter_cooper@apple.com> Changed intrinsic ID operand to a target constant as its not used in any arithmetic so should not be checked in legalisation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148228 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
515783466c24f9c5a9e6d9c7eb5ee7e4ab256358 04-Jan-2012 Craig Topper <craig.topper@gmail.com> Allow vector shuffle normalizing to use concat vector even if the sources are commuted in the shuffle mask.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147527 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
fcd70900630abd4a29d0b3fa9db6169159ddfb3c 04-Jan-2012 Chris Lattner <sabre@nondot.org> Turn a few more inline asm errors into "emitErrors" instead of fatal errors.

Before we'd get:

$ clang t.c
fatal error: error in backend: Invalid operand for inline asm constraint 'i'!

Now we get:

$ clang t.c
t.c:16:5: error: invalid operand for inline asm constraint 'i'!
"movq (%4), %%mm0\n"
^

Which at least gets us the inline asm that is the problem.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147502 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
517c4d7fdac82151f6f009ec5ba62f8727658678 03-Jan-2012 Owen Anderson <resistor@mac.com> Remove the restriction that target intrinsics can only involve legal types. Targets can perfects well support intrinsics on illegal types, as long as they are prepared to perform custom expansion during type legalization. For example, a target where i64 is illegal might still support the i64 intrinsic operation using pairs of i32's. ARM already does some expansions like this for non-intrinsic operations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147472 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
25101bb2a799a36be9f077ee2fc2dcf0df2b6efb 20-Dec-2011 Jakub Staszak <kubastaszak@gmail.com> Add some constantness to BranchProbabilityInfo and BlockFrequnencyInfo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146986 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
4e0adfa7f7fa5617a7a06028cdad0e4a50cac22a 15-Dec-2011 Owen Anderson <resistor@mac.com> Enable synthesis of FLOG2 and FEXP2 SelectionDAG nodes from libm calls. These are already marked as illegal by default.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146623 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
63974b2144c87c962effdc0508c27643c8ad98b6 13-Dec-2011 Chandler Carruth <chandlerc@gmail.com> Initial CodeGen support for CTTZ/CTLZ where a zero input produces an
undefined result. This adds new ISD nodes for the new semantics,
selecting them when the LLVM intrinsic indicates that the undef behavior
is desired. The new nodes expand trivially to the old nodes, so targets
don't actually need to do anything to support these new nodes besides
indicating that they should be expanded. I've done this for all the
operand types that I could figure out for all the targets. Owners of
various targets, please review and let me know if any of these are
incorrect.

Note that the expand behavior is *conservatively correct*, and exactly
matches LLVM's current behavior with these operations. Ideally this
patch will not change behavior in any way. For example the regtest suite
finds the exact same instruction sequences coming out of the code
generator. That's why there are no new tests here -- all of this is
being exercised by the existing test suite.

Thanks to Duncan Sands for reviewing the various bits of this patch and
helping me get the wrinkles ironed out with expanding for each target.
Also thanks to Chris for clarifying through all the discussions that
this is indeed the approach he was looking for. That said, there are
likely still rough spots. Further review much appreciated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146466 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
243eb9ecbbc6775e346e94025bd255bbceac9fca 08-Dec-2011 Owen Anderson <resistor@mac.com> Enhance both TargetLibraryInfo and SelectionDAGBuilder so that the latter can use the former to prevent the formation of libm SDNode's when -fno-builtin is passed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146193 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
4a4fdf3476473021f62d5b02e8ee8802f5b25e5a 08-Dec-2011 Owen Anderson <resistor@mac.com> Teach SelectionDAG to match more calls to libm functions onto existing SDNodes. Mark these nodes as illegal by default, unless the target declares otherwise.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146171 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
1608769abeb1430dc34f31ffac0d9850f99ae36a 05-Dec-2011 Nadav Rotem <nadav.rotem@intel.com> Add support for vectors of pointers.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.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/SelectionDAG/SelectionDAGBuilder.cpp
c80383095e1fd6a5567a0126b3ee551df8a2aacd 28-Nov-2011 Bill Wendling <isanbard@gmail.com> Remove dead llvm.eh.sjlj.dispatchsetup intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145263 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
f264568bae482601431e4ac923172fa3671eb9e7 22-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Fix an obvious omission in the SelectionDAGBuilder where we were
dropping weights on the floor for invokes. This was impeding my writing
further test cases for invoke when interacting with probabilities and
block placement.

No test case as there doesn't appear to be a way to test this stuff. =/
Suggestions for a test case of course welcome. I hope to be able to add
test cases that indirectly cover this eventually by adding probabilities
to the exceptional edge and reordering blocks as a result.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
8c2e35269c10914c16f351449fb9b8108ccb2556 15-Nov-2011 Jay Foad <jay.foad@gmail.com> Remove some unnecessary includes of PseudoSourceValue.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
d752e0f7e64585839cb3a458ef52456eaebbea3c 08-Nov-2011 Pete Cooper <peter_cooper@apple.com> Added invariant field to the DAG.getLoad method and changed all calls.

When this field is true it means that the load is from constant (runt-time or compile-time) and so can be hoisted from loops or moved around other memory accesses


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144100 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
794439183a29102c784484720c3d0b1960b297e6 26-Oct-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Don't use floating point to do an integer's job.

This code makes different decisions when compiled into x87 instructions
because of different rounding behavior. That caused phase 2/3
miscompares on 32-bit Linux when the phase 1 compiler was built with gcc
(using x87), and the phase 2 compiler was built with clang (using SSE).

This fixes PR11200.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
17001ce25cc205ac1cd2604492c2bce310964220 18-Oct-2011 Duncan Sands <baldrick@free.fr> Fix a bunch of unused variable warnings when doing a release
build with gcc-4.6.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142350 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
46bb70cd23762d58173dbbc4c5a1bd6964624381 18-Oct-2011 Hal Finkel <hfinkel@anl.gov> Fix comment to refer to correct instruction

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142334 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
4ed1fb009543effaeb31547fd1d4795a649c3b93 15-Oct-2011 Bill Wendling <isanbard@gmail.com> Clear out the landing pad to call site map for each function.

This isn't put into the 'clear()' method because the information needs to stick
around (at least for a little bit) after the selection DAG is built.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142032 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
459b74b9644c4741d93fe73adc2b06ca6bdb366d 13-Oct-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Encode register class constreaints in inline asm instructions.

The inline asm operand constraint is initially encoded in the virtual
register for the operand, but that register class may change during
coalescing, and the original constraint is lost.

Encode the original register class as part of the flag word for each
inline asm operand. This makes it possible to recover the actual
constraint required by inline asm, just like we can for normal
instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141833 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
5c75af6eb72bd74bc35f46e5037dd5646e04f3b6 13-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Use a utility from MathExtras to clarify a check and avoid undefined behavior. Based on patch by Ahmed Charles.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141829 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
ce370cfd891386d613d4bd0d28449d2705705d16 07-Oct-2011 Bill Wendling <isanbard@gmail.com> Thread the chain through the eh.sjlj.setjmp intrinsic, like it's documented to
do. This will be useful later on with the new SJLJ stuff.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141416 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
8540101252d3ff69f288e83821aa9f27b366227b 07-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Remove the old atomic instrinsics. autoupgrade functionality is included with this patch.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141333 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
30e6740f2e3d518ce1cfcd484ef728ac5764a645 06-Oct-2011 Bill Wendling <isanbard@gmail.com> Modify the mapping from landing pad to call sites to accept more than one call
site.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141226 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
a8512edb6d1c52209bad2d6b989599bc4872c913 05-Oct-2011 Bill Wendling <isanbard@gmail.com> Create a mapping between the landing pad basic block and the call site index for later use.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141125 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
8de34006cf4cd67ef11cac59dd037bb722b18166 01-Oct-2011 Nick Lewycky <nicholas@mxc.ca> Promote comment to doxycomment. Adjust whitespace. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
bb5a7442e362776621112dc9453e546a55878e79 29-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Clean up uses of switch instructions so they are not dependent on the operand ordering. Patch by Stepan Dyatkovskiy.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140803 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
12eb3ad5d6b7dea67ef5aa3b0618d95acf3f8acd 29-Sep-2011 Eric Christopher <echristo@apple.com> Use the local we already set up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140745 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
adbf7b2c567d42fcb12cfd69c2692da03d34d384 28-Sep-2011 Bill Wendling <isanbard@gmail.com> Strip off pointer casts when looking at the eh.sjlj.functioncontext's argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140678 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
6ef94175d1bbab95f195770bb3c559b3ab38c4e5 28-Sep-2011 Bill Wendling <isanbard@gmail.com> Create and use an llvm.eh.sjlj.functioncontext intrinsic.

This intrinsic is used to pass the index of the function context to the back-end
for further processing. The back-end is in charge of filling in the rest of the
entries.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140676 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
596f447467b35d7513c997cd9098026938676461 14-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Fix check for unaligned load/store so it doesn't catch over-aligned load/store.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139649 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
fe731214d2529f7b30527fc312964af411867dd0 13-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Error out on CodeGen of unaligned load/store. Fix test so it isn't accidentally testing that case.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139641 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c3ab388ba9574eb93c44ed57ea46acd4f623b5dc 10-Sep-2011 Chris Lattner <sabre@nondot.org> tidy up a bit


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139419 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
9aee335c23bec4f6d1b2cab3bca76231d7b0d556 09-Sep-2011 Devang Patel <dpatel@apple.com> Directly point debug info to the stack slot of the arugment, instead of trying to keep track of vreg in which it the arugment is copied. The LiveDebugVariable can keep track of variable's ranges.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
28b77e968d2b01fc9da724762bd8ddcd80650e32 06-Sep-2011 Duncan Sands <baldrick@free.fr> Add codegen support for vector select (in the IR this means a select
with a vector condition); such selects become VSELECT codegen nodes.
This patch also removes VSETCC codegen nodes, unifying them with SETCC
nodes (codegen was actually often using SETCC for vector SETCC already).
This ensures that various DAG combiner optimizations kick in for vector
comparisons. Passes dragonegg bootstrap with no testsuite regressions
(nightly testsuite as well as "make check-all"). Patch mostly by
Nadav Rotem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139159 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
4a544a79bd735967f1d33fe675ae4566dbd17813 06-Sep-2011 Duncan Sands <baldrick@free.fr> Split the init.trampoline intrinsic, which currently combines GCC's
init.trampoline and adjust.trampoline intrinsics, into two intrinsics
like in GCC. While having one combined intrinsic is tempting, it is
not natural because typically the trampoline initialization needs to
be done in one function, and the result of adjust trampoline is needed
in a different (nested) function. To get around this llvm-gcc hacks the
nested function lowering code to insert an additional parent variable
holding the adjust.trampoline result that can be accessed from the child
function. Dragonegg doesn't have the luxury of tweaking GCC code, so it
stored the result of adjust.trampoline in the memory GCC set aside for
the trampoline itself (this is always available in the child function),
and set up some new memory (using an alloca) to hold the trampoline.
Unfortunately this breaks Go which allocates trampoline memory on the
heap and wants to use it even after the parent has exited (!). Rather
than doing even more hacks to get Go working, it seemed best to just use
two intrinsics like in GCC. Patch mostly by Sanjoy Das.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139140 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
069e2ed794a90cb5108a35627ee148866795f140 26-Aug-2011 Eli Friedman <eli.friedman@gmail.com> Atomic load/store on ARM/Thumb.

I don't really like the patterns, but I'm having trouble coming up with a
better way to handle them.

I plan on making other targets use the same legalization
ARM-without-memory-barriers is using... it's not especially efficient, but
if anyone cares, it's not that hard to fix for a given target if there's
some better lowering.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138621 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
327236cd6c211e54fc6288b0ac2b413901cc0611 24-Aug-2011 Eli Friedman <eli.friedman@gmail.com> Basic x86 code generation for atomic load and store instructions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138478 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
1dafa70585bf9807efefb54c1f311bfe7bd9a3f3 23-Aug-2011 Evan Cheng <evan.cheng@apple.com> Fix 80 col violations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138356 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
2ac0e6be05d53323d305155fcf53d50c87d6a9b2 17-Aug-2011 Bill Wendling <isanbard@gmail.com> Add the support in code-gen for the landingpad instruction lowering.

The landingpad instruction is lowered into the EXCEPTIONADDR and EHSELECTION
SDNodes. The information from the landingpad instruction is harvested by the
'AddLandingPadInfo' function. The new EH uses the current EH scheme in the
back-end. This will change once we switch over to the new scheme. (Reviewed by
Jakob!)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137880 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
a65a3bc1a18c559f52a749dd13063b6ae3fdc779 17-Aug-2011 Bill Wendling <isanbard@gmail.com> Revert patch. Forgot a dependent commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
4eb20621438eb98fdbcdb0b224de7609d5ef76f2 17-Aug-2011 Bill Wendling <isanbard@gmail.com> Add the body of 'visitLandingPad'.

This generates the SDNodes for the new exception handling scheme. It takes the
two values coming from the landingpad instruction and assigns them to the
EXCEPTIONADDR and EHSELECTION nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137873 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
e6e8826870bee3facb04f950f0bd725f8a88623d 12-Aug-2011 Bill Wendling <isanbard@gmail.com> Initial commit of the 'landingpad' instruction.

This implements the 'landingpad' instruction. It's used to indicate that a basic
block is a landing pad. There are several restrictions on its use (see
LangRef.html for more detail). These restrictions allow the exception handling
code to gather the information it needs in a much more sane way.

This patch has the definition, implementation, C interface, parsing, and bitcode
support in it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
5787124820f9f544216675c020ff0b33e090d181 04-Aug-2011 Devang Patel <dpatel@apple.com> Do not drop undef debug values. These are used as range termination marker by live debug variable pass.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136834 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
26689ac37ebec3b358588089415509285e558de9 03-Aug-2011 Eli Friedman <eli.friedman@gmail.com> New approach to r136737: insert the necessary fences for atomic ops in platform-independent code, since a bunch of platforms (ARM, Mips, PPC, Alpha are the relevant targets here) need to do essentially the same thing.

I think this completes the basic CodeGen for atomicrmw and cmpxchg.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136813 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
dccc03b2423fe65efb5963ae816b99c24fc53374 31-Jul-2011 Bill Wendling <isanbard@gmail.com> Add the 'resume' instruction for the new EH rewrite.

This adds the 'resume' instruction class, IR parsing, and bitcode reading and
writing. The 'resume' instruction resumes propagation of an existing (in-flight)
exception whose unwinding was interrupted with a 'landingpad' instruction (to be
added later).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136589 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
10c6d12a9fd4dab411091f64db4db69670b88850 30-Jul-2011 Bill Wendling <isanbard@gmail.com> Revert r136253, r136263, r136269, r136313, r136325, r136326, r136329, r136338,
r136339, r136341, r136369, r136387, r136392, r136396, r136429, r136430, r136444,
r136445, r136446, r136253 pending review.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136556 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c8f34de5d615b858319f33d4e19c24622d971416 30-Jul-2011 Jakub Staszak <jstaszak@apple.com> Do not lose branch weights when lowering SwitchInst.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136529 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
95ece8efc0eac972366f1a5e97e3c7ae69a73600 29-Jul-2011 Jakub Staszak <jstaszak@apple.com> Remove unneeded const_cast.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136506 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
55ba816883842e793cdeb32fcb805c4e011b527f 29-Jul-2011 Eli Friedman <eli.friedman@gmail.com> Misc optimizer+codegen work for 'cmpxchg' and 'atomicrmw'. They appear to be
working on x86 (at least for trivial testcases); other architectures will
need more work so that they actually emit the appropriate instructions for
orderings stricter than 'monotonic'. (As far as I can tell, the ARM, PPC,
Mips, and Alpha backends need such changes.)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136457 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
741bf790b85595659c91d511c4ff60975180449f 29-Jul-2011 Bill Wendling <isanbard@gmail.com> Use the pointer type size.

With this, we can now compile a simple EH program.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
7d44c453511ce4c43e0a3c128f018f04c330d390 29-Jul-2011 Bill Wendling <isanbard@gmail.com> And now something that compiles...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136445 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
744b4bd170365a1e2953e8d28b676a26ee5425ba 29-Jul-2011 Bill Wendling <isanbard@gmail.com> Make sure to sext or trunc the result from the register.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136444 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
367853733247b46f2fa49359dd3490bada3cd111 29-Jul-2011 Bill Wendling <isanbard@gmail.com> Visit the landingpad instruction.

This generates the correct SDNodes for the landingpad instruction. It makes an
assumption that the result of the landingpad instruction has at least two
values. And that the first value is a pointer to the exception object and the
second value is the "selector."


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136430 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
ff03048c1350fcc4fda1ef6d6c57252f3a950854 28-Jul-2011 Eli Friedman <eli.friedman@gmail.com> LangRef and basic memory-representation/reading/writing for 'cmpxchg' and
'atomicrmw' instructions, which allow representing all the current atomic
rmw intrinsics.

The allowed operands for these instructions are heavily restricted at the
moment; we can probably loosen it a bit, but supporting general
first-class types (where it makes sense) might get a bit complicated,
given how SelectionDAG works.

As an initial cut, these operations do not support specifying an alignment,
but it would be possible to add if we think it's useful. Specifying an
alignment lower than the natural alignment would be essentially
impossible to support on anything other than x86, but specifying a greater
alignment would be possible. I can't think of any useful optimizations which
would use that information, but maybe someone else has ideas.

Optimizer/codegen support coming soon.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136404 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
7379b6650008fba555d5472d5c76e8efc59e8a21 28-Jul-2011 Bill Wendling <isanbard@gmail.com> The personality function should be a Function* and not just a Value*.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136392 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
14648468011c92a4210f8118721d58c25043daf8 28-Jul-2011 Eli Friedman <eli.friedman@gmail.com> Code generation for 'fence' instruction.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136283 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
772fe17a6d07304ae2e6b3052bbb24ebb751f0f3 27-Jul-2011 Bill Wendling <isanbard@gmail.com> Merge the contents from exception-handling-rewrite to the mainline.

This adds the new instructions 'landingpad' and 'resume'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136253 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
a44defeb2208376ca3113ffdddc391570ba865b8 27-Jul-2011 Jeffrey Yasskin <jyasskin@google.com> Explicitly cast narrowing conversions inside {}s that will become errors in
C++0x.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136211 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
47f3513dd574535aeb40c9eb11134f0899e92269 26-Jul-2011 Eli Friedman <eli.friedman@gmail.com> Initial implementation of 'fence' instruction, the new C++0x-style replacement for llvm.memory.barrier.

This is just a LangRef entry and reading/writing/memory representation; optimizer+codegen support coming soon.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136009 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.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/SelectionDAG/SelectionDAGBuilder.cpp
5427edeb68d653ced860ed14f83848ebbb01b64b 14-Jul-2011 Eric Christopher <echristo@apple.com> Check register class matching instead of width of type matching
when determining validity of matching constraint. Allow i1
types access to the GR8 reg class for x86.

Fixes PR10352 and rdar://9777108

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135180 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
3ff25514ce24a521fc9524eefb257a1f5f262d84 14-Jul-2011 Benjamin Kramer <benny.kra@googlemail.com> Don't emit a bit test if there is only one case the test can yield false. A simple SETNE is sufficient.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135126 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
fc6d3a49867cd38954dc40936a88f1907252c6d2 13-Jul-2011 Jay Foad <jay.foad@gmail.com> Convert InsertValueInst and ExtractValueInst APIs to use ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
33390848a7eca75301d04a59b89b516d83e19ee0 08-Jul-2011 Cameron Zwarich <zwarich@apple.com> Add an intrinsic and codegen support for fused multiply-accumulate. The intent
is to use this for architectures that have a native FMA instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134742 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
3492a4af129f6068739bbbe3f8c7fbe7e4af2fcb 08-Jul-2011 Benjamin Kramer <benny.kra@googlemail.com> Apparently we can't expect a BinaryOperator here.

Should fix llvm-gcc selfhost.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134699 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
9c64030445cbe6ac486b90c5f459f91e06770474 08-Jul-2011 Benjamin Kramer <benny.kra@googlemail.com> Emit a more efficient magic number multiplication for exact sdivs.

We have to do this in DAGBuilder instead of DAGCombiner, because the exact bit is lost after building.

struct foo { char x[24]; };
long bar(struct foo *a, struct foo *b) { return a-b; }
is now compiled into
movl 4(%esp), %eax
subl 8(%esp), %eax
sarl $3, %eax
imull $-1431655765, %eax, %eax
instead of
movl 4(%esp), %eax
subl 8(%esp), %eax
movl $715827883, %ecx
imull %ecx
movl %edx, %eax
shrl $31, %eax
sarl $2, %edx
addl %eax, %edx
movl %edx, %eax

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134695 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
9da9934e27dfb48de77b80a3e20ed2d869b52024 06-Jul-2011 Jakub Staszak <jstaszak@apple.com> Introduce "expect" intrinsic instructions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134516 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
5244c4cc2fd31e49bae2b192bd824a94b6ad5331 30-Jun-2011 Eric Christopher <echristo@apple.com> Remove getRegClassForInlineAsmConstraint and all dependencies.

Fixes rdar://9643582


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134123 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
f792fa90f1125553008659c743cba85b9b5d2e5e 27-Jun-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Distinguish early clobber output operands from clobbered registers.

Both become <earlyclobber> defs on the INLINEASM MachineInstr, but we
now use two different asm operand kinds.

The new Kind_Clobber is treated identically to the old
Kind_RegDefEarlyClobber for now, but x87 floating point stack inline
assembly does care about the difference.

This will pop a register off the stack:

asm("fstp %st" : : "t"(x) : "st");

While this will pop the input and push an output:

asm("fst %st" : "=&t"(r) : "t"(x));

We need to know if ST0 was a clobber or an output operand, and we can't
depend on <dead> flags for that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133902 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c6341e6e50cddc31a6411d9ac82be30747bc111e 19-Jun-2011 Nadav Rotem <nadav.rotem@intel.com> When promoting the vector elements in CopyToParts, use vector trunc
instead of scalarizing, and doing an element-by-element truncat.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133382 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
7cc2b07437a1243c33324549a1904fefc5f1845e 16-Jun-2011 Jakub Staszak <jstaszak@apple.com> Introduce MachineBranchProbabilityInfo class, which has similar API to
BranchProbabilityInfo (expect setEdgeWeight which is not available here).
Branch Weights are kept in MachineBasicBlocks. To turn off this analysis
set -use-mbpi=false.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133184 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
79c890f64f3b67f9b11341aa452c4302b75184aa 16-Jun-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Add TargetRegisterInfo::getRawAllocationOrder().

This virtual function will replace allocation_order_begin/end as the one
to override when implementing custom allocation orders. It is simpler to
have one function return an ArrayRef than having two virtual functions
computing different ends of the same array.

Use getRawAllocationOrder() in place of allocation_order_begin() where
it makes sense, but leave some clients that look like they really want
the filtered allocation orders from RegisterClassInfo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133170 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
9a767330f555f21d6ef311d3a348d3a44f306d35 14-Jun-2011 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Add one more argument to the prefetch intrinsic to indicate whether it's a data
or instruction cache access. Update the targets to match it and also teach
autoupgrade.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132976 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
b05f14b3b9b372316f4274de246b8a58cf6063eb 12-Jun-2011 Nadav Rotem <nadav.rotem@intel.com> Improve the generated code by getCopyFromPartsVector for promoted integer types.
Instead of scalarizing, and doing an element-by-element truncat, use vector
truncate.
Add support for scalarization of vectors: i8 -> <1 x i1> (from Duncan's
testcase).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132892 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
471e4224809f51652c71f319532697a879a75a0d 09-Jun-2011 Eric Christopher <echristo@apple.com> Add a parameter to CCState so that it can access the MachineFunction.

No functional change.

Part of PR6965


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132763 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
0b66636879bc478781ea6ed7541cdc1d13ee714d 04-Jun-2011 Nadav Rotem <nadav.rotem@intel.com> TypeLegalizer: Add support for passing of vector-promoted types in registers (copyFromParts/copyToParts).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132649 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
e0b42c02f0764ea9df9c17efffc7838203fb8f16 03-Jun-2011 Eric Christopher <echristo@apple.com> Add a TODO about memory operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
100c83341676d8aae8fc34b5452563ed08b14f3e 03-Jun-2011 Eric Christopher <echristo@apple.com> Have LowerOperandForConstraint handle multiple character constraints.

Part of rdar://9119939


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
9aaa02a1d26a0969e95b285ea1190920a5bb37db 01-Jun-2011 Eric Christopher <echristo@apple.com> Allow bitcasts between valid types of the same size and vector
types if the vector type is legal.

Fixes rdar://9306086


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132420 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
233857537f61a8f4ab93624986676c25b2271bc7 23-May-2011 Devang Patel <dpatel@apple.com> Preserve debug info during iSel by keeping DanglingDebugInfoMap live until end of function.
Patch by Micah Villmow


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131908 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
9db20f3bd89e51e0765ef21a9992f6dd5364a81e 23-May-2011 Chris Lattner <sabre@nondot.org> Eliminate some temporary variables, and don't call getByValTypeAlignment
when we're just going to throw the result away. No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131880 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
227dfdb3c44c5cc5ec140b4be89f618bdc59a133 16-May-2011 Devang Patel <dpatel@apple.com> Preserve debug info for unused zero extended boolean argument.
Radar 9422775.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
3fa82837441d716a225427f7a924f36d21db3a32 13-May-2011 Rafael Espindola <rafael.espindola@gmail.com> Make codegen able to handle values of empty types. This is one way
to fix PR9900. I will keep it open until sable is able to comment on it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131294 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
61512ba251097888963a8f07a35605564bcfc537 11-May-2011 Bill Wendling <isanbard@gmail.com> Give the 'eh.sjlj.dispatchsetup' intrinsic call the value coming from the setjmp
intrinsic call. This prevents it from being reordered so that it appears
*before* the setjmp intrinsic (thus making it completely useless).
<rdar://problem/9409683>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131174 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
7f33d677a9d6ea575795ac5948d492bb0f4c8fed 10-May-2011 Eli Friedman <eli.friedman@gmail.com> Disable my little CopyToReg argument hack with fast-isel. rdar://problem/9413587 .



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131156 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
cef81b7e519764c6a008a689bc4c6dfc9119f8e9 09-May-2011 Eric Christopher <echristo@apple.com> Look through struct wrapped types for inline asm statments.

Patch by Evan Cheng.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131093 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
ce1cdac94207a3bdfeb6b3b1b666e588dfdc6c3d 06-May-2011 Evan Cheng <evan.cheng@apple.com> 80 col violations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131015 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
23d3243e620064c69e4e6308156208f3205342c1 05-May-2011 Eli Friedman <eli.friedman@gmail.com> Avoid extra vreg copies for arguments passed in registers. Specifically, this can make MachineCSE more effective in some cases (especially in small functions). PR8361 / part of rdar://problem/8259436 .



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130928 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
06104e3743afc8988892bf66aab76e7fd5a885b3 25-Apr-2011 Devang Patel <dpatel@apple.com> A dbg.declare may not be in entry block, even if it is referring to an incoming argument. However, It is appropriate to emit DBG_VALUE referring to this incoming argument in entry block in MachineFunction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130129 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
7a2bdde0a0eebcd2125055e0eacaca040f0b766c 15-Apr-2011 Chris Lattner <sabre@nondot.org> Fix a ton of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129558 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c3e4e59d1017178fdff33d6e34635f498c98592f 09-Apr-2011 Chris Lattner <sabre@nondot.org> Avoid excess precision issues that lead to generating host-compiler-specific code.
Switch lowering probably shouldn't be using FP for this. This resolves PR9581.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129199 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
4da0c7c0c9081107bea5f6bac440f0f1eb47748f 08-Apr-2011 Evan Cheng <evan.cheng@apple.com> Change -arm-trap-func= into a non-arm specific option. Now Intrinsic::trap is lowered into a call to the specified trap function at sdisel time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129152 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
f05b1dcf870346094f8aaee8e387c92d3e47e98d 05-Apr-2011 Bill Wendling <isanbard@gmail.com> Revamp the SjLj "dispatch setup" intrinsic.

It needed to be moved closer to the setjmp statement, because the code directly
after the setjmp needs to know about values that are on the stack. Also, the
'bitcast' of the function context was causing a dead load. This wouldn't be too
horrible, except that at -O0 it wasn't optimized out, and because it wasn't
using the correct base pointer (if there is a VLA), it would try to access a
value from a garbage address.
<rdar://problem/9130540>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128873 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c249e4855883d7b799db61edc839cbfaff50ae81 01-Apr-2011 Evan Cheng <evan.cheng@apple.com> Add comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128730 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
8380c034b68d9d3768ee09b6fdc937696c93ee3d 01-Apr-2011 Evan Cheng <evan.cheng@apple.com> Assign node order numbers to results of call instruction lowering. This should improve src line debug info when sdisel is used. rdar://9199118

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128728 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
7d706ede7d7e5262bb22f75f1972f0eacbf7eab5 26-Mar-2011 Benjamin Kramer <benny.kra@googlemail.com> Turn SelectionDAGBuilder::GetRegistersForValue into a local function.

It couldn't be used outside of the file because SDISelAsmOperandInfo
is local to SelectionDAGBuilder.cpp. Making it a static function avoids
a weird linkage dance.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128342 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
7bbf0ee97c77f7712154648a44ac6eeb57886462 17-Mar-2011 Cameron Zwarich <zwarich@apple.com> Move more logic into getTypeForExtArgOrReturn.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127809 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
44579680111b807613703ab401db3b8c0148e36c 17-Mar-2011 Cameron Zwarich <zwarich@apple.com> Rename getTypeForExtendedInteger() to getTypeForExtArgOrReturn().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127807 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
ebe8173941238cfbabadb1c63bca7fb7dcf2adbe 16-Mar-2011 Cameron Zwarich <zwarich@apple.com> The x86-64 ABI says that a bool is only guaranteed to be sign-extended to a byte
rather than an int. Thankfully, this only causes LLVM to miss optimizations, not
generate incorrect code.

This just fixes the zext at the return. We still insert an i32 ZextAssert when
reading a function's arguments, but it is followed by a truncate and another i8
ZextAssert so it is not optimized.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127766 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
8df6bf5f5c8a55b089ef8b706bc0cc77ff16906c 16-Mar-2011 Cameron Zwarich <zwarich@apple.com> Don't recompute something that we already have in a local variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127764 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
778583ad2864949388a1cc645704f9ee76c9c0b9 11-Mar-2011 Andrew Trick <atrick@apple.com> Replace -dag-chain-limit flag with constant. It has survived a release cycle without being touched, so no longer needs to pollute the hidden-help text.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127468 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
95771afbfd604ad003fa3723cac66c9370fed55d 25-Feb-2011 Owen Anderson <resistor@mac.com> Allow targets to specify a the type of the RHS of a shift parameterized on the type of the LHS.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126518 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
3fc831779843bb4091f931b10ad0db1d97f82bd2 25-Feb-2011 Jim Grosbach <grosbach@apple.com> Fix formatting of debug helper string.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126471 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
e1497b979166765d97c91813a8e830a1ab8fbe12 24-Feb-2011 Cameron Zwarich <zwarich@apple.com> Refactor the LiveOutInfo interface into a few methods on FunctionLoweringInfo
and make the actual map private.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126376 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
4ecc82e592745d6995db83ea158b3c15011a84f8 22-Feb-2011 Cameron Zwarich <zwarich@apple.com> Roll out r126169 and r126170 in an attempt to fix the selfhost bot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126185 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
92efda7e9183ae16bde7a3ad96b682e779d89cf3 22-Feb-2011 Cameron Zwarich <zwarich@apple.com> Merge information about the number of zero, one, and sign bits of live-out registers
at phis. This enables us to eliminate a lot of pointless zexts during the DAGCombine
phase. This fixes <rdar://problem/8760114>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126170 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
a778f5c798fc78ca15f813c362cdcdcc1eb86266 18-Feb-2011 Devang Patel <dpatel@apple.com> Do not lose debug info of an inlined function argument even if the argument is only used through GEPs.
This time with a fix that avoids using invalidated DenseMap iterator.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125984 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
1646953538d5faf7baf49e16bd0590f822c231de 18-Feb-2011 Cameron Zwarich <zwarich@apple.com> Roll out r125794 to help diagnose the llvm-gcc-i386-linux-selfhost failure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125830 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
a4defc00ebf30f136ea96084b6a10c57441de6e7 18-Feb-2011 Devang Patel <dpatel@apple.com> Do not lose debug info of an inlined function argument even if the argument is only used through GEPs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125794 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
2ca5c8644e6c35b3a7910a576ed89cddb7b82c3b 15-Feb-2011 Chris Lattner <sabre@nondot.org> convert ConstantVector::get to use ArrayRef.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
75831904220042260c4faece8507a2807acba47f 14-Feb-2011 Chris Lattner <sabre@nondot.org> revert my ConstantVector patch, it seems to have made the llvm-gcc
builders unhappy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
283c8caccd093f8e1d4f0bdd01ac240b4edbd20a 14-Feb-2011 Chris Lattner <sabre@nondot.org> Switch ConstantVector::get to use ArrayRef instead of a pointer+size
idiom. Change various clients to simplify their code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125487 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
e075118489baf15a7cea2e7f155b4799b93d6d02 13-Feb-2011 Chris Lattner <sabre@nondot.org> Revisit my fix for PR9028: the issue is that DAGCombine was
generating i8 shift amounts for things like i1024 types. Add
an assert in getNode to prevent this from occuring in the future,
fix the buggy transformation, revert my previous patch, and
document this gotcha in ISDOpcodes.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
915eeb488786379250808d47668c43e010efe566 13-Feb-2011 Chris Lattner <sabre@nondot.org> when legalizing extremely wide shifts, make sure that
the shift amounts are in a suitably wide type so that
we don't generate out of range constant shift amounts.

This fixes PR9028.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125458 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
d3027738856d57ee22930deca0c7977fdc13e633 13-Feb-2011 Chris Lattner <sabre@nondot.org> fix visitShift to properly zero extend the shift amount if the provided operand
is narrower than the shift register. Doing an anyext provides undefined bits in
the top part of the register.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125457 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
ed4efd3358c69dc73eea174ac4b252402d17f471 28-Jan-2011 Nick Lewycky <nicholas@mxc.ca> Fix build with stdcxx by using llvm::next. Patch by Joerg Sonnenberger!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124472 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
8f31428119b842875ed50996708164b56f3c6a4e 25-Jan-2011 Devang Patel <dpatel@apple.com> Resolve DanglingDbgValue of PHI nodes where the use follows dbg.value intrinisic.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124203 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
a3ee3ef71b025de982cdda123bbfed44278b011a 24-Jan-2011 Devang Patel <dpatel@apple.com> Speculatively revert r124138.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124142 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
224a180d11891a80b4f00bdec77e7f5f465690ac 24-Jan-2011 Devang Patel <dpatel@apple.com> Resolve DanglingDbgValue of PHI nodes where the use follows dbg.value intrinisic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124138 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
16c29b5f285f375be53dabaa73e3e91107485fe4 10-Jan-2011 Anton Korobeynikov <asl@math.spbu.ru> Rename TargetFrameInfo into TargetFrameLowering. Also, put couple of FIXMEs and fixes here and there.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123170 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c9df025e33ac435adb3b3318d237c36ca7cec659 10-Jan-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Simplify a bunch of isVirtualRegister() and isPhysicalRegister() logic.

These functions not longer assert when passed 0, but simply return false instead.

No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123155 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
358de24dc121cd21911f3248b599178c86e9b467 09-Jan-2011 Jakob Stoklund Olesen <stoklund@2pi.dk> Use an IndexedMap for LiveOutRegInfo to hide its dependence on TargetRegisterInfo::FirstVirtualRegister.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123096 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c36b7069b42bece963b7e6adf020353ce990ef76 08-Jan-2011 Evan Cheng <evan.cheng@apple.com> Do not model all INLINEASM instructions as having unmodelled side effects.
Instead encode llvm IR level property "HasSideEffects" in an operand (shared
with IsAlignStack). Added MachineInstrs::hasUnmodeledSideEffects() to check
the operand when the instruction is an INLINEASM.

This allows memory instructions to be moved around INLINEASM instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123044 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
5e8b833707e6d59576d91b23a2c24e596eace60e 07-Jan-2011 Bob Wilson <bob.wilson@apple.com> Add ARM patterns to match EXTRACT_SUBVECTOR nodes.
Also fix an off-by-one in SelectionDAGBuilder that was preventing shuffle
vectors from being translated to EXTRACT_SUBVECTOR.
Patch by Tim Northover.

The test changes are needed to keep those spill-q tests from testing aligned
spills and restores. If the only aligned stack objects are spill slots, we
no longer realign the stack frame. Prior to this patch, an EXTRACT_SUBVECTOR
was legalized by loading from the stack, which created an aligned frame index.
Now, however, there is nothing except the spill slot in the stack frame, so
I added an aligned alloca.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122995 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
d08e5b48bc5d9177b1d70a1980a7805420a99085 06-Jan-2011 Evan Cheng <evan.cheng@apple.com> Avoid zero extend bit test operands to pointer type if all the masks fit in
the original type of the switch statement key.
rdar://8781238


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122935 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
f1b4eafbfec976f939ec0ea3e8acf91cef5363e3 21-Dec-2010 Chris Lattner <sabre@nondot.org> rename MVT::Flag to MVT::Glue. "Flag" is a terrible name for
something that just glues two nodes together, even if it is
sometimes used for flags.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122310 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
d5b4db982478e349a8c8759da182636b888b875f 13-Dec-2010 Chris Lattner <sabre@nondot.org> reduce indentation by using continue, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121662 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
40f8f6264d5af2c38e797e0dc59827cd231e8ff7 07-Dec-2010 Jay Foad <jay.foad@gmail.com> PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() and
zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method
trunc(), to be const and to return a new value instead of modifying the
object in place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121120 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
afeaae7a940ce16e7874af31f3e5e91d8ca89e19 06-Dec-2010 Devang Patel <dpatel@apple.com> If dbg_declare() or dbg_value() is not lowered by isel then emit DEBUG message instead of creating DBG_VALUE for undefined value in reg0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121059 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
de189be53f5831737f38e720f10dbcdcce6876c6 30-Nov-2010 Chris Lattner <sabre@nondot.org> add TLI support indicating that jumps are more expensive than logical operations
and use this to disable a specific optimization. Patch by Micah Villmow!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120435 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
bf17cfa3f904e488e898ac2e3af706fd1a892f08 23-Nov-2010 Wesley Peck <peckw@wesleypeck.com> Renaming ISD::BIT_CONVERT to ISD::BITCAST to better reflect the LLVM IR concept.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119990 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
ce750f03322fe29ced3aca0718424fe173f22298 22-Nov-2010 Benjamin Kramer <benny.kra@googlemail.com> Implement the "if (X == 6 || X == 4)" -> "if ((X|2) == 6)" optimization.

This currently only catches the most basic case, a two-case switch, but can be
extended later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119964 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
b9e6fe1e3afe3c4cdbdddfb563adc10c439dc296 20-Nov-2010 Andrew Trick <atrick@apple.com> Removing the useless test that I added recently. It was meant as an example, but not complicated enough to merit another test.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119898 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
7730318000e8b1b0779eb773c87e29eb9f24d930 18-Nov-2010 John Thompson <John.Thompson.JTSoftware@gmail.com> Bug 8621 fix - pointer cast stripped from inline asm constraint argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119590 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
f06202f8e80a4b5ef579712e792cf6c416ece601 12-Nov-2010 Andrew Trick <atrick@apple.com> typo (4th checkin for one fix)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118913 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
de91f3c5eb3d6dc222e62f2e6ea2597674c41a84 12-Nov-2010 Andrew Trick <atrick@apple.com> Fixes PR8287: SD scheduling time. The fix is a failsafe that prevents
catastrophic compilation time in the event of unreasonable LLVM
IR. Code quality is a separate issue--someone upstream needs to do a
better job of reducing to llvm.memcpy. If the situation can be reproduced with
any supported frontend, then it will be a separate bug.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
a29aae7aca6d8b9a9e95238d7e4067d8c16b0079 12-Nov-2010 Chris Lattner <sabre@nondot.org> tidy up.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118896 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
efb8a9d0c2c6be209c6e34f4249ff14fc232bf9f 11-Nov-2010 Dan Gohman <gohman@apple.com> Remove the memmove->memcpy optimization from CodeGen. MemCpyOpt does this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118789 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
1440e8b918d7116c3587cb95f4f7ac7a0a0b65ad 03-Nov-2010 Duncan Sands <baldrick@free.fr> Inside the calling convention logic LocVT is always a simple
value type, so there is no point in passing it around using
an EVT. Use the simpler MVT everywhere. Rather than trying
to propagate this information maximally in all the code that
using the calling convention stuff, I chose to do a mainly
low impact change instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118167 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
8bc9ef77b7e9910fbeb40725dfa49d793158db51 02-Nov-2010 Devang Patel <dpatel@apple.com> If value map does not have register for an argument then try to find frame index before giving up.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118022 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
a90b305af910f0cbfa0c6934a2034a2a0444e715 02-Nov-2010 Devang Patel <dpatel@apple.com> Use frameindex, if available, as a last resort to emit debug info for a parameter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118020 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.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/SelectionDAG/SelectionDAGBuilder.cpp
1de4aa904e9672abfc2e755d798c926d324e2d36 27-Oct-2010 Dale Johannesen <dalej@apple.com> Use a MemIntrinsicSDNode for ISD::PREFETCH, which touches
memory, so a MachineMemOperand is useful (not propagated
into the MachineInstr yet). No functional change except
for dump output.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
7e13efad388f86a4adcb48ec164ee0ba154d0296 27-Oct-2010 Devang Patel <dpatel@apple.com> Assign source ordering to nodes created for StoreInst.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117404 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
391b43bf33b77cb73966c9582d5b3fdfe0c38e80 21-Oct-2010 Michael J. Spencer <bigcheesegs@gmail.com> X86: Base _fltused on the FunctionType of the called value instead of the potentially null "CalledFunction". Thanks Duncan!

This is needed for indirect calls.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117061 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
dd0a00a6e377b11c3c122e111da3d1f53f13756d 21-Oct-2010 Michael J. Spencer <bigcheesegs@gmail.com> CodeGen-Windows: Only emit _fltused if a VarArg function is called with floating point args.
This should be the minimum set of functions that could possibly need it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116978 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
f96e4bd2a3b11928af75fb7472288930d16fec0b 20-Oct-2010 Dan Gohman <gohman@apple.com> Make CodeGen TBAA-aware.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116890 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
e4ad387a5a88dae20f0f7578e55170bbc8eee2a9 20-Oct-2010 Jim Grosbach <grosbach@apple.com> Add a pre-dispatch SjLj EH hook on the unwind edge for targets to do any
setup they require. Use this for ARM/Darwin to rematerialize the base
pointer from the frame pointer when required. rdar://8564268

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116879 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
84ac4d5a2a8fd0e6f95ec46088c0ca7bb63423ac 16-Oct-2010 Michael J. Spencer <bigcheesegs@gmail.com> X86-Windows: Emit an undefined global __fltused symbol when targeting Windows
if any floating point arguments are passed to an external function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116665 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
e70c526d59e92048c89281d1b7011af0b1d9ee95 16-Oct-2010 Michael J. Spencer <bigcheesegs@gmail.com> Whitespace!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116664 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.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/SelectionDAG/SelectionDAGBuilder.cpp
27f46cd6397c456df6f6f22a46752e64c0954fca 01-Oct-2010 Devang Patel <dpatel@apple.com> Fix code gen crash reported in PR 8235. We still lose debug info for the unused argument here. This is a known limitation recorded debuginfo-tests/trunk/dbg-declare2.ll function 'f6' test case.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115323 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
fb4032f4223bfec5a1f76f13c501ea333f7af55f 01-Oct-2010 Gabor Greif <ggreif@gmail.com> typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115310 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
6bf263b4a2837161f827dbd711957d0e3ffa16e2 01-Oct-2010 Chris Lattner <sabre@nondot.org> fix typo


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115300 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
0488fb649a56b7fc89a5814df5308813f9e5a85d 01-Oct-2010 Dale Johannesen <dalej@apple.com> Massive rewrite of MMX:
The x86_mmx type is used for MMX intrinsics, parameters and
return values where these use MMX registers, and is also
supported in load, store, and bitcast.

Only the above operations generate MMX instructions, and optimizations
do not operate on or produce MMX intrinsics.

MMX-sized vectors <2 x i32> etc. are lowered to XMM or split into
smaller pieces. Optimizations may occur on these forms and the
result casted back to x86_mmx, provided the result feeds into a
previous existing x86_mmx operation.

The point of all this is prevent optimizations from introducing
MMX operations, which is unsafe due to the EMMS problem.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115243 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
2622f4622c36ec9924fb908085154ffdd7174aff 30-Sep-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> When isel is emitting instructions for an x86 target without CMOV, the CFG is
edited during emission.

If the basic block ends in a switch that gets lowered to a jump table, any
phis at the default edge were getting updated wrong. The jump table data
structure keeps a pointer to the header blocks that wasn't getting updated
after the MBB is split.

This bug was exposed on 32-bit Linux when disabling critical edge splitting in
codegen prepare.

The fix is to uipdate stale MBB pointers whenever a block is split during
emission.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115191 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
54584743f3827c7fd9e247db25cc5cfedaa9bab9 25-Sep-2010 John Thompson <John.Thompson.JTSoftware@gmail.com> Fix for test/CodeGen/PowerPC/2008-10-17-AsmMatchingOperands.ll crash.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114767 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
1f4096054367cab3acab3a74c719ef6d3090606a 24-Sep-2010 Michael J. Spencer <bigcheesegs@gmail.com> Get rid of pop_macro warnings on MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114750 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
8c1f4329e2f90dea203f3a85a992865e936dea4a 23-Sep-2010 Evan Cheng <evan.cheng@apple.com> Revert 114634 for now since buildbot claim it broke Clang self-hosting. I doubt it but it's possible it's exposing another bug somewhere.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
b8db1981b8cdd7cc52a9ad94a12c73e4fb1e8b39 23-Sep-2010 Evan Cheng <evan.cheng@apple.com> Follow up to r114630. Do not optimize away unconditional branch following a conditional one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
266a99d161069071f32c7c09dded481fd573a82e 23-Sep-2010 Evan Cheng <evan.cheng@apple.com> SDISel should not optimize a unconditional branch following a conditional branch
when the unconditional branch destination is the fallthrough block. The
canonicalization makes it easier to allow optimizations on DAGs to invert
conditional branches. The branch folding pass (and AnalyzeBranch) will clean up
the unnecessary unconditional branches later.

This is one of the patches leading up to disabling codegen prepare critical edge
splitting.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114630 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
84bd98ac7b9f9eaa0c4259b510847481a45844a7 21-Sep-2010 Chris Lattner <sabre@nondot.org> finish pushing MachinePointerInfo through selectiondags. At this point,
I think I've audited all uses, so it should be dependable for address spaces,
and the pointer+offset info should also be accurate when there.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114464 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
65ffec49f73d1f8856211b107712c58cc9636b78 21-Sep-2010 Bob Wilson <bob.wilson@apple.com> Define the TargetLowering::getTgtMemIntrinsic hook for ARM so that NEON load
and store intrinsics are represented with MemIntrinsicSDNodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114454 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
ecf42c4720aba6ee315d0166045c54187ac2de4d 21-Sep-2010 Chris Lattner <sabre@nondot.org> continue MachinePointerInfo'izing, eliminating use of one of the old
getLoad overloads.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114443 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
e72f2027e9116c55a5b39ac72732df8d6c45d37c 21-Sep-2010 Chris Lattner <sabre@nondot.org> reimplement memcpy/memmove/memset lowering to use MachinePointerInfo
instead of srcvalue/offset pairs. This corrects SV info for mem
operations whose size is > 32-bits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114401 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
e9ba5dd236f48708a00bd3bb0519148f943cc897 21-Sep-2010 Chris Lattner <sabre@nondot.org> simplify interface to SelectionDAG::getMemIntrinsicNode, making it take a MachinePointerInfo


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114397 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
60bddc8bcd787be645d2f3b64117fee884270e6a 21-Sep-2010 Chris Lattner <sabre@nondot.org> chagne interface to SelectionDAG::getAtomic to take a MachinePointerInfo,
eliminating some weird "infer a frame address" logic which was dead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114396 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
27ede1ba6daa893557db477fe3252084fd9f6147 15-Sep-2010 Devang Patel <dpatel@apple.com> Check bb to ensure that alloca is in separate basic block.
This fixes funcargs.exp regression reported by gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
1397fdc0ab272a6a295149fba0903f65a6d1885e 15-Sep-2010 Devang Patel <dpatel@apple.com> If dbg.declare from non-entry block is using alloca from entry block then use offset available in StaticAllocaMap to emit DBG_VALUE. Right now, this has no material impact because varible info also collected using offset table maintained in machine module info.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
eac6e1d0c748afc3d1496be0753ffbe5f5a4279b 13-Sep-2010 John Thompson <John.Thompson.JTSoftware@gmail.com> Added skeleton for inline asm multiple alternative constraint support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113766 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
3f74a116c80b483ffc7c2e6922ff62f0f73d83f5 02-Sep-2010 Devang Patel <dpatel@apple.com> Detect undef value early and save unnecessary NodeMap query.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112864 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
8e741ed2fa16f46ab586bf3a54526cd9c2338c5b 02-Sep-2010 Devang Patel <dpatel@apple.com> Tidy up.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
0b48eade42022c929fcf0f2afcffdf849c5bd05a 01-Sep-2010 Devang Patel <dpatel@apple.com> Reapply r112623. Included additional check for unused byval argument.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112659 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
81b79b5fa808730d102cdc4b60a52e602d425de5 31-Aug-2010 Devang Patel <dpatel@apple.com> Revert r112623. It is causing self host build failures.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112631 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
8480c2e314f6c01638ea16f32149417848352085 31-Aug-2010 Devang Patel <dpatel@apple.com> Remember byval argument's frame index during argument lowering and use this info to emit debug info.
Fixes Radar 8367011.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112623 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
34ca5ed79717c9a3dad2bf5823d3747aaedbc74a 31-Aug-2010 Devang Patel <dpatel@apple.com> Offset is not always unsigned number.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112584 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
61c70e98ac3c7504d31dd9bc81c4e9cb998e9984 28-Aug-2010 Chris Lattner <sabre@nondot.org> remove unions from LLVM IR. They are severely buggy and not
being actively maintained, improved, or extended.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112356 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
badcda4afa35bf86ce2e6e77ca20f1ce2365b549 28-Aug-2010 Dan Gohman <gohman@apple.com> Completely disable tail calls when fast-isel is enabled, as fast-isel
doesn't currently support dealing with this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112341 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
0991dfbbe048a88c0f85618f8c9a21d11b34d69c 28-Aug-2010 Devang Patel <dpatel@apple.com> Simplify.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112305 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
4cf81c47fe060fad290ea6b95388d1da7fad105a 27-Aug-2010 Devang Patel <dpatel@apple.com> Revert r112213. It is not needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112242 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
6cd467bd0e31df2decdf7081868810ef822b64d3 27-Aug-2010 Devang Patel <dpatel@apple.com> If node is not available then use FuncInfo.ValueMap to emit debug info for byval parameter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112238 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
e130d78ee193b2dcd49b61d52a9946a4e70b696f 26-Aug-2010 Devang Patel <dpatel@apple.com> Speculatively revert r112207.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112216 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
8f09beacb172b9f66ec561e6c31e164e217aafda 26-Aug-2010 Devang Patel <dpatel@apple.com> 80 col.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112215 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
f2ec7ae2799c149e4eccfb5a3632f9ba8c6dae7b 26-Aug-2010 Devang Patel <dpatel@apple.com> Update DanglingDebugInfo so that it can be used to track llvm.dbg.declare also.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112213 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
9d0796a0e06e3b44bbdd696259f80066c285d9c3 26-Aug-2010 Devang Patel <dpatel@apple.com> Donot forget to resolve dangling debug info in a case where virtual register, used for a value, is initialized after a dbg intrinsic is seen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112207 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
6dabd9dba013173460c0b95e6b41b5776c66270d 26-Aug-2010 Chris Lattner <sabre@nondot.org> zap dead code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112155 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
e6f7c267df11a44679c35dec79787fbc276839fb 26-Aug-2010 Chris Lattner <sabre@nondot.org> Change handling of illegal vector types to widen when possible instead of
expanding: e.g. <2 x float> -> <4 x float> instead of -> 2 floats. This
affects two places in the code: handling cross block values and handling
function return and arguments. Since vectors are already widened by
legalizetypes, this gives us much better code and unblocks x86-64 abi
and SPU abi work.

For example, this (which is a silly example of a cross-block value):
define <4 x float> @test2(<4 x float> %A) nounwind {
%B = shufflevector <4 x float> %A, <4 x float> undef, <2 x i32> <i32 0, i32 1>
%C = fadd <2 x float> %B, %B
br label %BB
BB:
%D = fadd <2 x float> %C, %C
%E = shufflevector <2 x float> %D, <2 x float> undef, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
ret <4 x float> %E
}

Now compiles into:

_test2: ## @test2
## BB#0:
addps %xmm0, %xmm0
addps %xmm0, %xmm0
ret

previously it compiled into:

_test2: ## @test2
## BB#0:
addps %xmm0, %xmm0
pshufd $1, %xmm0, %xmm1
## kill: XMM0<def> XMM0<kill> XMM0<def>
insertps $0, %xmm0, %xmm0
insertps $16, %xmm1, %xmm0
addps %xmm0, %xmm0
ret

This implements rdar://8230384



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112101 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
78a06e50b74e5390e3d77bd80d0393191820c7c2 25-Aug-2010 Devang Patel <dpatel@apple.com> Remove dead argument.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112085 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
3ac18845098b34b7b76c6fa4b95cfde7752ff8ad 25-Aug-2010 Chris Lattner <sabre@nondot.org> split the vector case of getCopyFromParts out to its own function,
no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
a13b860f4de136687cb219cdcd93d3e18a8c239e 25-Aug-2010 Chris Lattner <sabre@nondot.org> split the vector case out of getCopyToParts into its own function. No
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111990 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
7da5d3fc657bf434a245d11ad91f22feb86296c5 26-Jul-2010 Dan Gohman <gohman@apple.com> Handle Values with no value in getCopyFromRegs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109415 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
2b8271e0298f4218d6dddc80b49b51b38a646353 17-Jul-2010 Eric Christopher <echristo@apple.com> Propagate alloca alignment information via variable size object frame
information.

No functional change yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
9c3d5e41b94ff51dc78ae42397151b52d9c2b546 16-Jul-2010 Dan Gohman <gohman@apple.com> Revert r108369, sorting llvm.dbg.declare information by source position,
since it doesn't work for front-ends which don't emit column information
(which includes llvm-gcc in its present configuration), and doesn't
work for clang for K&R style variables where the variables are declared
in a different order from the parameter list.

Instead, make a separate pass through the instructions to collect the
llvm.dbg.declare instructions in order. This ensures that the debug
information for variables is emitted in this order.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108538 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
bdc09d9b0943a8c5cee29c4f87666eaa97e081d4 16-Jul-2010 Dale Johannesen <dalej@apple.com> The SelectionDAGBuilder's handling of debug info, on rare
occasions, caused code to be generated in a different order.
All cases I've seen involved float softening in the type
legalizer, and this could be perhaps be fixed there, but
it's better not to generate things differently in the first
place. 7797940 (6/29/2010..7/15/2010).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108484 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
a60f0e7f817f170df55371491e246b95b0d8d6b0 16-Jul-2010 Bill Wendling <isanbard@gmail.com> Revert. This isn't the correct way to go.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108478 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
e9bf7e692e56656ef13b33af86624d0fdcd578fb 16-Jul-2010 Bill Wendling <isanbard@gmail.com> Handle code gen for the unreachable instruction if it's the only instruction in
the function. We'll just turn it into a "trap" instruction instead.

The problem with not handling this is that it might generate a prologue without
the equivalent epilogue to go with it:

$ cat t.ll
define void @foo() {
entry:
unreachable
}
$ llc -o - t.ll -relocation-model=pic -disable-fp-elim -unwind-tables
.section __TEXT,__text,regular,pure_instructions
.globl _foo
.align 4, 0x90
_foo: ## @foo
Leh_func_begin0:
## BB#0: ## %entry
pushq %rbp
Ltmp0:
movq %rsp, %rbp
Ltmp1:
Leh_func_end0:
...

The unwind tables then have bad data in them causing all sorts of problems.

Fixes <rdar://problem/8096481>.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108473 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
723a05a66f0c7b2ba8a9e0bc162cf6a44c5569be 15-Jul-2010 Eric Christopher <echristo@apple.com> 80-col.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108381 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
b5611a623012fc373ea21d9c062b8a38c0ac75c7 13-Jul-2010 Dale Johannesen <dalej@apple.com> In inline asm treat indirect 'X' constraint as 'm'.
This may not be right in all cases, but it's better
than asserting which it was doing before. PR 7528.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108268 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
9d544d04166b971ab5ca1ee7ee37465b4af6bbf5 12-Jul-2010 Rafael Espindola <rafael.espindola@gmail.com> Fix a typo and fit in 80 columns. Found by Bob Wilson.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108164 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
cbeeae23c31d32b833c9c7c3e8984e4cbcf22f45 11-Jul-2010 Rafael Espindola <rafael.espindola@gmail.com> Fix va_arg for doubles. With this patch VAARG nodes always contain the
correct alignment information, which simplifies ExpandRes_VAARG a bit.

The patch introduces a new alignment information to TargetLoweringInfo. This is
needed since the two natural candidates cannot be used:

* The 's' in target data: If this is set to the minimal alignment of any
argument, getCallFrameTypeAlignment would return 4 for doubles on ARM for
example.
* The getTransientStackAlignment method. It is possible for an architecture to
have argument less aligned than what we maintain the stack pointer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108072 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
84023e0fbefc406a4c611d3d64a10df5d3a97dd7 10-Jul-2010 Dan Gohman <gohman@apple.com> Reapply bottom-up fast-isel, with several fixes for x86-32:
- Check getBytesToPopOnReturn().
- Eschew ST0 and ST1 for return values.
- Fix the PIC base register initialization so that it doesn't ever
fail to end up the top of the entry block.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108039 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
02266e29f9250d74c5ec720aff23add3410ae920 09-Jul-2010 Bob Wilson <bob.wilson@apple.com> --- Reverse-merging r107947 into '.':
U utils/TableGen/FastISelEmitter.cpp
--- Reverse-merging r107943 into '.':
U test/CodeGen/X86/fast-isel.ll
U test/CodeGen/X86/fast-isel-loads.ll
U include/llvm/Target/TargetLowering.h
U include/llvm/Support/PassNameParser.h
U include/llvm/CodeGen/FunctionLoweringInfo.h
U include/llvm/CodeGen/CallingConvLower.h
U include/llvm/CodeGen/FastISel.h
U include/llvm/CodeGen/SelectionDAGISel.h
U lib/CodeGen/LLVMTargetMachine.cpp
U lib/CodeGen/CallingConvLower.cpp
U lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
U lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
U lib/CodeGen/SelectionDAG/FastISel.cpp
U lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
U lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
U lib/CodeGen/SelectionDAG/InstrEmitter.cpp
U lib/CodeGen/SelectionDAG/TargetLowering.cpp
U lib/Target/XCore/XCoreISelLowering.cpp
U lib/Target/XCore/XCoreISelLowering.h
U lib/Target/X86/X86ISelLowering.cpp
U lib/Target/X86/X86FastISel.cpp
U lib/Target/X86/X86ISelLowering.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
bf87e2491789d6ff788629e22e93d0c1ca02ae85 09-Jul-2010 Dan Gohman <gohman@apple.com> Re-apply bottom-up fast-isel, with fixes. Be very careful to avoid emitting
a DBG_VALUE after a terminator, or emitting any instructions before an EH_LABEL.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
f59514152511694d46ca8b8d2db466d256ab5759 08-Jul-2010 Dan Gohman <gohman@apple.com> Revert 107840 107839 107813 107804 107800 107797 107791.
Debug info intrinsics win for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107850 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
4df83ed159f21fdf73a57729c3e9d8c9fcd73607 07-Jul-2010 Dan Gohman <gohman@apple.com> Implement bottom-up fast-isel. This has the advantage of not requiring
a separate DCE pass over MachineInstrs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107804 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
f423a69839c4810b890f8a8b09fb8cfbd6bf0139 07-Jul-2010 Dan Gohman <gohman@apple.com> Add X86FastISel support for return statements. This entails refactoring
a bunch of stuff, to allow the target-independent calling convention
logic to be employed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
4c3fd9f92f89810d659973d2666ab729758de64a 07-Jul-2010 Dan Gohman <gohman@apple.com> Move FunctionLoweringInfo.h out into include/llvm/CodeGen. This will
allow target-specific fast-isel code to make use of it directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107787 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c9403659a98bf6487ab6fbf40b81628b5695c02e 07-Jul-2010 Dan Gohman <gohman@apple.com> Split the SDValue out of OutputArg so that SelectionDAG-independent
code can do calling-convention queries. This obviates OutputArgReg.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107786 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c9af33c6854afe7b082af2d892ec5f05dfa383c7 07-Jul-2010 Dan Gohman <gohman@apple.com> CanLowerReturn doesn't need a SelectionDAG; it just needs an LLVMContext.

SelectBasicBlock doesn't needs its BasicBlock argument.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107712 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
0d881dabc1a4e1aefad6dd38de166d8358285638 07-Jul-2010 Devang Patel <dpatel@apple.com> Propagate debug loc.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107710 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
598751ed2544291ba623e013b4e0b61bf56ca9c4 05-Jul-2010 Chris Lattner <sabre@nondot.org> random tidying


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
f1e309eb4862459a76445942ba4dafc433b6f317 02-Jul-2010 Dale Johannesen <dalej@apple.com> Propagate the AlignStack bit in InlineAsm's to the
PrologEpilog code, and use it to determine whether
the asm forces stack alignment or not. gcc consistently
does not do this for GCC-style asms; Apple gcc inconsistently
sometimes does it for asm blocks. There is no
convenient place to put a bit in either the SDNode or
the MachineInstr form, so I've added an extra operand
to each; unlovely, but it does allow for expansion for
more bits, should we need it. PR 5125. Some
existing testcases are affected.
The operand lists of the SDNode and MachineInstr forms
are indexed with awesome mnemonics, like "2"; I may
fix this someday, but not now. I'm not making it any
worse. If anyone is inspired I think you can find all
the right places from this patch.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107506 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
89496d0eb73ab8771b27b3d9c1db6492d8eefc3a 02-Jul-2010 Dan Gohman <gohman@apple.com> Rename CreateReg to CreateRegs, and MakeReg to CreateReg.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107451 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
ffda6bac113d4c079b534b1bfa7aea5498ee3e83 01-Jul-2010 Dan Gohman <gohman@apple.com> Rename CreateRegForValue to CreateReg, and change its argument
from a Value to a Type, because it doesn't actually care about
the Value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107383 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
28a173581c67cda78b2febd24d10edb13f760c4c 01-Jul-2010 Dan Gohman <gohman@apple.com> Reapply r106422, splitting the code for materializing a value out of
SelectionDAGBuilder::getValue into a helper function, with fixes to
use DenseMaps safely.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107371 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c25ad637662ec24880a7eadad69b1be311ea61ae 01-Jul-2010 Dan Gohman <gohman@apple.com> Don't use operator[] here, because it's not desirable to insert a default
value if the search fails.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107368 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
3f278ce9997c1885d302afb24619ee4d9c8707e5 30-Jun-2010 Duncan Sands <baldrick@free.fr> Remove an unused variable. The call to getRoot has side-effects, so
this could break something (but doesn't seem to).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107295 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
37387d52883ac7f99826ba627fbda9d180e6656b 30-Jun-2010 Gabor Greif <ggreif@gmail.com> use ArgOperand API

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107279 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
90c64f4aac95ebfcdeb8ad78a373fdb9e61b002c 29-Jun-2010 Duncan Sands <baldrick@free.fr> Remove initialized but otherwise unused variables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
1784d160e4efa75782884d451d0788b9457e67dc 25-Jun-2010 Dale Johannesen <dalej@apple.com> The hasMemory argument is irrelevant to how the argument
for an "i" constraint should get lowered; PR 6309. While
this argument was passed around a lot, this is the only
place it was used, so it goes away from a lot of other
places.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106893 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
b447c4e65b5f6d39db16cb8fc338133965291972 25-Jun-2010 Duncan Sands <baldrick@free.fr> Remove variables which are assigned to but for which the value
is not used. Spotted by gcc-4.6.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106854 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
0635f35114732cdb055ee38bad5f743e49729efa 25-Jun-2010 Gabor Greif <ggreif@gmail.com> use ArgOperand API

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106836 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
deca052d9d1d1303854a1c9617c383aa6c58ba0b 24-Jun-2010 Dan Gohman <gohman@apple.com> Simplify this code; switch lowering shouldn't produce cases
which trivially fold away.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106765 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
8e0163ac1e8fcf0f8d2340d65439edef8230b01c 24-Jun-2010 Dan Gohman <gohman@apple.com> Optimize the "bit test" code path for switch lowering in the
case where the bit mask has exactly one bit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106716 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c7bd7b7f12f3df9f03f84eff45e8266446c54936 21-Jun-2010 Dan Gohman <gohman@apple.com> Revert r106422, which is breaking the non-fast-isel path.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106423 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
faeb0e744838553e6c46dab0ff3f9d8fc41fc766 21-Jun-2010 Dan Gohman <gohman@apple.com> More changes for non-top-down fast-isel.

Split the code for materializing a value out of
SelectionDAGBuilder::getValue into a helper function, so that it can
be used in other ways. Add a new getNonRegisterValue function which
uses it, for use in code which doesn't want a CopyFromReg even
when FuncMap.ValueMap already has an entry for it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
e368b460a206fafa0d31d5d059b1779b94f7df8c 18-Jun-2010 Dan Gohman <gohman@apple.com> Eliminate unnecessary uses of getZExtValue().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106279 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
9126c0d42a5176e5865171713fae4a62e3c69912 01-Jun-2010 Devang Patel <dpatel@apple.com> Keep track of incoming debug value of unused argument.
Radar 7927666.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105285 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
462f6b57b6276502e1279d0e508c0b9fc24feb50 29-May-2010 Dan Gohman <gohman@apple.com> Reorder some code in SelectionDAGBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
7451d3e09d26115195280ba36f686a0a90815089 29-May-2010 Dan Gohman <gohman@apple.com> SelectionDAG shouldn't have a FunctionLoweringInfo member. RegsForValue
shouldn't have a TargetLoweringInfo member. And FunctionLoweringInfo::set
doesn't needs its EnableFastISel argument.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105101 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
f75a7d3fbf7fbb3071f45e248d3fb93312ec4fbd 28-May-2010 Dan Gohman <gohman@apple.com> Eliminate the restriction that the array size in an alloca must be i32.
This will help reduce the amount of casting required on 64-bit targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104911 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
a65850230af7f13d9111450f645886b968dea2a2 28-May-2010 Jim Grosbach <grosbach@apple.com> back out 104862/104869. Can reuse stacksave after all. Very cool.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104897 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
084fb0ea3246300aa81dd2561ce4d84401b74792 27-May-2010 Jim Grosbach <grosbach@apple.com> hook ISD::STACKADDR to an intrinsic

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104869 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
23ff7cff52702a8bff904d8ab4c9ca67cc19d6ca 26-May-2010 Jim Grosbach <grosbach@apple.com> Adjust eh.sjlj.setjmp to properly have a chain and to have an opcode entry in
ISD::. No functional change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104734 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
5eb195153950bc7ebfc30649494a78b2096b5ef8 22-May-2010 Jim Grosbach <grosbach@apple.com> Implement eh.sjlj.longjmp for ARM. Clean up the intrinsic a bit.
Followups: docs patch for the builtin and eh.sjlj.setjmp cleanup to match
longjmp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104419 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
16d8f8bd919b72866e687d99f3aa94a140137c59 11-May-2010 Duncan Sands <baldrick@free.fr> I got tired of VISIBILITY_HIDDEN colliding with the gcc enum. Rename it
to LLVM_LIBRARY_VISIBILITY and introduce LLVM_GLOBAL_VISIBILITY, which is
the opposite, for future use by dragonegg.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103495 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
7d9663c70b3300070298d716dba6e6f6ce2d1e3e 11-May-2010 Douglas Gregor <dgregor@apple.com> Fixes for Microsoft Visual Studio 2010, from Steven Watanabe!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103457 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
02f0dbd97a9bc01528aa12c2f260d928683ab411 08-May-2010 Devang Patel <dpatel@apple.com> Verify variable directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103305 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
d47f3c803f4e1e7f84e8fdcd3c9a5120ae5d37ad 06-May-2010 Devang Patel <dpatel@apple.com> Use getValue() for PHINodes when direct NodeMap access does not work.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103126 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
5d11ea39f7f78169efdc4a62fd924e8f0661ca55 01-May-2010 Dan Gohman <gohman@apple.com> Don't pass SDValues by non-const reference unless they may be
modified.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102816 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
95140a4cc168bb75a54a434e3e53f9060742dc41 01-May-2010 Dan Gohman <gohman@apple.com> Reorgnaize more switch code lowering to clean up some tricky
code, and to eliminate the need for the SelectionDAGBuilder
state to be live during CodeGenAndEmitDAG calls.

Call SDB->clear() before CodeGenAndEmitDAG calls instead of
before it, and move the CurDAG->clear() out of SelectionDAGBuilder,
which doesn't own the DAG, and into CodeGenAndEmitDAG.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102814 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
1b40319eba671399539c53b91b36d667f86662d3 01-May-2010 Dan Gohman <gohman@apple.com> Delete the EdgeMapping variable itself.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102810 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
719f6a9d9cf29d7daa33cfe43a9e7fe671b24df1 29-Apr-2010 Devang Patel <dpatel@apple.com> Refactor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102661 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
a83ce98d5f5860809ce339968656a383098221f6 29-Apr-2010 Devang Patel <dpatel@apple.com> DO not push DBG_VALUE machine instructions for inlined fuction arguments in entry block.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102653 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
a36acad67ddade353a79a6b1a7b43bfaa01e86e1 29-Apr-2010 Evan Cheng <evan.cheng@apple.com> Re-enable 102565 with fixes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
16e4ace95196c2b34246746b7481a8de3d715c19 29-Apr-2010 Evan Cheng <evan.cheng@apple.com> Temporarily disable my changes to unbreak the build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102590 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
9e8a2b93465bc8abd9b318faebb256b1c168baa9 29-Apr-2010 Evan Cheng <evan.cheng@apple.com> Do not generate duplicate dbg_value instructions for function arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
ee1d91a8301f91318e1aeed55c35ba5f6ca0b913 29-Apr-2010 Evan Cheng <evan.cheng@apple.com> Avoid emitting a dbg_value machineinstr that's not going to be inserted into entry block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102581 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
1deef27b0ad538e5017675cf1e085002973bbbb2 29-Apr-2010 Evan Cheng <evan.cheng@apple.com> Check Reg against zero.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102573 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
f38c6c89f1137f54adb76bb375b15ff0ec3a925a 29-Apr-2010 Devang Patel <dpatel@apple.com> tidy up.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102558 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
2ad0fcf794924f618a7240741cc14a39be99d0f2 29-Apr-2010 Evan Cheng <evan.cheng@apple.com> Replace r102368 with code that's less fragile. This creates DBG_VALUE instructions for function arguments early and insert them after instruction selection is done.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102554 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
0f9d95254291418a548d1341db540b5d5c11e8f4 27-Apr-2010 Devang Patel <dpatel@apple.com> Ignore DBG_VALUE instructions that points to undef values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
fc0b860bcc886844cf80d31ef717e665dbbae0bd 27-Apr-2010 Dale Johannesen <dalej@apple.com> Revert a small part of 102372; this fixes at least one
of the dbg testsuite regressions. I don't think this is
really the right fix; this change exposed an existing problem
upstream somewhere.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
925965e6ba8013fcc25be2df0117d63319b4bce7 26-Apr-2010 Dale Johannesen <dalej@apple.com> Remove crufty comments.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102380 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
fdb42fa5fe794cc2c89e2ed7f57a89ed24d9952a 26-Apr-2010 Dale Johannesen <dalej@apple.com> Add DBG_VALUE handling for byval parameters; this
produces a comment on targets that support it, but
the Dwarf writer is not hooked up yet.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c105a2b5b7d8969e78bd4b203e980dced8a1c689 22-Apr-2010 Dan Gohman <gohman@apple.com> Sink SelectionDAGBuilder's HandlePHINodesInSuccessorBlocks down
into SelectionDAGBuilder itself.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102128 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
f81eca0ab908fdcf98ae0efaa75acccc8ba40dc2 22-Apr-2010 Dan Gohman <gohman@apple.com> Move HandlePHINodesInSuccessorBlocks functions out of SelectionDAGISel
and into SelectionDAGBuilder and FastISel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102123 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
620427d5a165d98d33ad6a5be2d01c3e8525c2f6 22-Apr-2010 Dan Gohman <gohman@apple.com> Move PHINodesToUpdate out of SelectionDAGBuilder and into
FunctionLoweringInfo, as it isn't SelectionDAG-specific. This isn't
completely natural, as PHI node state is not per-function but rather
per-basic-block, however there's currently no other convenient
per-basic-block state to group it with.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102109 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.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/SelectionDAG/SelectionDAGBuilder.cpp
92884f7ee54186b136a1ade7fa0194097f225c81 20-Apr-2010 Dan Gohman <gohman@apple.com> Sink the CopyToExportRegsIfNeeded calls out of SelectionDAGISel
into SelectionDAGBuilder. This avoids a separate pass over the
instructions, and has the side effect of providing debug location
information to the copy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101906 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
ba5be5c07bb19dcf484e3aa40cd139dd07c10407 20-Apr-2010 Dan Gohman <gohman@apple.com> Don't send PHI nodes down to SelectionDAGBuilder of FastISel, since
they end up doing nothing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
8ba3aa7f9c5048c31172788f98ad2b90ffad565a 20-Apr-2010 Dan Gohman <gohman@apple.com> Sink DebugLoc handling out of SelectionDAGISel into FastISel and
SelectionDAGBuilder, where it doesn't have to be as complicated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101848 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
99be8ae3898d87373ef0c8f1159b287e28a8d81b 20-Apr-2010 Dan Gohman <gohman@apple.com> Eliminate the CurMBB member from SelectionDAGBuilder. For places that
need it, just pass around the parent block of the current instruction
explicitly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101822 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
55e59c186303ff02c0be7429da3b1b36c347f164 19-Apr-2010 Dan Gohman <gohman@apple.com> Code that needs a TargetMachine should have access to one directly, rather
than just getting one through a TargetLowering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101802 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
46007b3712290c09d895f4bd245ac852f412556c 19-Apr-2010 Dan Gohman <gohman@apple.com> Move isInTailCallPosition out of SelectionDAGBuilder, as it isn't
SelectionDAG-specific.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
383b5f6b91914454a9a8a6d829b4eeb714c75113 17-Apr-2010 Dan Gohman <gohman@apple.com> Delete now-unnecessary const_casts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101637 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
d858e90f039f5fcdc2fa93035e911a5a9505cc50 17-Apr-2010 Dan Gohman <gohman@apple.com> Use const qualifiers with TargetLowering. This eliminates several
const_casts, and it reinforces the design of the Target classes being
immutable.

SelectionDAGISel::IsLegalToFold is now a static member function, because
PIC16 uses it in an unconventional way. There is more room for API
cleanup here.

And PIC16's AsmPrinter no longer uses TargetLowering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101635 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
551754c4958086cc6910da7c950f2875e212f5cf 17-Apr-2010 Eric Christopher <echristo@apple.com> Revert 101465, it broke internal OpenGL testing.

Probably the best way to know that all getOperand() calls have been handled
is to replace that API instead of updating.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101579 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
33b7a291aa1bd477bc09e3ef5fccb76249502a5e 16-Apr-2010 Dan Gohman <gohman@apple.com> Avoid creating virtual registers for unused values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101480 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
ac7d05c4bfbd988a08e9cd8ac817be7b22cd9953 16-Apr-2010 Dan Gohman <gohman@apple.com> Fix an assertion string.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101478 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
4ec2258ffb495d7ce00177e447740ef1123a27db 16-Apr-2010 Gabor Greif <ggreif@gmail.com> reapply r101434
with a fix for self-hosting

rotate CallInst operands, i.e. move callee to the back
of the operand array

the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
607a7ab3da72a2eb53553a520507cbb8068dd1d8 16-Apr-2010 Gabor Greif <ggreif@gmail.com> back out r101423 and r101397, they break llvm-gcc self-host on darwin10

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
2ff961f66816daab8bbc58a19025161d969821c2 15-Apr-2010 Gabor Greif <ggreif@gmail.com> reapply r101364, which has been backed out in r101368
with a fix

rotate CallInst operands, i.e. move callee to the back
of the operand array

the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101397 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
9ee17208115482441953127615231c59a2f4d052 15-Apr-2010 Gabor Greif <ggreif@gmail.com> back out r101364, as it trips the linux nightlybot on some clang C++ tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101368 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
165dac08d1bb8428b32a5f39cdd3dbee2888987f 15-Apr-2010 Gabor Greif <ggreif@gmail.com> rotate CallInst operands, i.e. move callee to the back
of the operand array

the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101364 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
ae541aad5c36cb3e4256514447d1f81e253079c7 15-Apr-2010 Dan Gohman <gohman@apple.com> Add more const qualifiers for LLVM IR pointers in CodeGen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101342 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
46510a73e977273ec67747eb34cbdb43f815e451 15-Apr-2010 Dan Gohman <gohman@apple.com> Add const qualifiers to CodeGen's use of LLVM IR constructs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101334 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
6465265ae1b9d2d9ffb6cfcebf4b46ad97914aa7 14-Apr-2010 Dan Gohman <gohman@apple.com> Delete unneeeded arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101276 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
fe85e764736f4d87104f3d1508c173f566c8c461 14-Apr-2010 Dan Gohman <gohman@apple.com> Pull utility routines with no SelectionDAG dependence out of
SelectionDAGBuilder. FunctionLoweringInfo isn't an ideal place for
them to live, but it's better than SelectionDAGBuilder for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101267 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
b02b62a2719bf5cfe12cfc902ab4e85d675450a0 14-Apr-2010 Dan Gohman <gohman@apple.com> Fix typos in comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101266 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
e05678132345eb8a632362dbd320ee7d36226e67 09-Apr-2010 Dan Gohman <gohman@apple.com> Add variants of ult, ule, etc. which take a uint64_t RHS, for convenience.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100824 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
1bd7335a17010bd4d8f86736cf73cac9f3fb80a5 08-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> Use twines to simplify calls to report_fatal_error. For code size and readability.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100756 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
6129c376935db12dc79f6d515a1d96632adb480c 08-Apr-2010 Chris Lattner <sabre@nondot.org> convert a report_fatal_error that I was able to trigger into a nice error
so the user at least knows what inline asm is a problem. For example:

error: inline asm not supported yet: don't know how to handle tied indirect register inputs
pr8788-1.c:14:10: note: generated from here
asm ("\n" : "+r" (stack->regs)
^

Instead of:
fatal error: error in backend: Don't know how to handle tied indirect register inputs yet!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100731 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
87d677c1856bfdcb91d9daeb69dc5f261c73851e 08-Apr-2010 Chris Lattner <sabre@nondot.org> minor tidying.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100725 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
75361b69f3f327842b9dad69fa7f28ae3b688412 08-Apr-2010 Chris Lattner <sabre@nondot.org> rename llvm::llvm_report_error -> llvm::report_fatal_error



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
decc2671516e6c52ee2f29f7746f8d02753845ea 07-Apr-2010 Chris Lattner <sabre@nondot.org> Three changes:
1. Introduce some enums and accessors in the InlineAsm class
that eliminate a ton of magic numbers when handling inline
asm SDNode.
2. Add a new MDNodeSDNode selection dag node type that holds
a MDNode (shocking!)
3. Add a new argument to ISD::INLINEASM nodes that hold !srcloc
metadata, propagating it to the instruction emitter, which
drops it.

No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
512063dd0f91a76b9dd904dfff72a52b4d09e89f 05-Apr-2010 Chris Lattner <sabre@nondot.org> remove the now-redundant MMI pointer in SelectionDAG.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100419 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
ba79d72eab446e64d360e8263d77732b5e13d556 05-Apr-2010 Chris Lattner <sabre@nondot.org> selection dag doesn't need DwarfWriter, remove some tendrils.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100382 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
20adc9dc4650313f017b27d9818eb2176238113d 04-Apr-2010 Mon P Wang <wangmp@apple.com> Reapply address space patch after fixing an issue in MemCopyOptimizer.
Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset,
e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100304 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
a4f2bb08de92ccec21cbb3d0a9518384b0173660 02-Apr-2010 Chris Lattner <sabre@nondot.org> stop using DebugLoc::getUnknownLoc()


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100215 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
de4845c163a5847c82d7ce10ed0c320098bce6e0 02-Apr-2010 Chris Lattner <sabre@nondot.org> Switch the code generator (except the JIT) onto the new DebugLoc
representation. This eliminates the 'DILocation' MDNodes for
file/line/col tuples from -O0 -g codegen.

This remove the old DebugLoc class, making it a typedef for DebugLoc,
I'll rename NewDebugLoc next.

I didn't update the JIT to use the new apis, so it will continue to
work, but be as slow as before. Someone should eventually do this
or, better yet, rip out the JIT debug info stuff and build the JIT
on top of MC.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100209 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
e754d3fb852abdeaf910c7331eed60f6303597c1 02-Apr-2010 Mon P Wang <wangmp@apple.com> Revert r100191 since it breaks objc in clang


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100199 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
e33c848fa481b038d5ad0c7c898c33b2b27ec71e 02-Apr-2010 Mon P Wang <wangmp@apple.com> Reapply address space patch after fixing an issue in MemCopyOptimizer.
Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset,
e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100191 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
870cfcf9a6189b65a8ee805b93a2c737c0183e62 31-Mar-2010 Chris Lattner <sabre@nondot.org> add new apis for getting/setting !dbg metadata on
instructions. In addition to being a convenience,
they are faster than the old apis, particularly when
not going from an MDKindID like people should be
doing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99982 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
100f090adde26005b9f1eca96871dff52825b27b 31-Mar-2010 Bob Wilson <bob.wilson@apple.com> Revert Mon Ping's change 99928, since it broke all the llvm-gcc buildbots.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
808bab0169ab7d2e8dfdc72dd2c991cd8ff2396d 30-Mar-2010 Mon P Wang <wangmp@apple.com> Added support for address spaces and added a isVolatile field to memcpy, memmove, and memset,
e.g., llvm.memcpy.i32(i8*, i8*, i32, i32) -> llvm.memcpy.p0i8.p0i8.i32(i8*, i8*, i32, i32, i1)
A update of langref will occur in a subsequent checkin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99928 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
8e36a5c960e07555d80fb98d71c692c20f3ea6c4 29-Mar-2010 Evan Cheng <evan.cheng@apple.com> Fix PR4975. Avoid referencing empty vector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99840 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
31441b7e95e0840e1ae144e5db6f791d6a36bc60 29-Mar-2010 Evan Cheng <evan.cheng@apple.com> Pool allocate SDDbgValue nodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99836 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
bfcb3051899b7141a946d769fcf6e8a8453bc530 25-Mar-2010 Evan Cheng <evan.cheng@apple.com> Change how dbg_value sdnodes are converted into machine instructions. Their placement should be determined by the relative order of incoming llvm instructions. The scheduler will now use the SDNode ordering information to determine where to insert them. A dbg_value instruction is inserted after the instruction with the last highest source order and before the instruction with the next highest source order. It will optimize the placement by inserting right after the instruction that produces the value if they have consecutive order numbers.

Here is a theoretical example that illustrates why the placement is important.

tmp1 =
store tmp1 -> x
...
tmp2 = add ...
...
call
...
store tmp2 -> x

Now mem2reg comes along:

tmp1 =
dbg_value (tmp1 -> x)
...
tmp2 = add ...
...
call
...
dbg_value (tmp2 -> x)

When the debugger examine the value of x after the add instruction but before the call, it should have the value of tmp1.

Furthermore, for dbg_value's that reference constants, they should not be emitted at the beginning of the block (since they do not have "producers").

This patch also cleans up how SDISel manages DbgValue nodes. It allow a SDNode to be referenced by multiple SDDbgValue nodes. When a SDNode is deleted, it uses the information to find the SDDbgValues and invalidate them. They are not deleted until the corresponding SelectionDAG is destroyed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
d1ec31dca534a8816d7f2fcbfdc7ed4476b471d3 18-Mar-2010 Bob Wilson <bob.wilson@apple.com> Fix pr6543: svn r88806 changed MachineJumpTableInfo::getJumpTableIndex() to
always create a new jump table. The intention was to avoid merging jump
tables in SelectionDAGBuilder, and to wait for the branch folding pass to
merge tables. Unfortunately, the same getJumpTableIndex() method is also
used to merge tables in branch folding, so as a result of this change
branch tables are never merged. Worse, the branch folding code is expecting
getJumpTableIndex to always return the index of an existing table, but with
this change, it never does so. In at least some cases, e.g., pr6543, this
creates references to non-existent tables.

I've fixed the problem by adding a new createJumpTableIndex function, which
will always create a new table, and I've changed getJumpTableIndex to only
look at existing tables.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98845 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
1ac2429d1f1b89a9a9c0397ef63c4f4fa535fee8 18-Mar-2010 Devang Patel <dpatel@apple.com> Fix comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98830 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c3188ce0f1ff2d1b830702a93134905b9719f410 18-Mar-2010 Devang Patel <dpatel@apple.com> Debug info intrinsic does not intefer during tail call optimization.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98778 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
93b122d3c484a8451024d6947be0f4037f86def0 16-Mar-2010 Chris Lattner <sabre@nondot.org> reapply r98656 unmodified, which exposed the asmprinter not
handling constant unions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98680 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
b85c7100c5f1ef34bace56c6978eca429df798f6 16-Mar-2010 Daniel Dunbar <daniel@zuster.org> Revert r98656, its breaking all over the place.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98662 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
8b3b34f410f2bd05943e1c6f9b0514209731421d 16-Mar-2010 Chris Lattner <sabre@nondot.org> improve support for uniontype and ConstantUnion, patch by Tim Northover!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98656 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
001903485fc78a4ae5f33420b25db73a22bfdf4a 15-Mar-2010 Devang Patel <dpatel@apple.com> Create SDDbgValue for dbg_value intrinsics and remember its connections with DAG nodes.
This is a work in progress. Patch by Dale Johannesen!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98568 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
d2c817eff1d158398fb0a620fa762bf95207922f 14-Mar-2010 Duncan Sands <baldrick@free.fr> Turn calls to copysignl into an FCOPYSIGN node. Handle FCOPYSIGN nodes
with ppc_f128 type by having the type legalizer turn these back into a
call to copysignl.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98514 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
be5b032e4b06ae001098856c2dc4ebca41528132 14-Mar-2010 Anton Korobeynikov <asl@math.spbu.ru> Add DAG nodes to represent FP16 <-> FP32 intrinsics

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98500 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
63d7836267298f5b6cde43f0a89acbabfc109f48 14-Mar-2010 Chris Lattner <sabre@nondot.org> get MMI out of the label uniquing business, just go to MCContext
to get unique assembler temporary labels.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98489 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
7561d480953e0a2faa4af9be0a00b1180097c4bd 14-Mar-2010 Chris Lattner <sabre@nondot.org> change the LabelSDNode to be EHLabelSDNode and make it hold
an MCSymbol. Make the EH_LABEL MachineInstr hold its label
with an MCSymbol instead of ID. Fix a bug in MMI.cpp which
would return labels named "Label4" instead of "label4".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
1611273351d75b5cbe2a67485bb9831d5916fe26 14-Mar-2010 Chris Lattner <sabre@nondot.org> change EH related stuff (other than EH_LABEL) to use MCSymbol
instead of label ID's. This cleans up and regularizes a bunch
of code and makes way for future progress.

Unfortunately, this pointed out to me that JITDwarfEmitter.cpp
is largely copy and paste from DwarfException/MachineModuleInfo
and other places. This is very sad and disturbing. :(

One major change here is that TidyLandingPads moved from being
called in DwarfException::BeginFunction to being called in
DwarfException::EndFunction. There should not be any
functionality change from doing this, but I'm not an EH expert.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98459 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
0ac5d2d7ffd1a8cfbecf4c3834dc557a18c7ee0a 12-Mar-2010 Duncan Sands <baldrick@free.fr> Revert turning copysignl into a COPYSIGN node for the moment:
ppc calls copysignl with a 128 bit ppc long double, resulting
in a node that the type legalizer doesn't know how to expand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
bb2f0c541c1bcf05131b66e4aa036229fc5f068b 12-Mar-2010 Duncan Sands <baldrick@free.fr> Now that it's supported, turn copysignl into a COPYSIGN node.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98348 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
b3e87b2262087cf69f7461e4bc586cdb747434f7 12-Mar-2010 Chris Lattner <sabre@nondot.org> fix PR6577, a bug in sdbuilder lowering select instructions
whose true value was not Val#0.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98336 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
af1871fa6dc916ef1ab5b4b30cf56aa134fcff19 11-Mar-2010 Evan Cheng <evan.cheng@apple.com> In case of tail call size of Ins and InVals may not match.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98277 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
46ada19645c981a0b7932487d163f7582074a4d9 02-Mar-2010 Bill Wendling <isanbard@gmail.com> Remove dead parameter passing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
25d5837889622584b53b6ffebcfa9ebf14f09d7b 28-Feb-2010 Chris Lattner <sabre@nondot.org> simplify this code, return only ever has zero or one operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97408 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
1df9859c40492511b8aa4321eb76496005d3b75b 16-Feb-2010 Duncan Sands <baldrick@free.fr> There are two ways of checking for a given type, for example isa<PointerType>(T)
and T->isPointerTy(). Convert most instances of the first form to the second form.
Requested by Chris.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96344 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
1e559443a17d1b335f697551c6263ba60d5dd827 15-Feb-2010 David Greene <greened@obbligato.org> Add non-temporal flags and remove an assumption of default arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96240 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
b0bc6c361da9009e8414efde317d9bbff755f6c0 15-Feb-2010 Duncan Sands <baldrick@free.fr> Uniformize the names of type predicates: rather than having isFloatTy and
isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
b5b90eddcd5e0a3199a7d5064b9d7551cc1dff9c 11-Feb-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Use array_pod_sort instead of std::sort for improved code size.

Use SmallVector instead of std::vector for better speed when indirectbr has
few successors.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95879 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
598b24c6d1d6eecb558051d79d8b801542663e09 11-Feb-2010 Jakob Stoklund Olesen <stoklund@2pi.dk> Remove duplicate successors from indirectbr instructions before building the machine CFG.

This makes early tail duplication run 60 times faster when compiling the Firefox
JavaScript interpreter, see PR6186.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95831 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
f451cb870efcf9e0302d25ed05f4cac6bb494e42 10-Feb-2010 Dan Gohman <gohman@apple.com> Fix "the the" and similar typos.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95781 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
8112b5322ef60c2dc3cbf0c05671de76df31cf02 10-Feb-2010 Evan Cheng <evan.cheng@apple.com> Emit an error for illegal inline asm constraint (which uses illegal type) rather than asserting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95746 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
8ac38f2a616d303423e66023d2d2a6ff96c5040a 08-Feb-2010 Dale Johannesen <dalej@apple.com> Apply the 95471 fix to SelectionDAGBuilder as well;
we can get in here if FastISel gives up in a block.
(Actually the two copies of this need to be unified. Later.)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95579 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c2e93b255e120f066ad8c16b0593b05f7e9f3d19 08-Feb-2010 Dan Gohman <gohman@apple.com> In guaranteed tailcall mode, don't decline the tailcall optimization
for blocks ending in "unreachable".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95565 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
6fdce6590261476964cb921a959ed83353e8b096 04-Feb-2010 Evan Cheng <evan.cheng@apple.com> Fix typo Duncan noticed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95322 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
446bc10085482aba8cde79d22e10c1fe90ac54b9 04-Feb-2010 Evan Cheng <evan.cheng@apple.com> It's too risky to eliminate sext / zext of call results for tail call optimization even if the caller / callee attributes completely match. The callee may have been bitcast'ed (or otherwise lied about what it's doing).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95282 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
febc81680c80a53f15f85b1812cba07fc179b9fd 03-Feb-2010 Evan Cheng <evan.cheng@apple.com> Revert 94937 and move the noreturn check to codegen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95198 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
86809ccdaddf48a87ed772bc01464812caaf4baf 03-Feb-2010 Evan Cheng <evan.cheng@apple.com> Allow all types of callee's to be tail called. But avoid automatic tailcall if the callee is a result of bitcast to avoid losing necessary zext / sext etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95195 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
022d9e1cef7586a80a96446ae8691a37def9bbf4 03-Feb-2010 Evan Cheng <evan.cheng@apple.com> Revert 95130.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95160 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
942619695f4bd77934c09a1cae0fb39ae59edac3 02-Feb-2010 Evan Cheng <evan.cheng@apple.com> Pass callsite return type to TargetLowering::LowerCall and use that to check sibcall eligibility.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95130 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
b29d596072d2ba32a0bb59241baf7a1c0ff5ed94 01-Feb-2010 Chris Lattner <sabre@nondot.org> eliminate a bunch of pointless LLVMContext arguments.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95001 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
904c2fadbf44c47b418860f928f435a58da08bb6 01-Feb-2010 Dale Johannesen <dalej@apple.com> fix PR 6157. Testcase pending.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94996 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
4533cac557cdcc13e7c990942758ec8338d9172a 28-Jan-2010 Bill Wendling <isanbard@gmail.com> Assign the ordering of SDNodes in a much less intrusive fashion. After the
"visit*" method is called, take the newly created nodes, walk them in a DFS
fashion, and if they don't have an ordering set, then give it one.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94757 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
ca752c9020a1b1cf151142bd9e0cbca9af12d807 28-Jan-2010 Jim Grosbach <grosbach@apple.com> Update of 94055 to track the IR level call site information via an intrinsic.
This allows code gen and the exception table writer to cooperate to make sure
landing pads are associated with the correct invoke locations.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94726 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
0c439eb2c8397996cbccaf2798e598052d9982c8 27-Jan-2010 Evan Cheng <evan.cheng@apple.com> Eliminate target hook IsEligibleForTailCallOptimization.

Target independent isel should always pass along the "tail call" property. Change
target hook LowerCall's parameter "isTailCall" into a refernce. If the target
decides it's impossible to honor the tail call request, it should set isTailCall
to false to make target independent isel happy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94626 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
11e679324b693125a98d865fe3e9fc9b2a9e5d22 27-Jan-2010 Evan Cheng <evan.cheng@apple.com> Allow some automatic tailcall optimization without changing ABI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94611 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
071c62fad0b25ad4131e7f984173a796c1e63f61 26-Jan-2010 Chris Lattner <sabre@nondot.org> Rearrange handling of jump tables. Highlights:
1. MachineJumpTableInfo is now created lazily for a function the first time
it actually makes a jump table instead of for every function.
2. The encoding of jump table entries is now described by the
MachineJumpTableInfo::JTEntryKind enum. This enum is determined by the
TLI::getJumpTableEncoding() hook, instead of by lots of code scattered
throughout the compiler that "knows" that jump table entries are always
32-bits in pic mode (for example).
3. The size and alignment of jump table entries is now calculated based on
their kind, instead of at machinefunction creation time.

Future work includes using the EntryKind in more places in the compiler,
eliminating other logic that "knows" the layout of jump tables in various
situations.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94470 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
187361b056823df4ff292561fe47468dad956872 23-Jan-2010 Bill Wendling <isanbard@gmail.com> Remove the '-disable-scheduling' flag and replace it with the 'source' option of
the '-pre-RA-sched' flag. It actually makes more sense to do it this way. Also,
keep track of the SDNode ordering by default. Eventually, we would like to make
this ordering a way to break a "tie" in the scheduler. However, doing that now
breaks the "CodeGen/X86/abi-isel.ll" test for 32-bit Linux.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94308 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
f38a33cd0aafff87a8f48debccb09971d2b82dd9 21-Jan-2010 Jim Grosbach <grosbach@apple.com> back this out for now. Growing Function is not good.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94097 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
d0a0c382ea51d36dc7e5938291763da73b4262dc 21-Jan-2010 Jim Grosbach <grosbach@apple.com> Make sure that landing pad entries in the EH call site table are in the proper
order for SjLj style exception handling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94055 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
93ae407ec3d300805d42a6e2f81ab8c4538eb494 17-Jan-2010 Kenneth Uildriks <kennethuil@gmail.com> When checking for sret-demotion, it needs to use legal types. When using the return value of an sret-demoted call, it needs to use possibly illegal types that match the declared Type of the callee.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
f012705c7e4ca8cf90b6b734ce1d5355daca5ba5 05-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92726 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
614d2ad0afaaee874684c3945afda659d587b7e6 05-Jan-2010 Devang Patel <dpatel@apple.com> Delete renaming use of dead dbg intrinsics.

Intrinsic::dbg_stoppoint
Intrinsic::dbg_region_start
Intrinsic::dbg_region_end
Intrinsic::dbg_func_start



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92672 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
4b69d9909dfdef1ea54a56e6f0e0640031635a9d 05-Jan-2010 David Greene <greened@obbligato.org> Change errs() to dbgs().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
f2d7fb3eac30e2c018bad0c8db7f89130da9c89f 04-Jan-2010 Dan Gohman <gohman@apple.com> Use a pointer type rather than MVT::Other for the ExternalSymbol node used
in an inline asm.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92512 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
133ce871df8bc161928970216ff9b195b1fa3a14 02-Jan-2010 Chris Lattner <sabre@nondot.org> Teach codegen to handle:
(X != null) | (Y != null) --> (X|Y) != 0
(X == null) & (Y == null) --> (X|Y) == 0

so that instcombine can stop doing this for pointers. This is part of PR3351,
which is a case where instcombine doing this for pointers (inserting ptrtoint)
is pessimizing code.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92406 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
bfdfea86a1489b7249e52f67fe91a0bf028148a9 01-Jan-2010 Mikhail Glushenkov <foldr@codedgers.com> Fix a warning on gcc 4.4.

SelectionDAGBuilder.cpp:4294: warning: suggest explicit braces to avoid
ambiguous ‘else’

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
b3c0199f6aff85f918bac8748b4b9178f029a7bf 01-Jan-2010 Mikhail Glushenkov <foldr@codedgers.com> Trailing whitespace, 80-col violations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92394 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
f031e8ad011e9ad95d7c965936da07e3a9c42add 01-Jan-2010 Chris Lattner <sabre@nondot.org> Teach codegen to lower llvm.powi to an efficient (but not optimal)
multiply sequence when the power is a constant integer. Before, our
codegen for std::pow(.., int) always turned into a libcall, which was
really inefficient.

This should also make many gfortran programs happier I'd imagine.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92388 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
bf0ca2b477e761e2c81f6c36d6c7bec055933b15 29-Dec-2009 Chris Lattner <sabre@nondot.org> remove a bunch of unneeded functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92263 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
3990b121cf4a0b280ed3e54cf13870cbf4259e78 29-Dec-2009 Chris Lattner <sabre@nondot.org> This is a major cleanup of the instruction metadata interfaces that
I asked Devang to do back on Sep 27. Instead of going through the
MetadataContext class with methods like getMD() and getMDs(), just
ask the instruction directly for its metadata with getMetadata()
and getAllMetadata().

This includes a variety of other fixes and improvements: previously
all Value*'s were bloated because the HasMetadata bit was thrown into
value, adding a 9th bit to a byte. Now this is properly sunk down to
the Instruction class (the only place where it makes sense) and it
will be folded away somewhere soon.

This also fixes some confusion in getMDs and its clients about
whether the returned list is indexed by the MDID or densely packed.
This is now returned sorted and densely packed and the comments make
this clear.

This introduces a number of fixme's which I'll follow up on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92235 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
0eb419800ae51d6e0e00a656ede0627483755361 28-Dec-2009 Chris Lattner <sabre@nondot.org> rename getMDKind -> getMDKindID, make it autoinsert if an MD Kind
doesn't exist already, eliminate registerMDKind. Tidy up a bunch
of random stuff.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92225 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
04b091a7822c60512285ee66b058f98399bf1cf9 24-Dec-2009 Chris Lattner <sabre@nondot.org> handle equality memcmp of 8 bytes on x86-64 with two unaligned loads and a
compare. On other targets we end up with a call to memcmp because we don't
want 16 individual byte loads. We should be able to use movups as well, but
we're failing to select the generated icmp.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92107 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
8047d9a6be9c6261c4d3f286786be856d619ed0f 24-Dec-2009 Chris Lattner <sabre@nondot.org> move an optimization for memcmp out of simplifylibcalls and into
SDISel. This optimization was causing simplifylibcalls to
introduce type-unsafe nastiness. This is the first step, I'll be
expanding the memcmp optimizations shortly, covering things that
we really really wouldn't want simplifylibcalls to do.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92098 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
9949933d6eb406bc74f7df7a0180a11c050a236f 23-Dec-2009 Dale Johannesen <dalej@apple.com> Use more sensible type for flags in asms. PR 5570.
Patch by Sylve`re Teissier (sorry, ASCII only).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91988 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
d060b2576ab10d463e339186bcc61860500cbce0 23-Dec-2009 Eric Christopher <echristo@apple.com> Update objectsize intrinsic and associated dependencies. Fix
lowering code and update testcases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91979 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
0d58013c3ff43f077dc5662e6715bb4dd2cb2bc3 23-Dec-2009 Bill Wendling <isanbard@gmail.com> Remove superfluous SDNode ordering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91971 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
fc67bbe7bc2e0aa09832c232a5fbb1be796deb4c 23-Dec-2009 Bill Wendling <isanbard@gmail.com> Remove node ordering from inline asm nodes. It's not needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91961 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
c1d3c944ab4410b6dc0e3718cef08d166665b68f 23-Dec-2009 Bill Wendling <isanbard@gmail.com> Remove node ordering from VA nodes. It's not needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
167bea71a4bd19329a218f5e1bd8facfd90a0cf9 22-Dec-2009 Bill Wendling <isanbard@gmail.com> Assign ordering to SDNodes in PromoteNode. Also fixing a subtle bug where BSWAP
was using "Tmp1" in the first getNode call instead of Node->getOperand(0).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
3ea58b6d7a6357018f4f78396b457f86198a7afa 22-Dec-2009 Bill Wendling <isanbard@gmail.com> Allow 0 as an order number. Don't assign an order to formal arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91920 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
e261b0c90b25b7ce7a68953e7adecf370c87256e 22-Dec-2009 Bob Wilson <bob.wilson@apple.com> Report an error for bad inline assembly, where the value passed for an
"indirect" operand is not a pointer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91913 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
3ea3c2461932d96d3defa0a9aa93ffaf631bb19d 22-Dec-2009 Bill Wendling <isanbard@gmail.com> Add more plumbing. This time in the LowerArguments and "get" functions which
return partial registers. This affected the back-end lowering code some.

Also patch up some places I missed before in the "get" functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91880 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
651ad13d3c0a232de84d8efe02b11f272b3dee3e 22-Dec-2009 Bill Wendling <isanbard@gmail.com> Add SDNode ordering to inlined asm and VA functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91876 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
ec72e32fb032cdf367f47ed3a953c3aa2fa93197 22-Dec-2009 Bill Wendling <isanbard@gmail.com> Adding more assignment of ordering to SDNodes. This time in the "call" and
generic copy functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
e80ae836f24604dc309d0fc7a2842d8704f3e5d1 22-Dec-2009 Bill Wendling <isanbard@gmail.com> Add ordering of SDNodes to LowerCallTo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
d0283fa69f81a48ec98643ae155706bd201b897e 22-Dec-2009 Bill Wendling <isanbard@gmail.com> Now add ordering to SDNodes created by the massive intrinsic lowering function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91863 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
856ff41079560697605058ea11d709047a2b00de 22-Dec-2009 Bill Wendling <isanbard@gmail.com> To make things interesting, I added MORE code to set the ordering of
SDNodes. This time in the load/store and limited-precision code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
87710f04e551655c0c98fb7c0bfd9ec58224a804 22-Dec-2009 Bill Wendling <isanbard@gmail.com> Add more plumbing to assign ordering to SDNodes. Have the "getValue" method
assign the ordering when called. Combine some of the ordering assignments to
keep things simple.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91857 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
e1a9042041b97d223a65179fb26eb03a4fbe723b 22-Dec-2009 Bill Wendling <isanbard@gmail.com> More ordering plumbing. This time for GEP. I need to remember to assign
orderings to values returned by getValue().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91850 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
b85b6e888225acac6fd6cf4ef005657fe4ee7096 21-Dec-2009 Bill Wendling <isanbard@gmail.com> Another incremental check-in for assigning ordering to SDNodes. This time for
shuffle and insert vector.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91847 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
49fcff8a5ded8a0101891ce2ad10cfae54b42c95 21-Dec-2009 Bill Wendling <isanbard@gmail.com> Assign ordering to more instructions. Incremental check-in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91846 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
0777e927214c61c5d681e5b7dd5d00665c81133a 21-Dec-2009 Bill Wendling <isanbard@gmail.com> - Add a bit more plumbing assigning an order to SDNodes.
- Modify the "dump" method to emit the order of an SDNode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91845 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
3b7a41ce9053b75b7726c0bd56d698e307495de9 21-Dec-2009 Bill Wendling <isanbard@gmail.com> First wave of plumbing for assigning an ordering to SDNodes. This takes care of
a lot of the branching instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91838 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
b4e6a5df5dada0cd919cc6e2717eb3118db9cc45 19-Dec-2009 Bill Wendling <isanbard@gmail.com> Changes from review:

- Move DisableScheduling flag into TargetOption.h
- Move SDNodeOrdering into its own header file. Give it a minimal interface that
doesn't conflate construction with storage.
- Move assigning the ordering into the SelectionDAGBuilder.

This isn't used yet, so there should be no functional changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91727 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
5afffaed5c0095930020947322633f0d0b02ffed 18-Dec-2009 Bob Wilson <bob.wilson@apple.com> Handle ARM inline asm "w" constraints with 64-bit ("d") registers.
The change in SelectionDAGBuilder is needed to allow using bitcasts to convert
between f64 (the default type for ARM "d" registers) and 64-bit Neon vector
types. Radar 7457110.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91649 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
266d945fff195c65e46b1226eb7ee95a632b5e58 17-Dec-2009 Bob Wilson <bob.wilson@apple.com> Fix a comment grammaro.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91584 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
819309efec6f11ba752bd7cbfe186495745f020b 16-Dec-2009 Daniel Dunbar <daniel@zuster.org> Reapply r91392, it was only unmasking the bug, and since TOT is still broken having it reverted does no good.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91560 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
222518d0bb2786a14cf3adf6030c55213d5399f8 16-Dec-2009 Daniel Dunbar <daniel@zuster.org> Revert "Initial work on disabling the scheduler. This is a work in progress, and
this", this broke llvm-gcc bootstrap for release builds on
x86_64-apple-darwin10.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91533 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
614407a9d21d10ee4f6c45295852c72ad86cb029 15-Dec-2009 Bill Wendling <isanbard@gmail.com> Initial work on disabling the scheduler. This is a work in progress, and this
stuff isn't used just yet.

We want to model the GCC `-fno-schedule-insns' and `-fno-schedule-insns2'
flags. The hypothesis is that the people who use these flags know what they are
doing, and have hand-optimized the C code to reduce latencies and other
conflicts.

The idea behind our scheme to turn off scheduling is to create a map "on the
side" during DAG generation. It will order the nodes by how they appeared in the
code. This map is then used during scheduling to get the ordering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91392 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
a4f9cc4e55fa12ddff95c2e9d0091077797f0b22 11-Dec-2009 Dan Gohman <gohman@apple.com> Fix the result type of SELECT nodes lowered from Select instructions with
aggregate return values. This fixes PR5754.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91145 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
2048b85c7c2c987874b9423e682ec8e60b60574b 23-Nov-2009 Dan Gohman <gohman@apple.com> Rename SelectionDAGLowering to SelectionDAGBuilder, and rename
SelectionDAGBuild.cpp to SelectionDAGBuilder.cpp.


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