Chris Lattner
a30946c576
In SDISel, for targets that support FORMAL_ARGUMENTS nodes, lower this
...
node as soon as we create it in SDISel. Previously we would lower it in
legalize. The problem with this is that it only exposes the argument
loads implied by FORMAL_ARGUMENTs after legalize, so that only dag combine 2
can hack on them. This causes us to miss some optimizations because
datatype expansion also happens here.
Exposing the loads early allows us to do optimizations on them. For example
we now compile arg-cast.ll to:
_foo:
movl $2147483647, %eax
andl 8(%esp), %eax
ret
where we previously produced:
_foo:
subl $12, %esp
movsd 16(%esp), %xmm0
movsd %xmm0, (%esp)
movl $2147483647, %eax
andl 4(%esp), %eax
addl $12, %esp
ret
It might also make sense to do this for ISD::CALL nodes, which have implicit
stores on many targets.
llvm-svn: 47054
2008-02-13 07:39:09 +00:00
Chris Lattner
57f2088225
don't try to avoid inserting loads when lowering FORMAL_ARGUMENTS.
...
DAGCombine is now quite good at zapifying them.
llvm-svn: 47053
2008-02-13 07:35:30 +00:00
Chris Lattner
c798882db7
teach dag combiner how to eliminate MERGE_VALUES nodes.
...
llvm-svn: 47052
2008-02-13 07:25:05 +00:00
Nate Begeman
5f18794295
readme updates
...
llvm-svn: 47051
2008-02-13 07:06:12 +00:00
Eli Friedman
75220639b6
Add test for PR1996. (This is my first time adding a test for a
...
transform, so please review.)
llvm-svn: 47050
2008-02-13 06:55:57 +00:00
Nate Begeman
cfd9883301
Add testcase for recent legalizer change
...
llvm-svn: 47049
2008-02-13 06:48:40 +00:00
Nate Begeman
f628b4b2a7
Support legalizing insert_vector_elt on targets where the element
...
type is not legal.
llvm-svn: 47048
2008-02-13 06:43:04 +00:00
Evan Cheng
68a88c1f52
New tests.
...
llvm-svn: 47047
2008-02-13 03:23:53 +00:00
Evan Cheng
d4ddda68fa
Initial support for copy elimination by commuting its definition MI.
...
PR1877.
A3 = op A2 B0<kill>
...
B1 = A3 <- this copy
...
= op A3 <- more uses
==>
B2 = op B0 A2<kill>
...
B1 = B2 <- now an identify copy
...
= op B2 <- more uses
This speeds up FreeBench/neural by 29%, Olden/bh by 12%, oopack_v1p8 by 53%.
llvm-svn: 47046
2008-02-13 03:01:43 +00:00
Nate Begeman
1867c6c264
Make register scavenging happy by not using a reg (CR0) that isn't defined
...
llvm-svn: 47045
2008-02-13 02:58:33 +00:00
Evan Cheng
da24989368
- Added removeValNo() to remove all live ranges of a particular value#.
...
- removeRange() can now update value# information.
llvm-svn: 47044
2008-02-13 02:48:26 +00:00
Evan Cheng
4b37f5ff05
commuteInstr() can now commute non-ssa machine instrs.
...
llvm-svn: 47043
2008-02-13 02:46:49 +00:00
Evan Cheng
95894280dc
Added debugging routine dumpUses.
...
llvm-svn: 47042
2008-02-13 02:45:38 +00:00
Dan Gohman
09023887f8
Convert SelectionDAG::ComputeMaskedBits to use APInt instead of uint64_t.
...
Add an overload that supports the uint64_t interface for use by clients
that haven't been updated yet.
llvm-svn: 47039
2008-02-13 00:35:47 +00:00
Dale Johannesen
4621e574c9
__DATA not __DATA__ is the right segment name on darwin.
...
Spotted by Nick Kledzik.
llvm-svn: 47037
2008-02-12 23:35:09 +00:00
Nate Begeman
589ecad41d
Remove some dead code
...
llvm-svn: 47036
2008-02-12 22:54:40 +00:00
Nate Begeman
810b85bde8
SSE4.1 64b integer insert/extract pattern support
...
Move formats into the formats file
llvm-svn: 47035
2008-02-12 22:51:28 +00:00
Dan Gohman
f65b0b112c
Change APInt::getBitsSet to accept a "half-open" range, where the
...
hiBit parameter marks the index one past the last desired set bit.
llvm-svn: 47032
2008-02-12 21:47:33 +00:00
Duncan Sands
a2c3d4ee96
Note that these instructions are for x86-32 linux
...
(the only platform on which the Ada compiler even
builds).
llvm-svn: 47031
2008-02-12 21:40:21 +00:00
Duncan Sands
f4d6a81b3b
Add more spacing.
...
llvm-svn: 47028
2008-02-12 21:28:39 +00:00
Duncan Sands
8216baaed2
Add instructions for building Ada and Fortran.
...
Adjust mentions of gcc4 to be 4.0/4.2 agnostic.
This file should probably be renamed tor
GCCFEBuildInstrs.html...
llvm-svn: 47027
2008-02-12 21:22:58 +00:00
Owen Anderson
274aa2846e
Re-apply the patch to improve the optimizations of memcpy's, with several
...
bugs fixed. This now passes PPC bootstrap.
llvm-svn: 47026
2008-02-12 21:15:18 +00:00
Duncan Sands
1122ee4ded
Generalize getCopyFromParts and getCopyToParts to
...
handle arbitrary precision integers and any number
of parts. For example, on a 32 bit machine an i50
corresponds to two i32 parts. getCopyToParts will
extend the i50 to an i64 then write half of the i64
to each part; getCopyFromParts will combine the two
i32 parts into an i64 then truncate the result to
i50.
llvm-svn: 47024
2008-02-12 20:46:31 +00:00
Evan Cheng
b05b05aba5
Revert r46916 PPCTargetAsmInfo.cpp.
...
llvm-svn: 47020
2008-02-12 19:25:12 +00:00
Evan Cheng
e3ddcfa588
Only using x86-64 rip relative addressing in non-staic mode?
...
llvm-svn: 47019
2008-02-12 19:20:46 +00:00
Evan Cheng
0d2efb485d
Don't mask the isel bug.
...
llvm-svn: 47018
2008-02-12 19:11:29 +00:00
Evan Cheng
6c7520f922
This test assumes no SSE4.1.
...
llvm-svn: 47017
2008-02-12 19:11:08 +00:00
Dan Gohman
3e4b49b4a6
Add a doxygen comment for SrcValueSDNode, to make its purpose
...
clear and to clarify how it differs from MemOperandSDNode.
llvm-svn: 47015
2008-02-12 18:52:52 +00:00
Devang Patel
1f8de09109
Remove dead code.
...
llvm-svn: 47012
2008-02-12 18:20:50 +00:00
Wojciech Matyjewicz
6df5450bc4
Now that ScalarEvolution::print writes to the correct stream, there is
...
no need to redirect stderr into stdout.
llvm-svn: 47009
2008-02-12 15:12:40 +00:00
Wojciech Matyjewicz
ae01857e92
Change negative grep into positive one in my yesterday's testcase.
...
llvm-svn: 47008
2008-02-12 15:10:35 +00:00
Wojciech Matyjewicz
b6e6dacc60
Fix PR2002. Suppose n is the initial value for the induction
...
variable (with step 1) and m is its final value. Then, the correct trip
count is SMAX(m,n)-n. Previously, we used SMAX(0,m-n), but m-n may
overflow and can't in general be interpreted as signed.
Patch by Nick Lewycky.
llvm-svn: 47007
2008-02-12 15:09:36 +00:00
Eli Friedman
69268a529e
Fix for bug 1996: optimize out loads of undef. This code basically just
...
checks for a malloc/alloca immediately followed by a load.
llvm-svn: 47006
2008-02-12 12:08:14 +00:00
Evan Cheng
c3875c88a7
Update comment.
...
llvm-svn: 47002
2008-02-12 07:59:55 +00:00
Evan Cheng
075ce702eb
Unbreak various insert_vector_elt and extract_vector_elt tests in presence of SSE4.
...
llvm-svn: 47001
2008-02-12 07:59:45 +00:00
Tanya Lattner
cefcef7955
Test case for annotate builtin.
...
llvm-svn: 46999
2008-02-12 07:46:33 +00:00
Evan Cheng
1ab096a313
Fix some test cases.
...
llvm-svn: 46998
2008-02-12 07:22:46 +00:00
Bill Wendling
3891d1f4af
More violation fixes.
...
llvm-svn: 46997
2008-02-12 07:12:46 +00:00
Bill Wendling
9c834ce7c4
Fix validation errors: di -> dt.
...
llvm-svn: 46996
2008-02-12 07:09:05 +00:00
Bill Wendling
08dd4fca8d
Reformatting. Adding "doc_code" divisions for code examples. Updated some
...
of the examples to reflect the current .TD files.
llvm-svn: 46995
2008-02-12 07:06:19 +00:00
Chris Lattner
30fbb8a24a
rip out llvm 2.2 stuff in preparation for llvm 2.3
...
llvm-svn: 46993
2008-02-12 06:29:45 +00:00
Chris Lattner
22172fbf15
heavily refactor this to have less duplication between BUILD_FOR_WEBSITE mode and not.
...
llvm-svn: 46991
2008-02-12 06:07:47 +00:00
Chris Lattner
784a67b822
remove unknown details
...
llvm-svn: 46985
2008-02-12 05:07:12 +00:00
Tanya Lattner
2148b386aa
Add 2.2 release tag.
...
llvm-svn: 46981
2008-02-12 02:42:55 +00:00
Nate Begeman
5c59b16468
Stuff noticed while grepping code
...
llvm-svn: 46979
2008-02-11 23:47:56 +00:00
Dan Gohman
b7bbe43ad3
Correct the order of the arguments in the examples in the comments
...
for APInt::getBitsSet. And fix an off-by-one bug in "wrapping" mode.
llvm-svn: 46978
2008-02-11 23:45:14 +00:00
Ted Kremenek
dbef529071
The factories for ImutAVLTree/ImmutableSet/ImmutableMap now take an (optional)
...
BumpPtrAllocator argument to their constructors. This BumpPtrAllocator
will be used to allocate trees. If no BumpPtrAllocator is provided, one
is created (as before).
llvm-svn: 46975
2008-02-11 23:11:12 +00:00
Scott Michel
9756189233
Added blurb for CellSPU progress
...
llvm-svn: 46968
2008-02-11 21:05:47 +00:00
Duncan Sands
7916fcbe27
Generalize the handling of call and return arguments,
...
in preparation for apint support. These changes are
intended to have no functional effect.
llvm-svn: 46967
2008-02-11 20:58:28 +00:00
Dan Gohman
243661fb31
From Chris' review: use isa instead of explicitly using classof.
...
llvm-svn: 46964
2008-02-11 19:00:34 +00:00