1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 14:02:52 +02:00
Commit Graph

36805 Commits

Author SHA1 Message Date
Dale Johannesen
cc4f128930 New test, see comments.
llvm-svn: 47078
2008-02-13 18:36:48 +00:00
Duncan Sands
2e9661573f Teach LegalizeTypes how to expand and promote CTLZ,
CTTZ and CTPOP.  The expansion code differs from
that in LegalizeDAG in that it chooses to take the
CTLZ/CTTZ count from the Hi/Lo part depending on
whether the Hi/Lo value is zero, not on whether
CTLZ/CTTZ of Hi/Lo returned 32 (or whatever the
width of the type is) for it.  I made this change
because the optimizers may well know that Hi/Lo
is zero and exploit it.  The promotion code for
CTTZ also differs from that in LegalizeDAG: it
uses an "or" to get the right result when the
original value is zero, rather than using a compare
and select.  This also means the value doesn't
need to be zero extended.

llvm-svn: 47075
2008-02-13 18:01:53 +00:00
Chris Lattner
e1cbaa3334 gcc 3.2.3 is also bad.
llvm-svn: 47073
2008-02-13 17:50:24 +00:00
Chris Lattner
80b3a56774 Fix the PPC JIT regressions by encoding zeroreg as 0 for BLR.
llvm-svn: 47067
2008-02-13 17:24:14 +00:00
Chris Lattner
c16c85444c remove some dead code.
llvm-svn: 47066
2008-02-13 17:18:26 +00:00
Devang Patel
8190e4fbe0 Remove use of ltdl
llvm-svn: 47065
2008-02-13 17:11:39 +00:00
Duncan Sands
855d854415 Add notes on Ada compilers that can be used for
the build.  Put all items that the user should
specify in bold.  Make it a debug build.

llvm-svn: 47063
2008-02-13 16:46:10 +00:00
Wojciech Matyjewicz
a62f8557d9 Fix typo. Thanks to Duncan for noticing.
llvm-svn: 47062
2008-02-13 12:21:32 +00:00
Wojciech Matyjewicz
86032c3a2f Add comments as per review feedback.
llvm-svn: 47061
2008-02-13 11:51:34 +00:00
Evan Cheng
d513437ce1 Some code clean up.
llvm-svn: 47060
2008-02-13 09:56:03 +00:00
Evan Cheng
9c21fd25f0 Simplify.
llvm-svn: 47059
2008-02-13 09:18:16 +00:00
Evan Cheng
84c503fdd4 Simplify.
llvm-svn: 47058
2008-02-13 09:13:21 +00:00
Evan Cheng
0e4d4f17cc Fix a potential serious problem where kills belonging to the val# defined by a two-address instruction is also on the val# that defines the input.
llvm-svn: 47057
2008-02-13 09:06:18 +00:00
Evan Cheng
e0cad13e5e * Cannot safely commute an instruction there are other defs which can reach its uses.
* Ignore copy instructions which have already been coalesced.

llvm-svn: 47056
2008-02-13 08:41:08 +00:00
Eli Friedman
cf6273d015 Add a note pointing to PR1996.
llvm-svn: 47055
2008-02-13 07:56:04 +00:00
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