1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Commit Graph

19716 Commits

Author SHA1 Message Date
Chris Lattner
4349a69f74 fix a warning in optimized build
llvm-svn: 23030
2005-08-25 00:03:21 +00:00
Chris Lattner
898278d586 Fix some warnings
llvm-svn: 23029
2005-08-25 00:00:26 +00:00
Chris Lattner
8f595df1a6 Split IMPLICIT_DEF into IMPLICIT_DEF_GPR and IMPLICIT_DEF_FP, so that the
instructions take a consistent reg class.  Implement ISD::UNDEF in the dag->dag
selector to generate this, fixing UnitTests/2003-07-06-IntOverflow.

llvm-svn: 23028
2005-08-24 23:08:16 +00:00
Chris Lattner
22c6c99e5d add a method
llvm-svn: 23027
2005-08-24 23:00:29 +00:00
Chris Lattner
5efe9406a6 implement support for calls
llvm-svn: 23026
2005-08-24 22:45:17 +00:00
Chris Lattner
786ec10dfb Add ReplaceAllUsesWith that can take a vector of replacement values.
Add some foldings to hopefully help the illegal setcc issue, and move some code around.

llvm-svn: 23025
2005-08-24 22:44:39 +00:00
Chris Lattner
79191b194f add two new methods
llvm-svn: 23024
2005-08-24 22:43:53 +00:00
Chris Lattner
8824bd228b Remove some dead cases.
Emit the indcall sequence as:

mtctr inreg
mr R12, inreg
btctr

If inreg and R12 aren't coallesced, this reduces the odds of having the mtctr
and btctr in the same dispatch group.  :)

llvm-svn: 23023
2005-08-24 22:21:47 +00:00
Chris Lattner
92b560cfee Add support for external symbols, and support for variable arity instructions
llvm-svn: 23022
2005-08-24 22:02:41 +00:00
Chris Lattner
55fb48f5ee Fix pasto that prevented VT ndoes from showing up in -view-isel-dags correctly
llvm-svn: 23021
2005-08-24 18:30:00 +00:00
Chris Lattner
8d151627a8 add an idea
llvm-svn: 23020
2005-08-24 18:15:24 +00:00
Chris Lattner
efc5937add Fix Regression/Transforms/Reassociate/2005-08-24-Crash.ll
llvm-svn: 23019
2005-08-24 17:55:32 +00:00
Chris Lattner
cd1322eded new testcase that crashes -reassociate
llvm-svn: 23018
2005-08-24 17:54:56 +00:00
Chris Lattner
043ab16860 Transform floor((double)FLT) -> (double)floorf(FLT), implementing
Regression/Transforms/SimplifyLibCalls/floor.ll.  This triggers 19 times in
177.mesa.

llvm-svn: 23017
2005-08-24 17:22:17 +00:00
Chris Lattner
3ad034058e new testcase
llvm-svn: 23016
2005-08-24 17:20:30 +00:00
Chris Lattner
f369fd383d floor/ceil don't read/write memory. This allows gcse to eliminate 6 calls
in mesa.

llvm-svn: 23015
2005-08-24 16:58:56 +00:00
Chris Lattner
17d04b309c Make sure this doesn't break when we're improving the isels
llvm-svn: 23014
2005-08-24 16:48:49 +00:00
Chris Lattner
6d4cd33447 teach selection dag mask tracking about the fact that select_cc operates like
select.  Also teach it that the bit count instructions can only set the low bits
of the result, depending on the size of the input.

This allows us to compile this:

