Nate Begeman
3dc8b89493
fold c1 << (x + c2) into (c1 << c2) << x. fix a warning.
...
llvm-svn: 26005
2006-02-05 08:07:24 +00:00
Chris Lattner
4b8fcc229f
some stuff is done
...
llvm-svn: 26004
2006-02-05 07:54:37 +00:00
Chris Lattner
2e90b732fa
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
b624bb5f0d
new testcases
...
llvm-svn: 26002
2006-02-05 07:52:47 +00:00
Nate Begeman
c89fdf1eb3
Handle urem by shifted powers of 2.
...
llvm-svn: 26001
2006-02-05 07:36:48 +00:00
Nate Begeman
25d178bece
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
a28b764886
Use SelectRoot() as the entry to any tblgen based isel.
...
llvm-svn: 25998
2006-02-05 06:51:51 +00:00
Evan Cheng
54cb1833a4
Use SelectRoot() as entry of any tblgen based isel.
...
llvm-svn: 25997
2006-02-05 06:46:41 +00:00
Chris Lattner
51473c3379
Encourage use of the V8 ABI over the V9 ABI.
...
llvm-svn: 25996
2006-02-05 06:44:17 +00:00
Evan Cheng
368f20e53d
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
a07b2d5b3a
This document is out of date. :(
...
llvm-svn: 25994
2006-02-05 06:40:12 +00:00
Chris Lattner
a38fe5fc8e
V8 -> Sparc
...
llvm-svn: 25993
2006-02-05 06:39:36 +00:00
Chris Lattner
25777c8c25
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
a3e5b2c61c
remove V8 reference
...
llvm-svn: 25991
2006-02-05 06:32:59 +00:00
Evan Cheng
d37645c07d
* Added SDNode::isOnlyUse().
...
* Fix hasNUsesOfValue(), it should be const.
llvm-svn: 25990
2006-02-05 06:29:23 +00:00
Chris Lattner
03e6bc6676
SparcV8 -> Sparc
...
llvm-svn: 25989
2006-02-05 06:26:43 +00:00
Chris Lattner
1b82081e0e
SparcV8 -> Sparc
...
llvm-svn: 25988
2006-02-05 05:56:51 +00:00
Chris Lattner
90263ea903
These were moved to ../SPARC
...
llvm-svn: 25987
2006-02-05 05:53:48 +00:00
Chris Lattner
a590d80e5b
move V8 testcases here
...
llvm-svn: 25986
2006-02-05 05:52:55 +00:00
Chris Lattner
158e1f519c
Rename SPARC V8 target to be the LLVM SPARC target.
...
llvm-svn: 25985
2006-02-05 05:50:24 +00:00
Chris Lattner
c0e48c6c58
add a note
...
llvm-svn: 25984
2006-02-05 05:27:35 +00:00
Evan Cheng
d19d51f414
Re-commit the last bit of change that was backed out.
...
llvm-svn: 25983
2006-02-05 05:25:07 +00:00
Evan Cheng
7ab4579c68
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
cbab28414e
make sure that global doubles are aligned to 8 bytes
...
llvm-svn: 25981
2006-02-05 01:46:49 +00:00
Chris Lattner
c070cb685d
Use getPreferredAlignmentLog.
...
llvm-svn: 25980
2006-02-05 01:45:04 +00:00
Chris Lattner
1b1a8731c0
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
a9b2525d3e
Implement the AsmPrinter::getPreferredAlignmentLog method.
...
llvm-svn: 25978
2006-02-05 01:29:18 +00:00
Chris Lattner
9d0b2f7b50
add a new method, getPreferredAlignmentLog.
...
llvm-svn: 25977
2006-02-05 01:24:06 +00:00
Andrew Lenharth
1fcff15f86
linkage fix for weak functions
...
llvm-svn: 25976
2006-02-04 19:13:09 +00:00
Jeff Cohen
95ae171d5b
Fix VC++ warning.
...
llvm-svn: 25975
2006-02-04 16:20:31 +00:00
Chris Lattner
d30c4991a1
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
a6da69cab0
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
5107cdcc73
Refactor a bunch of code into a non-inlined method
...
llvm-svn: 25972
2006-02-04 09:51:33 +00:00
Chris Lattner
22b4edfb42
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
586b06281c
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
b6a1865bca
Value# select instructions, allowing -gcse to remove duplicates
...
llvm-svn: 25969
2006-02-04 09:15:29 +00:00
Evan Cheng
ce87cac555
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
ab146eae38
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
a1fa8b1c88
Fix a nasty typo that broke functions with big stack frames.
...
llvm-svn: 25966
2006-02-04 08:04:21 +00:00
Chris Lattner
d096b2f3e0
fix a bug in my last checkin
...
llvm-svn: 25965
2006-02-04 07:48:46 +00:00
Chris Lattner
2959f0003e
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
a1e895cf97
Remove some stuff that now works
...
llvm-svn: 25963
2006-02-04 07:29:35 +00:00
Chris Lattner
32ed2b45c7
add a note
...
llvm-svn: 25962
2006-02-04 07:07:31 +00:00
Chris Lattner
2c0956bcea
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
f9adce90bf
Get rid of some memory leaks identified by Valgrind
...
llvm-svn: 25960
2006-02-04 06:49:00 +00:00
Chris Lattner
ca05e6a837
add a method
...
llvm-svn: 25959
2006-02-04 05:49:01 +00:00
Chris Lattner
2d2e2e3c0e
Let bugpoint work on sparc with v9 instructions enabled.
...
llvm-svn: 25958
2006-02-04 05:02:27 +00:00
Jeff Cohen
57a004abfe
Fix VC++ warning.
...
llvm-svn: 25957
2006-02-04 03:27:39 +00:00
Jeff Cohen
0e7aee2382
Keep Visual Studio informed.
...
llvm-svn: 25956
2006-02-04 03:27:04 +00:00
Chris Lattner
3b48431333
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