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
Evan Cheng
8fd9fd7866
Remove an unnecessary predicate.
...
llvm-svn: 25954
2006-02-04 02:23:01 +00:00
Evan Cheng
078962656b
Separate FILD and FILD_FLAG, the later is only used for SSE2. It produces a
...
flag so it can be flagged to a FST.
llvm-svn: 25953
2006-02-04 02:20:30 +00:00
Chris Lattner
13f609dfe2
Initial early support for non-register operands, like immediates
...
llvm-svn: 25952
2006-02-04 02:16:44 +00:00
Chris Lattner
785771db97
implementation of some methods for inlineasm
...
llvm-svn: 25951
2006-02-04 02:13:02 +00:00
Chris Lattner
2395722dbd
Add some methods for inline asm support.
...
llvm-svn: 25950
2006-02-04 02:12:09 +00:00
Chris Lattner
08dba8d9f8
Handle another case exposed on X86.
...
llvm-svn: 25949
2006-02-03 23:50:46 +00:00
Chris Lattner
f0ef4b4391
Fix a nasty problem on two-address machines in the following situation:
...
store EAX -> [ss#0]
[ss#0] += 1
...
use(EAX)
In this case, it is not valid to rewrite this as:
store EAX -> [ss#0]
EAX += 1
store EAX -> [ss#0] ;;; this would also delete the store above
...
use(EAX)
... because EAX is not a dead at that point. Keep track of which registers
we are allowed to clobber, and which ones we aren't, and don't clobber the
ones we're not supposed to. :)
This should resolve the issues on X86 last night.
llvm-svn: 25948
2006-02-03 23:28:46 +00:00
Chris Lattner
03b42d7724
significantly simplify the VirtRegMap code by pulling the SpillSlotsAvailable
...
and PhysRegsAvailable maps out into a new AvailableSpills struct. No
functionality change.
This paves the way for a bugfix, coming up next.
llvm-svn: 25947
2006-02-03 23:13:58 +00:00
Nate Begeman
5a58572b9b
Implement some feedback from sabre
...
llvm-svn: 25946
2006-02-03 22:38:07 +00:00
Nate Begeman
2d9838ec9b
Add a framework for eliminating instructions that produces undemanded bits.
...
llvm-svn: 25945
2006-02-03 22:24:05 +00:00
Chris Lattner
393e9d10dd
add a note
...
llvm-svn: 25944
2006-02-03 22:06:45 +00:00
Chris Lattner
2b82e66f7c
another case Nate came up with
...
llvm-svn: 25943
2006-02-03 22:05:41 +00:00
Chris Lattner
6c39bcf741
add a note
...
llvm-svn: 25942
2006-02-03 21:25:23 +00:00
Chris Lattner
47b11a250c
remove some #ifdef'd out code, which should properly be in the dag combiner anyway.
...
llvm-svn: 25941
2006-02-03 20:13:59 +00:00
Chris Lattner
366fa6bb83
remove an old comment
...
llvm-svn: 25940
2006-02-03 18:59:39 +00:00
Chris Lattner
782422567b
Remove the X86PeepholeOptimizerPass, a truly horrible old hack that is now
...
obsolete. yaay :)
llvm-svn: 25939
2006-02-03 18:54:24 +00:00
Chris Lattner
70ef21db04
When rewriting frame instructions, emit the appropriate small-immediate
...
instruction when possible.
llvm-svn: 25938
2006-02-03 18:20:04 +00:00
Chris Lattner
21f305febf
node predicates add to the complexity of a pattern. This ensures that the
...
X86 backend attempts to match small-immediate versions of instructions before
the full size immediate versions.
llvm-svn: 25937
2006-02-03 18:06:02 +00:00
Chris Lattner
255ef92e53
Teach sparc to fold loads/stores into copies.
...
Remove the dead getRegClassForType method
minor formating changes.
llvm-svn: 25936
2006-02-03 07:06:25 +00:00
Chris Lattner
541258d077
remove dead fn
...
llvm-svn: 25935
2006-02-03 06:51:34 +00:00
Nate Begeman
78c9e14249
Add common code for reassociating ops in the dag combiner
...
llvm-svn: 25934
2006-02-03 06:46:56 +00:00
Evan Cheng
79edabf042
Added a (store (op (load ...) ...) ...) folding test case.
...
llvm-svn: 25933
2006-02-03 06:46:41 +00:00
Chris Lattner
590c0d8621
Implement isLoadFromStackSlot and isStoreToStackSlot
...
llvm-svn: 25932
2006-02-03 06:44:54 +00:00
Evan Cheng
7c8bab62e5
(store (op (load ...))) folding problem. In the generated matching code,
...
Chain is initially set to the chain operand of store node, when it reaches
load, if it matches the load then Chain is set to the chain operand of the
load.
However, if the matching code that follows this fails, isel moves on to the
next pattern but it does not restore Chain to the chain operand of the store.
So when it tries to match the next store / op / load pattern it would fail on
the Chain == load.getOperand(0) test.
The solution is for each chain operand to get a unique name. e.g. Chain10.
llvm-svn: 25931
2006-02-03 06:22:41 +00:00
Chris Lattner
172cf85d48
remove some target-indep and implemented notes
...
llvm-svn: 25930
2006-02-03 06:22:11 +00:00
Chris Lattner
9f8d39543f
target independent notes
...
llvm-svn: 25929
2006-02-03 06:21:43 +00:00
Nate Begeman
85f3c9f566
Flesh out a couple of the items in the README
...
llvm-svn: 25928
2006-02-03 05:17:06 +00:00
Jeff Cohen
e2f56a56f6
Fix VC++ compilation error caused by using a std::map iterator variable to receive
...
a std::multimap iterator value. For some reason, GCC doesn't have a problem with this.
llvm-svn: 25927
2006-02-03 03:48:54 +00:00
Chris Lattner
9ca1b98733
Remove move copies and dead stuff by not clobbering the result reg of a noop copy.
...
llvm-svn: 25926
2006-02-03 03:16:14 +00:00
Andrew Lenharth
c879542ab0
isStoreToStackSlot
...
llvm-svn: 25925
2006-02-03 03:07:37 +00:00
Chris Lattner
8e4e3207fe
Simplify some code
...
llvm-svn: 25924
2006-02-03 03:06:49 +00:00