int %eq0(int %a) {
        %tmp.1 = seteq int %a, 0                ; <bool> [#uses=1]
        %tmp.2 = cast bool %tmp.1 to int                ; <int> [#uses=1]
        ret int %tmp.2
}

To this:

_eq0:
        cntlzw r2, r3
        srwi r3, r2, 5
        blr

instead of this:

_eq0:
        cntlzw r2, r3
        rlwinm r3, r2, 27, 31, 31
        blr

when setcc is marked illegal on ppc (which restores parity to non-illegal
setcc).  Thanks to Nate for pointing this out.

llvm-svn: 23013
2005-08-24 16:46:55 +00:00
Chris Lattner
014e001f23 Start using isOperationLegal and isTypeLegal to simplify the code
llvm-svn: 23012
2005-08-24 16:35:28 +00:00
Chris Lattner
b71b78a79d rename hasNativeSupportFor* -> is(Operation|Type)Legal.
llvm-svn: 23011
2005-08-24 16:34:59 +00:00
Chris Lattner
ea62b04502 Adjust to new interface
llvm-svn: 23010
2005-08-24 16:34:12 +00:00
Misha Brukman
14a6b6e354 Wrap long lines
llvm-svn: 23009
2005-08-24 14:03:07 +00:00
Reid Spencer
124828d796 Remove some tabs.
Wrap a line.

llvm-svn: 23008
2005-08-24 10:57:30 +00:00
Reid Spencer
72838802f3 Whoops, don't use PROJ variables, these are all LLVM headers. This allows
projects to compile properly.

llvm-svn: 23007
2005-08-24 10:55:07 +00:00
Reid Spencer
0b958878bb For PR619:
Make any header files that are automatically generated be preconditions of
the compilation. This ensures that if a *.h.in file is changed then its
corresponding *.h file gets updated on the next rebuild. Note that this can
lead to confusing (but correct) results if the *.h.in file changed
unsubstantially so that autoheader doesn't update the *.h file. In that case,
manually touch the *.h file in question to restore order. Moral of the story,
if you're going to "touch" a *.in file then modify it substantially.

llvm-svn: 23006
2005-08-24 10:43:10 +00:00
Reid Spencer
a1470f81ae For PR616:
These patches make threading optional in LLVM. The configuration scripts are now
modified to accept a --disable-threads switch. If this is used, the Mutex class
will be implemented with all functions as no-op. Furthermore, linking against
libpthread will not be done. Finally, the ParallelJIT example needs libpthread
so its makefile was changed to always add -lpthread to the link line.

llvm-svn: 23003
2005-08-24 10:07:20 +00:00
Nate Begeman
326b3809f4 Whoops, fix a thinko. All cases except SETNE are now handled by the
target independent code in SelectionDAG.cpp

llvm-svn: 23002
2005-08-24 05:06:48 +00:00
Nate Begeman
8e1c08e083 Remove unused statistic
Prefer 'neg X' to 'subfic 0, X' since neg does not set XER[CA]

llvm-svn: 23001
2005-08-24 05:03:20 +00:00
Nate Begeman
5d3e28b04c Add the "ppc specific" setcc-equivalent select_cc cases
Prefer 'neg X' to 'subfic 0, X' since it does not set XER[CA]

llvm-svn: 23000
2005-08-24 04:59:21 +00:00
Nate Begeman
2fc750ca45 Teach SelectionDAG how to simplify a few more setcc-equivalent select_cc
nodes so that backends don't have to.

llvm-svn: 22999
2005-08-24 04:57:57 +00:00
Chris Lattner
f034da3bd4 Add callseq_begin/end support
Call stil not supported yet

llvm-svn: 22998
2005-08-24 00:47:15 +00:00
Chris Lattner
64f7f0beac Make -view-isel-dags show the dag before instruction selecting, in case
the target isel crashes due to unimplemented features like calls :)

llvm-svn: 22997
2005-08-24 00:34:29 +00:00
Nate Begeman
d4fcf86262 Fix optimization of select_cc seteq X, 0, 1, 0 -> srl (ctlz X), log2 X size
llvm-svn: 22995
2005-08-24 00:21:28 +00:00
Chris Lattner
e7c3b71a28 Implement LiveVariables.h change
llvm-svn: 22994
2005-08-24 00:09:33 +00:00
Chris Lattner
180f2050d0 Keep the killed/dead sets sorted, so that "KillsRegister" can do a quick
binary search to test for membership.  This speeds up LLC a bit more on KC++,
e.g. on itanium from 16.6974s to 14.8272s, PPC from 11.4926s to 10.7089s and
X86 from 10.8128s to 9.7943s, with no difference in generated code (like all
of the RA patches).

With these changes, isel is the slowest pass for PPC/X86, but linscan+live
intervals is still > 50% of the compile time for itanium.  More work could
be done, but this is the last for now.

llvm-svn: 22993
2005-08-24 00:09:02 +00:00
Chris Lattner
7e3441972b adjust to new live variables interface
llvm-svn: 22992
2005-08-23 23:42:17 +00:00
Chris Lattner
0444d66753 Adjust to new livevars interface
llvm-svn: 22991
2005-08-23 23:41:14 +00:00
Chris Lattner
3bb878f134 Change live variables from using multimaps to using maps of vectors and
rearrange some of the accessors to be more efficient.

This makes it much more efficient to iterate over all of the things with the
same value.  This speeds up liveintervals analysis from 8.63s to 3.79s with
a release build of llc on kc++ with -march=ia64.  This also speeds up live
var from 1.66s -> 0.87s as well, reducing total llc time from 20.1s->15.2s.

This also speeds up other targets slightly, e.g. llc time on X86 from 16.84
-> 16.45s, and PPC from 17.64->17.03s.

llvm-svn: 22990
2005-08-23 23:40:41 +00:00
Chris Lattner
53b91b741f Simplify this code by using higher-level LiveVariables methods
llvm-svn: 22989
2005-08-23 22:51:41 +00:00
Chris Lattner
51bad854a7 Simplify this code by using LiveVariables::KillsRegister
llvm-svn: 22988
2005-08-23 22:49:55 +00:00
Chris Lattner
f91a79a306 Add RegisterDefIsDead to correspond to KillsRegister, mark both const
llvm-svn: 22987
2005-08-23 22:43:24 +00:00
Chris Lattner
610eeca969 Keep track of which registers are related to which other registers.
Use this information to avoid doing expensive interval intersections for
registers that could not possible be interesting.  This speeds up linscan
on ia64 compiling kc++ in release mode from taking 7.82s to 4.8s(!), total
itanium llc time on this program is 27.3s now.  This marginally speeds up
PPC and X86, but they appear to be limited by other parts of linscan, not
this code.

On this program, on itanium, live intervals now takes 41% of llc time.

llvm-svn: 22986
2005-08-23 22:27:31 +00:00
Chris Lattner
a6da5575c8 add a method
llvm-svn: 22985
2005-08-23 21:45:31 +00:00
Chris Lattner
aba58bd49b Fix PR618 and Regression/CodeGen/CBackend/2005-08-23-Fmod.ll by not emitting
x%y for 'rem' on fp values.

llvm-svn: 22984
2005-08-23 20:22:50 +00:00
Chris Lattner
374051379d New testcase for PR618
llvm-svn: 22983
2005-08-23 20:22:07 +00:00
Chris Lattner
86a4a4745c add a note
llvm-svn: 22982
2005-08-23 06:27:59 +00:00
Nate Begeman
a8ec868347 Ack, typo
llvm-svn: 22981
2005-08-23 05:45:10 +00:00
Nate Begeman
0ac8bb2fe1 Add an option to make SetCC illegal as a beta option
llvm-svn: 22979
2005-08-23 05:42:36 +00:00
Nate Begeman
f1581c11e9 Teach the SelectionDAG how to transform select_cc eq, X, 0, 1, 0 into
either seteq X, 0 or srl (ctlz X), size(X-1), depending on what's legal
for the target.

llvm-svn: 22978
2005-08-23 05:41:12 +00:00
Nate Begeman
885680bafb Teach Legalize how to turn setcc into select_cc
llvm-svn: 22977
2005-08-23 04:29:48 +00:00