Commit Graph

27084 Commits

Author SHA1 Message Date
Bill Wendling
a929c68bfc Constify and don't return a reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63689 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04 00:05:34 +00:00
Devang Patel
65085cf7b3 Ignore dbg intrinsics while hoisting common code in the two blocks up into the branch block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63687 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-04 00:03:08 +00:00
Dale Johannesen
a04b757109 DebugLoc propagation; adjustment to things omitted
from SelectionDagBuild.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63680 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 23:04:43 +00:00
Bill Wendling
44f6ac640a Erm. Would be nice to initialize this variable. . .
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63677 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 22:55:54 +00:00
Bill Wendling
85e3af9b70 Add getDebugLocTuple to retrieve the DebugLocTuple for a given DebugLoc object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63676 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 22:49:58 +00:00
Dale Johannesen
eacf2dc4bb Need this file too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63674 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 22:26:34 +00:00
Dale Johannesen
0f502f6f44 Add some DL propagation to places that didn't
have it yet.  More coming.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63673 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 22:26:09 +00:00
Devang Patel
383d7ed915 Do not let dbg intrinsic block folding of two entry phi node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63671 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 22:12:02 +00:00
Devang Patel
28aa5de050 If "optimize for size" attribute is set then block non-trivial loop unswitches but allow trivial loop unswitches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63670 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 22:04:27 +00:00
Dale Johannesen
d839254888 DebugLoc propgation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63664 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 21:48:12 +00:00
Bill Wendling
ef7e18e60c More whitespace fixin'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63663 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 21:38:21 +00:00
Bill Wendling
b9dcef2a00 Whitespace and comment changes. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63660 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 21:17:20 +00:00
Chris Lattner
1aa7056b13 teach "convert from scalar" to handle loads of fca's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63659 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 21:08:45 +00:00
Chris Lattner
6e01115bb1 refactor the interface to ConvertUsesOfLoadToScalar,
renaming it to ConvertScalar_ExtractValue


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63658 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 21:01:03 +00:00
Dale Johannesen
e4d209dcb8 DebugLoc propagation. done with file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63656 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 20:21:25 +00:00
Devang Patel
6268d69d73 Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63653 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 19:46:28 +00:00
Chris Lattner
9bc67da0a9 convert ConvertUsesOfLoadToScalar to use IRBuilder,
no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63652 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 19:45:44 +00:00
Chris Lattner
65a650291d switch ConvertScalar_InsertValue to use an IRBuilder, no
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63651 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 19:41:50 +00:00
Dale Johannesen
ace1610df5 DebugLoc propagation. 2/3 through file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63650 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 19:33:06 +00:00
Chris Lattner
9b872db775 make scalar conversion handle stores of first class
aggregate values.  loads are not yet handled (coming
soon to an sroa near you).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63649 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 19:30:11 +00:00
Dan Gohman
43f07fb6c3 Change the post-RA scheduler to iterate through the
basic-block segments bottom-up instead of top down. This
is the first step in a general restructuring of the way
register liveness is tracked in the post-RA scheduler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63643 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 18:57:45 +00:00
Dan Gohman
605679f0cd Tevert part of the x86 subtarget logic changes: when -march=x86-64
is given, override the subtarget settings and enable 64-bit support.
This restores the earlier behavior, and fixes regressions on
Non-64-bit-capable x86-32 hosts.

This isn't necessarily the best approach, but the most obvious
alternative is to require -mcpu=x86-64 or -mattr=+64bit to be used
with -march=x86-64 when the host doesn't have 64-bit support. This
makes things little more consistent, but it's less convenient, and
it has the practical drawback of requiring lots of test changes, so
I opted for the above approach for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63642 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 18:53:21 +00:00
Devang Patel
b51d40cf40 First initialize DAG otherwise dwarf writer is used uninitialized.
Duncan spotted this. Thanks!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63641 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 18:46:32 +00:00
Chris Lattner
1a3257bbf5 Make SROA produce a vector only when the alloca is actually
accessed at least once as a vector.  This prevents it from
compiling the example in not-a-vector into:

define double @test(double %A, double %B) {
	%tmp4 = insertelement <7 x double> undef, double %A, i32 0
	%tmp = insertelement <7 x double> %tmp4, double %B, i32 4
	%tmp2 = extractelement <7 x double> %tmp, i32 4
	ret double %tmp2
}

