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

43035 Commits

Author SHA1 Message Date
Chris Lattner
d01522d33a Turn on my codegen prepare heuristic by default. It doesn't affect
performance in most cases on the Grawp tester, but does speed some 
things up (like shootout/hash by 15%).  This also doesn't impact 
compile time in a noticable way on the Grawp tester.

It also, of course, gets the testcase it was designed for right :)

llvm-svn: 60120
2008-11-26 22:16:44 +00:00
Bill Wendling
d8a4b1ec05 Small formatting change.
llvm-svn: 60113
2008-11-26 19:19:05 +00:00
Bill Wendling
cdc91a5f09 Update to explain how ssp and sspreq attributes override each other.
llvm-svn: 60112
2008-11-26 19:07:40 +00:00
Devang Patel
02a25292de Fix typo.
llvm-svn: 60111
2008-11-26 18:13:11 +00:00
Evan Cheng
c18e38d19f Cosmetic.
llvm-svn: 60110
2008-11-26 18:00:00 +00:00
Duncan Sands
f64dd4b09c Check that running the DAG combiner between type
and operation legalization does something useful.

llvm-svn: 60108
2008-11-26 16:44:30 +00:00
Mikhail Glushenkov
1381c387d4 Describe some more options in the man page.
llvm-svn: 60105
2008-11-26 13:40:08 +00:00
Sanjiv Gupta
91da4472f4 Allow custom lowering of ADDE/ADDC/SUBE/SUBC operations.
llvm-svn: 60102
2008-11-26 11:19:00 +00:00
Mikhail Glushenkov
01a62b9117 Fix the -I option (llvmc -I dir1 -I dir2 didn't work).
llvm-svn: 60101
2008-11-26 10:57:31 +00:00
Mikhail Glushenkov
3dd6b7e4e9 Refactor Tools.td to remove repetition.
llvm-svn: 60100
2008-11-26 10:56:56 +00:00
Mikhail Glushenkov
7534e81f38 Small fix: the error message was incorrect in some cases.
llvm-svn: 60099
2008-11-26 10:55:45 +00:00
Sanjiv Gupta
1fa97cc7dd Emit declaration for globals and externs.
Custom lower AND, OR, XOR bitwise operations.

llvm-svn: 60098
2008-11-26 10:53:50 +00:00
Dan Gohman
6a589b31f7 Fish kill flag annotations in PUSH instructions.
llvm-svn: 60095
2008-11-26 06:39:12 +00:00
Dan Gohman
7b56f8686f LiveRanges are represented as half-open ranges. Fix the findLiveInMBBs code
and the LiveInterval.h top-level comment and accordingly. This fixes blocks
having spurious live-in registers in boundary cases.

llvm-svn: 60092
2008-11-26 05:50:31 +00:00
Chris Lattner
1bfd6e8709 teach the new heuristic how to handle inline asm.
llvm-svn: 60088
2008-11-26 04:59:11 +00:00
Devang Patel
c17a1f06f3 Disable -loop-index-split for now.
llvm-svn: 60087
2008-11-26 04:58:14 +00:00
Ted Kremenek
b31e49cd47 Add 'tell' method to raw_fd_ostream that clients can use to query the current location in the file the stream is writing to.
llvm-svn: 60085
2008-11-26 03:33:13 +00:00
Chris Lattner
ff89aeda21 Improve ValueAlreadyLiveAtInst with a cheap and dirty, but effective
heuristic: the value is already live at the new memory operation if
it is used by some other instruction in the memop's block.  This is
cheap and simple to compute (moreso than full liveness).

This improves the new heuristic even more.  For example, it cuts two
out of three new instructions out of 255.vortex:DbmFileInGrpHdr, 
which is one of the functions that the heuristic regressed.  This
overall eliminates another 40 instructions from 403.gcc and visibly
reduces register pressure in 255.vortex (though this only actually
ends up saving the 2 instructions from the whole program).

llvm-svn: 60084
2008-11-26 03:20:37 +00:00
Nick Lewycky
65d37a5d9d __fastcall and __stdcall are mingw extensions to gcc for windows. Use the
__attribute__ notation which is supported on more platforms.

llvm-svn: 60083
2008-11-26 03:17:27 +00:00
Chris Lattner
603d9e1cf7 Start rewroking a subpiece of the profitability heuristic to be
phrased in terms of liveness instead of as a horrible hack.  :)

