Nate Begeman
c0e2bb488a
fold c1 << (x + c2) into (c1 << c2) << x. fix a warning.
...
llvm-svn: 26005
2006-02-05 08:07:24 +00:00
Chris Lattner
9898b81e27
some stuff is done
...
llvm-svn: 26004
2006-02-05 07:54:37 +00:00
Chris Lattner
807c68d572
Turn A % (C << N), where C is 2^k, into A & ((C << N)-1) [urem only].
...
Turn A / (C1 << N), where C1 is "1<<C2" into A >> (N+C2) [udiv only].
Tested with: rem.ll:test5, div.ll:test10
llvm-svn: 26003
2006-02-05 07:54:04 +00:00
Chris Lattner
bbd8dc6edd
new testcases
...
llvm-svn: 26002
2006-02-05 07:52:47 +00:00
Nate Begeman
c93c3d11d6
Handle urem by shifted powers of 2.
...
llvm-svn: 26001
2006-02-05 07:36:48 +00:00
Nate Begeman
0291708a49
handle combining A / (B << N) into A >>u (log2(B)+N) when B is a power of 2
...
llvm-svn: 26000
2006-02-05 07:20:23 +00:00
Evan Cheng
973e4051d6
Use SelectRoot() as the entry to any tblgen based isel.
...
llvm-svn: 25998
2006-02-05 06:51:51 +00:00
Evan Cheng
fb902782e8
Use SelectRoot() as entry of any tblgen based isel.
...
llvm-svn: 25997
2006-02-05 06:46:41 +00:00
Chris Lattner
42160869d1
Encourage use of the V8 ABI over the V9 ABI.
...
llvm-svn: 25996
2006-02-05 06:44:17 +00:00
Evan Cheng
0b5d4a10a9
Allow more loads to be folded which were previously prevented from happening
...
due to ordering issue. i.e. they were selected for chain use first.
Now at load select time, check if it is being selected for a chain use and if
it has only a single real use. If so, return a HANDLENODE (with the load as
its operand) in its place and record it.
When it is folded or the load is selected for a real use, the isel records it
as the replacement for the HANDLENODE. The replacement is done when all nodes
are selected.
This scheme exposed a couple of problems where cycles can happen. (See comments
in EmitMatchCode() for descriptions of the problems and their workaround /
solutions.) These problems have been resolved with a small compile time
penality.
llvm-svn: 25995
2006-02-05 06:43:12 +00:00
Chris Lattner
44b6352988
This document is out of date. :(
...
llvm-svn: 25994
2006-02-05 06:40:12 +00:00
Chris Lattner
fe5f01cca6
V8 -> Sparc
...
llvm-svn: 25993
2006-02-05 06:39:36 +00:00
Chris Lattner
1d15bef6ac
Remove the SparcV8 backend. It has been renamed to be the Sparc backend.
...
llvm-svn: 25992
2006-02-05 06:33:29 +00:00
Chris Lattner
1e16099e9f
remove V8 reference
...
llvm-svn: 25991
2006-02-05 06:32:59 +00:00
Evan Cheng
d46a7fc65a
* Added SDNode::isOnlyUse().
...
* Fix hasNUsesOfValue(), it should be const.
llvm-svn: 25990
2006-02-05 06:29:23 +00:00
Chris Lattner
ec37ba5968
SparcV8 -> Sparc
...
llvm-svn: 25989
2006-02-05 06:26:43 +00:00
Chris Lattner
f6080adc01
SparcV8 -> Sparc
...
llvm-svn: 25988
2006-02-05 05:56:51 +00:00
Chris Lattner
e4556b0928
These were moved to ../SPARC
...
llvm-svn: 25987
2006-02-05 05:53:48 +00:00
Chris Lattner
7048217c85
move V8 testcases here
...
llvm-svn: 25986
2006-02-05 05:52:55 +00:00
Chris Lattner
834685ef3a
Rename SPARC V8 target to be the LLVM SPARC target.
...
llvm-svn: 25985
2006-02-05 05:50:24 +00:00
Chris Lattner
59378e7675
add a note
...
llvm-svn: 25984
2006-02-05 05:27:35 +00:00
Evan Cheng
c23d3cd6c3
Re-commit the last bit of change that was backed out.
...
llvm-svn: 25983
2006-02-05 05:25:07 +00:00
Evan Cheng
d5d3d7ad9e
Re-committing the last bit of change. It shouldn't break PPC this time.
...
llvm-svn: 25982
2006-02-05 05:22:18 +00:00
Chris Lattner
4efafdb7f4
make sure that global doubles are aligned to 8 bytes
...
llvm-svn: 25981
2006-02-05 01:46:49 +00:00
Chris Lattner
74fd4905bc
Use getPreferredAlignmentLog.
...
llvm-svn: 25980
2006-02-05 01:45:04 +00:00
Chris Lattner
085a324bfc
Use the asmprinter to find out what the preferred alignment of a global is.
...
This patch speeds up 172.mgrid from 31.81s to 11.39s on darwin/ppc.
Many many thanks to Nate for tracking down the root cause of the issue.
llvm-svn: 25979
2006-02-05 01:30:45 +00:00
Chris Lattner
d2c4e9151e
Implement the AsmPrinter::getPreferredAlignmentLog method.
...
llvm-svn: 25978
2006-02-05 01:29:18 +00:00
Chris Lattner
682b5a2626
add a new method, getPreferredAlignmentLog.
...
llvm-svn: 25977
2006-02-05 01:24:06 +00:00
Andrew Lenharth
b28db2290a
linkage fix for weak functions
...
llvm-svn: 25976
2006-02-04 19:13:09 +00:00
Jeff Cohen
4f433dafa5
Fix VC++ warning.
...
llvm-svn: 25975
2006-02-04 16:20:31 +00:00
Chris Lattner
e4dc660cbb
Use SCEVExpander::InsertCastOfTo instead of our own code. This reduces
...
#LLVM LOC, and auto-cse's cast instructions.
llvm-svn: 25974
2006-02-04 09:52:43 +00:00
Chris Lattner
151eb931ec
Pull the InsertCastOfTo out of the header, implement CSE'ing of arguments.
...
llvm-svn: 25973
2006-02-04 09:51:53 +00:00
Chris Lattner
d92225434a
Refactor a bunch of code into a non-inlined method
...
llvm-svn: 25972
2006-02-04 09:51:33 +00:00
Chris Lattner
15ab5c6d0c
Temporarily revert this patch, which probably breaks with the
...
tblgen patch reverted.
llvm-svn: 25971
2006-02-04 09:24:16 +00:00
Chris Lattner
951217976d
Temporarily revert the last change, which breaks PPC and other targets that
...
DO select things.
llvm-svn: 25970
2006-02-04 09:23:06 +00:00
Chris Lattner
964e9b66f8
Value# select instructions, allowing -gcse to remove duplicates
...
llvm-svn: 25969
2006-02-04 09:15:29 +00:00
Evan Cheng
6a366c5eda
Complex pattern's custom matcher should not call Select() on any operands.
...
Select them afterwards if it returns true.
llvm-svn: 25968
2006-02-04 08:50:49 +00:00
Chris Lattner
0ddab3fc99
Custom lower VAARG for the case when we are doing vaarg(double). In this
...
case, the double being loaded may not be 8-byte aligned, so we have to use
our standard bit_convert game.
llvm-svn: 25967
2006-02-04 08:31:30 +00:00
Chris Lattner
6466bb23bc
Fix a nasty typo that broke functions with big stack frames.
...
llvm-svn: 25966
2006-02-04 08:04:21 +00:00
Chris Lattner
bb656b4730
fix a bug in my last checkin
...
llvm-svn: 25965
2006-02-04 07:48:46 +00:00
Chris Lattner
8741126ea7
Fix two significant bugs in LSR:
...
1. When rewriting code in outer loops, sometimes we would insert code into
inner loops that is invariant in that loop.
2. Notice that 4*(2+x) is 8+4*x and use that to simplify expressions.
This is a performance neutral change.
llvm-svn: 25964
2006-02-04 07:36:50 +00:00
Nate Begeman
ba19f3f93c
Remove some stuff that now works
...
llvm-svn: 25963
2006-02-04 07:29:35 +00:00
Chris Lattner
921ddbae1f
add a note
...
llvm-svn: 25962
2006-02-04 07:07:31 +00:00
Chris Lattner
3b39e70a72
Two changes:
...
1. Treat FMOVD as a copy instruction, to help with coallescing in V9 mode
2. When in V9 mode, insert FMOVD instead of FpMOVD instructions, as we don't
ever rewrite FpMOVD instructions into FMOVS instructions, thus we just end
up with commented out copies!
This should fix a bunch of failures in V9 mode on sparc.
llvm-svn: 25961
2006-02-04 06:58:46 +00:00
Evan Cheng
062ac6e46b
Get rid of some memory leaks identified by Valgrind
...
llvm-svn: 25960
2006-02-04 06:49:00 +00:00
Chris Lattner
43978e529e
add a method
...
llvm-svn: 25959
2006-02-04 05:49:01 +00:00
Chris Lattner
d8d71c2b6a
Let bugpoint work on sparc with v9 instructions enabled.
...
llvm-svn: 25958
2006-02-04 05:02:27 +00:00
Jeff Cohen
291586095d
Fix VC++ warning.
...
llvm-svn: 25957
2006-02-04 03:27:39 +00:00
Jeff Cohen
965da754a0
Keep Visual Studio informed.
...
llvm-svn: 25956
2006-02-04 03:27:04 +00:00
Chris Lattner
013f5fc2fa
Add initial support for immediates. This allows us to compile this:
...
int %rlwnm(int %A, int %B) {
%C = call int asm "rlwnm $0, $1, $2, $3, $4", "=r,r,r,n,n"(int %A, int %B, int 4, int 17)
ret int %C
}
into:
_rlwnm:
or r2, r3, r3
or r3, r4, r4
rlwnm r2, r2, r3, 4, 17 ;; note the immediates :)
or r3, r2, r2
blr
llvm-svn: 25955
2006-02-04 02:26:14 +00:00