Evan Cheng
b2bc19ee5b
Added missing entries in X86 load / store folding tables.
...
llvm-svn: 46866
2008-02-08 00:12:56 +00:00
Evan Cheng
0c6aedd740
Remove remnant of load folding in local register allocator. Patch by Holger Schurig.
...
llvm-svn: 46861
2008-02-07 19:46:55 +00:00
Dan Gohman
eb7c8e4f6b
Follow Chris' suggestion; change the PseudoSourceValue accessors
...
to return pointers instead of references, since this is always what
is needed.
llvm-svn: 46857
2008-02-07 18:41:25 +00:00
Dan Gohman
3af6eba3dd
Add SourceValue information for outgoing argument stores on x86.
...
llvm-svn: 46854
2008-02-07 16:28:05 +00:00
Dan Gohman
ebca101f50
Don't abort if a MemOperand is missing a SourceValue; just print it
...
as <unknown>. And make some minor adjustments to the MemOperand
dump format.
llvm-svn: 46853
2008-02-07 16:18:00 +00:00
Evan Cheng
a377b2bbd1
Fix a x86-64 codegen deficiency. Allow gv + offset when using rip addressing mode.
...
Before:
_main:
subq $8, %rsp
leaq _X(%rip), %rax
movsd 8(%rax), %xmm1
movss _X(%rip), %xmm0
call _t
xorl %ecx, %ecx
movl %ecx, %eax
addq $8, %rsp
ret
Now:
_main:
subq $8, %rsp
movsd _X+8(%rip), %xmm1
movss _X(%rip), %xmm0
call _t
xorl %ecx, %ecx
movl %ecx, %eax
addq $8, %rsp
ret
Notice there is another idiotic codegen issue that needs to be fixed asap:
xorl %ecx, %ecx
movl %ecx, %eax
llvm-svn: 46850
2008-02-07 08:53:49 +00:00
Evan Cheng
92635b3d94
In some cases, e.g. ADD32ri, no transformation is made. Guide against it.
...
llvm-svn: 46849
2008-02-07 08:29:53 +00:00
Nick Lewycky
b0f0e69df2
Don't make up new directives. (".set_foobar")
...
llvm-svn: 46848
2008-02-07 06:36:26 +00:00
Dan Gohman
b4aa0b2a15
Fix a typo in a comment.
...
llvm-svn: 46836
2008-02-07 02:30:40 +00:00
Dan Gohman
011075cfdb
Add support to FoldingSet for hashing APInt objects.
...
llvm-svn: 46833
2008-02-06 23:09:15 +00:00
Dan Gohman
f00842e086
Re-apply the memory operand changes, with a fix for the static
...
initializer problem, a minor tweak to the way the
DAGISelEmitter finds load/store nodes, and a renaming of the
new PseudoSourceValue objects.
llvm-svn: 46827
2008-02-06 22:27:42 +00:00
Bill Wendling
8a28ab4b1f
Temporarily reverting:
...
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080128/057882.html
This is causing a miscompilation on PPC G5 and just now seeing it on iMac x86-64.
llvm-svn: 46822
2008-02-06 20:03:07 +00:00
Evan Cheng
2091d9a2e8
Fix a number of local register allocator issues: PR1609.
...
llvm-svn: 46821
2008-02-06 19:16:53 +00:00
Evan Cheng
34815d69b2
RegAllocaLocal still *requires* LiveVariables since it runs PHIElimination, followed by TwoAddress which requires LiveVariables. We cannot run LiveVariables on non-SSA code.
...
llvm-svn: 46813
2008-02-06 08:00:32 +00:00
Tanya Lattner
1234229bc7
Throttle the non-local dependence analysis for basic blocks with more than 50 predecessors. Added command line option to play with this threshold.
...
llvm-svn: 46790
2008-02-06 00:54:55 +00:00
Evan Cheng
851d353eb8
Fix PR1975: dag isel emitter produces patterns that isel wrong flag result.
...
llvm-svn: 46776
2008-02-05 22:50:29 +00:00
Evan Cheng
e509232483
Move to getCALLSEQ_END to ensure CALLSEQ_END node produces a flag. This is consistent with the definition in td file.
...
llvm-svn: 46775
2008-02-05 22:44:06 +00:00
Chris Lattner
5c9fc804d7
Make RenamePass faster by making the 'is this a new phi node'
...
check more intelligent. This speeds up mem2reg from 5.29s to
0.79s on a synthetic testcase with tons of predecessors and
phi nodes.
llvm-svn: 46767
2008-02-05 21:26:23 +00:00
Dale Johannesen
e8fa3130f8
Implement sseregparm.
...
llvm-svn: 46764
2008-02-05 20:46:33 +00:00
Evan Cheng
69d5e0fc0f
If a vr is already marked alive in a bb, then it has PHI uses that are visited earlier, then it is not killed in the def block (i.e. not dead).
...
llvm-svn: 46763
2008-02-05 20:04:18 +00:00
Nate Begeman
9f4245c16a
Ident mnemonics appropriately
...
llvm-svn: 46746
2008-02-05 08:49:09 +00:00
Chris Lattner
96deed5d4d
Fix a bug compiling PR1978 (perhaps not the only one though) which
...
was incorrectly simplifying "x == (gep x, 1, i)" into false, even
though i could be negative. As it turns out, all the code to
handle this already existed, we just need to disable the incorrect
optimization case and let the general case handle it.
llvm-svn: 46739
2008-02-05 04:45:32 +00:00
Owen Anderson
28d90a4a6a
Fix an obscure read-after-free bug that Duncan found.
...
llvm-svn: 46738
2008-02-05 04:34:03 +00:00
Evan Cheng
352062f5f7
Typo.
...
llvm-svn: 46725
2008-02-04 23:10:38 +00:00
Evan Cheng
1c67dcaae7
Dwarf requires variable entries to be in the source order. Right now, since we are recording variable information at isel time this means parameters would appear in the reverse order. The short term fix is to issue recordVariable() at asm printing time instead.
...
llvm-svn: 46724
2008-02-04 23:06:48 +00:00
Nate Begeman
2b00217d58
This method should be virtual
...
llvm-svn: 46723
2008-02-04 23:04:24 +00:00
Nate Begeman
8285430ed7
Eliminate some redundant code.
...
llvm-svn: 46720
2008-02-04 21:44:06 +00:00
Ted Kremenek
6dab41ed32
Added "bucket_iterators" to FoldingSet. Bucket iterators allow iteration
...
over all the nodes in a particular bucket.
llvm-svn: 46716
2008-02-04 21:11:17 +00:00
Devang Patel
ab8c21f3a1
Set error message.
...
Patch by Shantonu Sen.
llvm-svn: 46715
2008-02-04 20:57:54 +00:00
Ted Kremenek
c84b3400b2
Fixed 80 col. violation.
...
llvm-svn: 46709
2008-02-04 17:14:20 +00:00
Duncan Sands
2ba7682d9e
I don't see how NodeUpdated can be called with a
...
ReadyToProcess node - add an assertion to check
this. Add an assertion to NodeDeleted that checks
that processed/ready nodes are indeed not deleted.
It is because they are never deleted that none of
the maps can have a deleted node as the source of
a mapping. It does however seem to be possible in
theory to have a deleted value as the target of a
mapping, however this has not yet been spotted in
the wild. Still mulling on what to do about this.
[The theoretical situation is this: a node A is
expanded/promoted/whatever to a newly created node
B. Thus A->B is added to a map. When the subtree
rooted at B is legalized it is conceivable that B
is deleted due to RAUW on a node somewhere above
it].
llvm-svn: 46705
2008-02-04 09:29:17 +00:00
Nate Begeman
16830a34c4
The rest of the SSE4.1 intrinsic patterns that are obvious to me. Getting
...
Evan's help with the rest.
llvm-svn: 46697
2008-02-04 06:00:24 +00:00
Nate Begeman
ee7503810f
Some more SSE 4.1 intrinsic patterns.
...
llvm-svn: 46696
2008-02-04 05:34:34 +00:00
Owen Anderson
af0449f9e0
Be more precise when eliminating pointers bue to memcpy's. This allows more
...
stores to be deleted in some cases.
llvm-svn: 46694
2008-02-04 04:53:00 +00:00
Owen Anderson
aaba6f96da
Allow GVN to hack on memcpy's, making them open to further optimization.
...
llvm-svn: 46693
2008-02-04 02:59:58 +00:00
Nick Lewycky
febd3642ce
There are some cases where icmp(add) can be folded into a new icmp. Handle them.
...
llvm-svn: 46687
2008-02-03 16:33:09 +00:00
Nick Lewycky
29cd604126
Hack on vectors too.
...
llvm-svn: 46684
2008-02-03 08:19:11 +00:00
Nick Lewycky
ce4c4698d7
Fold away one multiply in instcombine. This would normally be caught in
...
reassociate anyways, but they could be generated during instcombine's run.
llvm-svn: 46683
2008-02-03 07:42:09 +00:00
Chris Lattner
391e0937e7
Fix typo
...
llvm-svn: 46682
2008-02-03 07:30:27 +00:00
Nate Begeman
ead8dfeef2
SSE 4.1 Intrinsics and detection
...
llvm-svn: 46681
2008-02-03 07:18:54 +00:00
Chris Lattner
57478e6318
handle the case where a node can become ready to process
...
multiple times due to a RAUW.
llvm-svn: 46680
2008-02-03 07:13:32 +00:00
Chris Lattner
6c9f8f2d91
Use the new infrastructure for listening to node updates to
...
keep the LegalizeTypes node flags up to date when doing a RAUW.
This fixes a nasty bug that Duncan ran into and makes the
previous (nonbuggy case) more efficent.
llvm-svn: 46679
2008-02-03 07:08:51 +00:00
Chris Lattner
ce1bde2760
the world doesn't need my debugging code.
...
llvm-svn: 46678
2008-02-03 07:01:05 +00:00
Chris Lattner
6ea106139d
Change the 'global modification' APIs in SelectionDAG to take a new
...
DAGUpdateListener object pointer instead of just returning a vector
of deleted nodes. This makes the interfaces more efficient (no more
allocating a vector [at least a malloc], filling it in, then walking
it) and more clean. This also allows the client to be notified of
nodes that are *changed* but not deleted.
llvm-svn: 46677
2008-02-03 06:49:24 +00:00
Chris Lattner
e926ece00b
explicitly include Compiler.h instead of getting it from tblgen in the middle of a class.
...
llvm-svn: 46676
2008-02-03 05:43:57 +00:00
Chris Lattner
096fa73683
Generalize the SDOperand->SDOperand form of
...
SelectionDAG::ReplaceAllUsesWith to handle replacement of
an SDOperand with *any* sdoperand, not just one for a node with
a single result. Note that this has a horrible FIXME'd hack in it
to work around PR1975. This should be removed when PR1975 is fixed.
llvm-svn: 46674
2008-02-03 03:35:22 +00:00
Chris Lattner
df36b95e00
don't do ReplaceUses on a result that doesn't exist.
...
llvm-svn: 46673
2008-02-03 03:20:59 +00:00
Chris Lattner
b936d07617
add a -view-legalize-types-dags option, for viewing the dags going into legalize types.
...
llvm-svn: 46672
2008-02-03 02:05:04 +00:00
Evan Cheng
f61d1115af
Get rid of the annoying blank lines before labels.
...
llvm-svn: 46667
2008-02-02 08:39:46 +00:00
Nick Lewycky
78e2e2cd07
Don't use uninitialized values. Fixes vec_align.ll on X86 Linux.
...
llvm-svn: 46666
2008-02-02 08:29:58 +00:00