In pratice, this doesn't change the generated code for either 
255.vortex or 403.gcc, but it could cause minor code changes in 
theory.  This is framework for coming changes.

llvm-svn: 60082
2008-11-26 03:02:41 +00:00
Zhongxing Xu
985967aa25 Adjust indent.
llvm-svn: 60081
2008-11-26 02:57:24 +00:00
Chris Lattner
c9d864b689 add a long-overdue AllocaInst::isStaticAlloca method.
llvm-svn: 60080
2008-11-26 02:54:17 +00:00
Bill Wendling
f069b62cd7 Add test for rdar://6394879.
llvm-svn: 60079
2008-11-26 02:21:12 +00:00
Chris Lattner
b35e482ca3 add a comment, make save/restore logic more obvious.
llvm-svn: 60076
2008-11-26 02:11:11 +00:00
Chris Lattner
61c2a0fc8a This adds in some code (currently disabled unless you pass
-enable-smarter-addr-folding to llc) that gives CGP a better
cost model for when to sink computations into addressing modes.
The basic observation is that sinking increases register 
pressure when part of the addr computation has to be available
for other reasons, such as having a use that is a non-memory
operation.  In cases where it works, it can substantially reduce
register pressure.

This code is currently an overall win on 403.gcc and 255.vortex
(the two things I've been looking at), but there are several 
things I want to do before enabling it by default:

1. This isn't doing any caching of results, so it is much slower 
   than it could be.  It currently slows down release-asserts llc 
   by 1.7% on 176.gcc: 27.12s -> 27.60s.
2. This doesn't think about inline asm memory operands yet.
3. The cost model botches the case when the needed value is live
   across the computation for other reasons.

I'll continue poking at this, and eventually turn it on as llcbeta.

llvm-svn: 60074
2008-11-26 02:00:14 +00:00
Evan Cheng
383a9a9264 Revert r60042. IndVarSimplify should check if APFloat is PPCDoubleDouble first before trying to convert it to an integer.
llvm-svn: 60072
2008-11-26 01:11:57 +00:00
Chris Lattner
8209f83091 Teach CodeGenPrepare to look through Bitcast instructions when attempting to
optimize addressing modes.  This allows us to optimize things like isel-sink2.ll
into:

	movl	4(%esp), %eax
	cmpb	$0, 4(%eax)
	jne	LBB1_2	## F
LBB1_1:	## TB
	movl	$4, %eax
	ret
LBB1_2:	## F
	movzbl	7(%eax), %eax
	ret

instead of:

_test:
	movl	4(%esp), %eax
	cmpb	$0, 4(%eax)
	leal	4(%eax), %eax
	jne	LBB1_2	## F
LBB1_1:	## TB
	movl	$4, %eax
	ret
LBB1_2:	## F
	movzbl	3(%eax), %eax
	ret

This shrinks (e.g.) 403.gcc from 1133510 to 1128345 lines of .s.

Note that the 2008-10-16-SpillerBug.ll testcase is dubious at best, I doubt
it is really testing what it thinks it is.

llvm-svn: 60068
2008-11-26 00:26:16 +00:00
Chris Lattner
017dde7e2b fix an over-reduced test.
llvm-svn: 60067
2008-11-26 00:12:08 +00:00
Chris Lattner
72db9f8bdd this doesn't need EH
llvm-svn: 60066
2008-11-26 00:03:26 +00:00
Nuno Lopes
821f6d257e change AnnotationManager to use 'const char*' instead of std::string. this fixes the leakage of those strings and avoids the creation of such strings in static cosntructors (should result in a little improvement of startup time)
llvm-svn: 60064
2008-11-26 00:00:44 +00:00
Oscar Fuentes
4588307b06 CMake: llvmc2 is now known as llvmc.
llvm-svn: 60052
2008-11-25 22:18:49 +00:00
Mikhail Glushenkov
f9b34b48d8 Add a man page for llvmc. Really basic for now, will be updated later.
llvm-svn: 60049
2008-11-25 21:38:38 +00:00
Mikhail Glushenkov
89bfeb825b Since the old llvmc was removed, rename llvmc2 to llvmc.
llvm-svn: 60048
2008-11-25 21:38:12 +00:00
Mikhail Glushenkov
bcf77dcb9a Make -fsyntax-only, -include and -emit-llvm work for C++ and Objective-C/C++.
llvm-svn: 60047
2008-11-25 21:35:20 +00:00
Mikhail Glushenkov
4877183f90 docs: Add author info + fix incorrect code example.
llvm-svn: 60046
2008-11-25 21:34:53 +00:00
Mikhail Glushenkov
a1314465ee Small documentation update.
llvm-svn: 60045
2008-11-25 21:34:29 +00:00
Mikhail Glushenkov
3a0ef826d3 Document the plugin priority feature.
llvm-svn: 60044
2008-11-25 21:34:01 +00:00
Bill Wendling
75a3f4dc3d A simplification for checking whether the signs of the operands and sum differ. Thanks, Duncan.
llvm-svn: 60043
2008-11-25 19:40:17 +00:00
Evan Cheng
c11d7e324f convertToSignExtendedInteger should return opInvalidOp instead of asserting if sematics of float does not allow arithmetics.
llvm-svn: 60042
2008-11-25 19:00:29 +00:00
Dan Gohman
3b8c028a43 Suppress warnings.
llvm-svn: 60041
2008-11-25 18:53:54 +00:00
Chris Lattner
7c6a0d4d86 This method got renamed, thanks to Mattias Holm for pointing this out.
llvm-svn: 60039
2008-11-25 18:34:50 +00:00
Scott Michel
59013b297c CellSPU:
(a) Remove conditionally removed code in SelectXAddr. Basically, hope for the
    best that the A-form and D-form address predicates catch everything before
    the code decides to emit a X-form address.
(b) Expand vector store test cases to include the usual suspects.

llvm-svn: 60034
2008-11-25 17:29:43 +00:00
Nuno Lopes
10311a70cc add info about how to run the tests with valgrind
llvm-svn: 60030
2008-11-25 15:57:52 +00:00
Bill Wendling
65de5c0566 Now with the correct type for the 0.
llvm-svn: 60016
2008-11-25 08:19:22 +00:00
Bill Wendling
aa0e224ee4 Get rid of unused variable.
llvm-svn: 60015
2008-11-25 08:13:20 +00:00
Bill Wendling
f6dd065808 Hacker's Delight says, "Signed integer overflow of addition occurs if and only
if the operands have the same sign and the sum has sign opposite to that of the
operands."

llvm-svn: 60014
2008-11-25 08:12:19 +00:00
Chris Lattner
242f05e503 Teach MatchScaledValue to handle Scales by 1 with MatchAddr (which
can recursively match things) and scales by 0 by ignoring them.
This triggers once in 403.gcc, saving 1 (!!!!) instruction in the 
whole huge app.

llvm-svn: 60013
2008-11-25 07:25:26 +00:00
Chris Lattner
5e0361dd74 significantly refactor all the addressing mode matching logic
into a new AddressingModeMatcher class.  This makes it easier
to reason about and reduces passing around of stuff, but has
no functionality change.

llvm-svn: 60012
2008-11-25 07:09:13 +00:00
Chris Lattner
9ed8c8eec9 refactor all the constantexpr/instruction handling code out into a
new FindMaximalLegalAddressingModeForOperation helper method.

llvm-svn: 60011
2008-11-25 05:15:49 +00:00
Chris Lattner
587e7c0202 another minor tweak
llvm-svn: 60010
2008-11-25 04:47:41 +00:00