instead, producing the integer code.  Producing vectors when they
aren't otherwise in the program is dangerous because a lot of other
code treats them carefully and doesn't want to break them down.
OTOH, many things want to break down tasty i448's.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63638 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 18:15:05 +00:00
Duncan Sands
95c5f05641 Fix PR3411. When replacing values, nodes are analyzed
in any old order.  Since analyzing a node analyzes its
operands also, this can mean that when we pop a node
off the list of nodes to be analyzed, it may already
have been analyzed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63632 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 10:23:33 +00:00
Evan Cheng
388df627cc APInt'fy SimplifyDemandedVectorElts so it can analyze vectors with more than 64 elements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63631 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 10:05:09 +00:00
Chris Lattner
55a683d7f0 add another case of undefined behavior without crashing, PR3466.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63620 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 07:08:57 +00:00
Nick Lewycky
2eafb8b404 Revert r63600. It didn't fix the bug, it just moved it a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63618 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 06:30:37 +00:00
Owen Anderson
cd89525434 Teach AliasAnalysis that a bunch of the atomic intrinsics only dereference their arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63616 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 06:27:22 +00:00
Nick Lewycky
dac5c4b10b Update the callgraph when replacing InvokeInst with CallInst when inlining.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63600 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 04:34:40 +00:00
Bill Wendling
d62e06c53b Explicitly pass in debug location information to BuildMI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63599 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 02:29:34 +00:00
Bill Wendling
6a8a0d74cb Pass in something sensible for the debug location information when creating the
initial PHI nodes of the machine function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63598 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 02:20:52 +00:00
Chris Lattner
ba120aa5fa fix a bitcode reader bug where it can't handle extractelement correctly:
the index of the value being extracted is always an i32.  This fixes PR3465


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63597 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 02:11:28 +00:00
Chris Lattner
3d730f7453 Teach ConvertUsesToScalar to handle memset, allowing it to handle
crazy cases like:

struct f {  int A, B, C, D, E, F; };
short test4() {
  struct f A;
  A.A = 1;
  memset(&A.B, 2, 12);
  return A.C;
}



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63596 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 02:01:43 +00:00
Dale Johannesen
dbfd8dbdee Fill in some missing DL propagation in getNode()s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63595 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 01:55:44 +00:00
Bill Wendling
b288487a8e Use SDL->getCurDebugLoc() instead of unknown loc for landing pads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63594 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 01:55:42 +00:00
Bill Wendling
ec37e98b3d Explicitly pass in the "unknown" debug location. This is probably not
correct. We need more infrastructure before we can get the DebugLoc info for
these instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63593 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 01:33:28 +00:00
Bill Wendling
0eb96fd94b Alphabetize includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63591 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 01:32:22 +00:00
Chris Lattner
7809ecd5b0 rearrange how SRoA handles promotion of allocas to vectors.
With the new world order, it can handle cases where the first
store into the alloca is an element of the vector, instead of
requiring the first analyzed store to have the vector type 
itself.  This allows us to un-xfail 
test/CodeGen/X86/vec_ins_extract.ll.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63590 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 01:30:09 +00:00
Dan Gohman
a5f81bba4a Move isIdentifiedObject and isNoAliasCall into AliasAnalysis.cpp since
they are useful to analyses other than BasicAliasAnalysis.cpp. Include
the full comment for isIdentifiedObject in the header file. Thanks to
Chris for suggeseting this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63589 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 01:28:32 +00:00
Bill Wendling
f2ad58d930 Propagate debug loc info during SDNode -> machine instr creation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63585 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 01:02:39 +00:00
Bill Wendling
9bc96a5720 Create DebugLoc information in FastISel. Several temporary methods were
created. Specifically, those BuildMIs which use
"DebugLoc::getUnknownLoc()". I'll remove them soon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63584 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 00:55:04 +00:00
Dale Johannesen
ff97d4fe81 Propagation in TargetLowering. Includes passing a DL
into SimplifySetCC which gets called elsewhere.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63583 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 00:47:48 +00:00
Dan Gohman
a7ce741ff0 Use the SubclassData field to hold ExtType, isTrunc, and MemIndexedMode
information. This eliminates the need for the Flags field in MemSDNode,
so this makes LoadSDNode and StoreSDNode smaller. Also, it makes
FoldingSetNodeIDs for loads and stores two AddIntegers smaller.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63577 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 00:08:45 +00:00
Dan Gohman
f75e5b4d8c Change Feature64Bit to not imply FeatureSSE2. All x86-64 hardware has
SSE2, however it's possible to disable SSE2, and the subtarget support
code thinks that if 64-bit implies SSE2 and SSE2 is disabled then
64-bit should also be disabled. Instead, just mark all the 64-bit
subtargets as explicitly supporting SSE2.

Also, move the code that makes -march=x86-64 enable 64-bit support by
default to only apply when there is no explicit subtarget. If you
need to specify a subtarget and you want 64-bit code, you'll need to
select a subtarget that supports 64-bit code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63575 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-03 00:04:43 +00:00
Dale Johannesen
ca57b84729 Last DebugLoc propagation for this file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63574 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-02 23:46:53 +00:00
Dale Johannesen
c6be110f91 More DebugLoc propagation. This should be everything
except LegalizeOp itself.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63560 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-02 22:49:46 +00:00
Mike Stump
d64e0eb094 Improve -fno-opt style option processing to not require an extra
option to make the -fno- form on the option.  We also document the new
form in the CommandLine documentation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63559 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-02 22:48:49 +00:00
Owen Anderson
5b93f6fa82 MergeValueInto is too smart: it might choose to do the merge the opposite direction.
Live interval reconstruction needs to account for this, and scour its maps to
prevent dangling references.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63558 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-02 22:42:01 +00:00
Dale Johannesen
8a782a2a8c DebugLoc propagation. ExpandOp and PromoteOp,
among others.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63555 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-02 22:12:50 +00:00