Chris Lattner
5f3116636b
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.
llvm-svn: 63638
2009-02-03 18:15:05 +00:00
Chris Lattner
028861e55b
this produces an undefined result, just check that the alloca is gone
...
and that sroa doesn't crash.
llvm-svn: 63637
2009-02-03 18:13:00 +00:00
Duncan Sands
87db26ad2c
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.
llvm-svn: 63632
2009-02-03 10:23:33 +00:00
Evan Cheng
b3da5fb3a4
APInt'fy SimplifyDemandedVectorElts so it can analyze vectors with more than 64 elements.
...
llvm-svn: 63631
2009-02-03 10:05:09 +00:00
Chris Lattner
2f95b79fee
add a method to BumpPtrAllocator that allows allocating elements
...
with a specified alignment.
llvm-svn: 63629
2009-02-03 07:39:50 +00:00
Nick Lewycky
23adb71f2a
Add LLVM plugin for gold.
...
llvm-svn: 63623
2009-02-03 07:13:24 +00:00
Nick Lewycky
0569777e8b
Regenerate configure.
...
llvm-svn: 63622
2009-02-03 07:10:30 +00:00
Nick Lewycky
1a641d2761
Add the ability to pass the path to binutils source to configure. This is
...
needed to build the LLVM gold plugin.
llvm-svn: 63621
2009-02-03 07:10:08 +00:00
Chris Lattner
447b5517bc
add another case of undefined behavior without crashing, PR3466.
...
llvm-svn: 63620
2009-02-03 07:08:57 +00:00
Nick Lewycky
a676cf98e3
Revert r63600. It didn't fix the bug, it just moved it a bit.
...
llvm-svn: 63618
2009-02-03 06:30:37 +00:00
Owen Anderson
a6e31d57d3
Teach AliasAnalysis that a bunch of the atomic intrinsics only dereference their arguments.
...
llvm-svn: 63616
2009-02-03 06:27:22 +00:00
Nick Lewycky
cd8353b6fe
Update the callgraph when replacing InvokeInst with CallInst when inlining.
...
llvm-svn: 63600
2009-02-03 04:34:40 +00:00
Bill Wendling
e496361cf5
Explicitly pass in debug location information to BuildMI.
...
llvm-svn: 63599
2009-02-03 02:29:34 +00:00
Bill Wendling
14bc9010d5
Pass in something sensible for the debug location information when creating the
...
initial PHI nodes of the machine function.
llvm-svn: 63598
2009-02-03 02:20:52 +00:00
Chris Lattner
041b48e037
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
llvm-svn: 63597
2009-02-03 02:11:28 +00:00
Chris Lattner
b47738daab
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;
}
llvm-svn: 63596
2009-02-03 02:01:43 +00:00
Dale Johannesen
43479713ac
Fill in some missing DL propagation in getNode()s.
...
llvm-svn: 63595
2009-02-03 01:55:44 +00:00
Bill Wendling
014973fd5d
Use SDL->getCurDebugLoc() instead of unknown loc for landing pads.
...
llvm-svn: 63594
2009-02-03 01:55:42 +00:00
Bill Wendling
78decbdb9d
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.
llvm-svn: 63593
2009-02-03 01:33:28 +00:00
Dan Gohman
cb9d033aa4
Delete these two tests. They are specific to x86-64, and there's no
...
reliable way to do this with the current dejagnu infrastructure.
If someone can figure out how to fix these tests so that they test
what they are intended to test without spuriously failing on any
popular platforms, they are invited to reinstate them.
llvm-svn: 63592
2009-02-03 01:33:26 +00:00
Bill Wendling
a228b0ccc0
Alphabetize includes.
...
llvm-svn: 63591
2009-02-03 01:32:22 +00:00
Chris Lattner
2dae393299
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.
llvm-svn: 63590
2009-02-03 01:30:09 +00:00
Dan Gohman
bf5427a7f0
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.
llvm-svn: 63589
2009-02-03 01:28:32 +00:00
Chris Lattner
7f52743cca
this test produces an undefined value, we don't care
...
what it is, but we do want the alloca promoted.
llvm-svn: 63587
2009-02-03 01:13:52 +00:00
Bill Wendling
29833dbc9f
Propagate debug loc info during SDNode -> machine instr creation.
...
llvm-svn: 63585
2009-02-03 01:02:39 +00:00
Bill Wendling
5b177df8e9
Create DebugLoc information in FastISel. Several temporary methods were
...
created. Specifically, those BuildMIs which use
"DebugLoc::getUnknownLoc()". I'll remove them soon.
llvm-svn: 63584
2009-02-03 00:55:04 +00:00
Dale Johannesen
84498c427e
Propagation in TargetLowering. Includes passing a DL
...
into SimplifySetCC which gets called elsewhere.
llvm-svn: 63583
2009-02-03 00:47:48 +00:00
Bill Wendling
dd2a193a37
It fails on Linux. XFAIL that machine.
...
llvm-svn: 63582
2009-02-03 00:35:11 +00:00
Bill Wendling
2d0e55bdc8
This is passing for us. Should it have been reenabled?
...
llvm-svn: 63580
2009-02-03 00:27:09 +00:00
Dan Gohman
7b176db971
Add explicit -march=x86 to these tests so that they don't
...
default to -march=x86-64 on 64-bit hosts.
llvm-svn: 63579
2009-02-03 00:20:22 +00:00
Dan Gohman
0103631cce
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.
llvm-svn: 63577
2009-02-03 00:08:45 +00:00
Dan Gohman
2170150035
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.
llvm-svn: 63575
2009-02-03 00:04:43 +00:00
Dale Johannesen
0c89de8f82
Last DebugLoc propagation for this file.
...
llvm-svn: 63574
2009-02-02 23:46:53 +00:00
Dan Gohman
9bc7148556
Fix another test to not use -mcpu=yonah with 64-bit code.
...
llvm-svn: 63572
2009-02-02 23:43:59 +00:00
Dan Gohman
8a2fa9ded4
Yonah does not support x86-64. Change the -mcpu value to one that does.
...
llvm-svn: 63561
2009-02-02 22:50:08 +00:00
Dale Johannesen
d92b94df04
More DebugLoc propagation. This should be everything
...
except LegalizeOp itself.
llvm-svn: 63560
2009-02-02 22:49:46 +00:00
Mike Stump
4c8ca99bb1
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.
llvm-svn: 63559
2009-02-02 22:48:49 +00:00
Owen Anderson
9d2293f7ad
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.
llvm-svn: 63558
2009-02-02 22:42:01 +00:00
Dale Johannesen
c7295f2a49
DebugLoc propagation. ExpandOp and PromoteOp,
...
among others.
llvm-svn: 63555
2009-02-02 22:12:50 +00:00
Torok Edwin
2bc41a36ba
Only force SSE level if it is not correct.
...
Add an assert to check HasX86_64 status.
llvm-svn: 63552
2009-02-02 21:57:34 +00:00
Devang Patel
32a1b0f0e6
Run dsymutil on darwin, when it is expected, before running gdb test.
...
llvm-svn: 63548
2009-02-02 21:09:36 +00:00
Dale Johannesen
5b1a213918
Commit missing files.
...
llvm-svn: 63545
2009-02-02 20:47:48 +00:00
Chris Lattner
7ce69dfa56
inline SROA::ConvertToScalar, no functionality change.
...
llvm-svn: 63544
2009-02-02 20:44:45 +00:00
Dale Johannesen
8883285060
More DebugLoc propagation.
...
llvm-svn: 63543
2009-02-02 20:41:04 +00:00
Torok Edwin
c1017185a5
remove #if 0 code on Bill's request.
...
llvm-svn: 63542
2009-02-02 20:23:02 +00:00
Duncan Sands
0ecadc3e36
Remove trailing spaces.
...
llvm-svn: 63540
2009-02-02 19:46:41 +00:00
Steve Naroff
36c3f0b6d8
Update hand-crafted VC++ build.
...
- Add PACKAGE_STRING definition to Windows config.h.
llvm-svn: 63539
2009-02-02 19:22:02 +00:00
Dale Johannesen
d0e894212e
DebugLoc propagation for int<->fp conversions.
...
llvm-svn: 63537
2009-02-02 19:03:57 +00:00
Evan Cheng
95c4b28646
Refactor PerformPHIConstruction, no functionality changes.
...
llvm-svn: 63536
2009-02-02 18:33:18 +00:00
Chris Lattner
eeeba2abe9
xfail this for now, will fix shortly.
...
llvm-svn: 63533
2009-02-02 18:15:33 +00:00