Chris Lattner
2411bc5af8
what's an & between friends?
...
llvm-svn: 36234
2007-04-18 00:43:05 +00:00
Evan Cheng
eecfac47a8
Increment use count of new virtuals created during PHI elimination.
...
llvm-svn: 36233
2007-04-18 00:36:11 +00:00
Chris Lattner
af290edea7
Be more careful when inserting reused instructions. This fixes CodeGen/Generic/2007-04-17-lsr-crash.ll
...
llvm-svn: 36231
2007-04-17 23:43:50 +00:00
Chris Lattner
14205a32d2
new testcase
...
llvm-svn: 36230
2007-04-17 23:43:31 +00:00
Evan Cheng
fe5856c4f3
Oops. Didn't mean to check in a quick hack.
...
llvm-svn: 36227
2007-04-17 23:33:39 +00:00
Chris Lattner
1677782ef0
Fix a bug in my previous patch, grabbing the shift amount width from the
...
wrong operand.
llvm-svn: 36223
2007-04-17 22:53:02 +00:00
Chris Lattner
87296c2580
dag combiner just got better at pruning bits. This fixes CodeGen/ARM/rev.ll
...
llvm-svn: 36222
2007-04-17 22:39:58 +00:00
Chris Lattner
b55496c660
Fold (x << c1)>> c2 into a single shift if the bits shifted out aren't used.
...
This compiles:
int baz(long long a) { return (short)(((int)(a >>24)) >> 9); }
into:
_baz:
srwi r2, r3, 1
extsh r3, r2
blr
on PPC, instead of:
_baz:
slwi r2, r3, 8
srwi r2, r2, 9
extsh r3, r2
blr
GCC produces:
_baz:
srwi r10,r4,24
insrwi r10,r3,24,0
srawi r9,r3,24
srawi r3,r10,9
extsh r3,r3
blr
This implements CodeGen/PowerPC/shl_elim.ll
llvm-svn: 36221
2007-04-17 21:14:16 +00:00
Chris Lattner
c09249e3ba
new testcase
...
llvm-svn: 36220
2007-04-17 21:12:26 +00:00
Duncan Sands
205a49abb3
Use // not ; since this is C.
...
llvm-svn: 36219
2007-04-17 20:50:33 +00:00
Evan Cheng
48352d7a71
Copy coalescing change to prevent a physical register from being pin to a
...
long live interval that has low usage density.
1. Change order of coalescing to join physical registers with virtual
registers first before virtual register intervals become too long.
2. Check size and usage density to determine if it's worthwhile to join.
3. If joining is aborted, assign virtual register live interval allocation
preference field to the physical register.
4. Register allocator should try to allocate to the preferred register
first (if available) to create identify moves that can be eliminated.
llvm-svn: 36218
2007-04-17 20:32:26 +00:00
Devang Patel
e91576f1fd
New test case.
...
llvm-svn: 36217
2007-04-17 20:29:12 +00:00
Evan Cheng
c5d2df366a
Add a register allocation preference field; add a method to compute size of a live interval.
...
llvm-svn: 36216
2007-04-17 20:25:11 +00:00
Evan Cheng
023342b277
Change getAllocatableSet() so it returns allocatable registers for a specific register class.
...
llvm-svn: 36215
2007-04-17 20:23:34 +00:00
Evan Cheng
94e0223e55
Keep track of number of uses within the function per virtual register.
...
llvm-svn: 36214
2007-04-17 20:22:11 +00:00
Anton Korobeynikov
60de2ce283
Add comment
...
llvm-svn: 36213
2007-04-17 19:34:00 +00:00
Chris Lattner
9ad682ad80
SIGN_EXTEND_INREG does not demand its top bits. Give SimplifyDemandedBits
...
a chance to hack on it. This compiles:
int baz(long long a) { return (short)(((int)(a >>24)) >> 9); }
into:
_baz:
slwi r2, r3, 8
srwi r2, r2, 9
extsh r3, r2
blr
instead of:
_baz:
srwi r2, r4, 24
rlwimi r2, r3, 8, 0, 23
srwi r2, r2, 9
extsh r3, r2
blr
This implements CodeGen/PowerPC/sign_ext_inreg1.ll
llvm-svn: 36212
2007-04-17 19:03:21 +00:00
Chris Lattner
12ffa2d85a
new testcase
...
llvm-svn: 36211
2007-04-17 19:03:02 +00:00
Chris Lattner
4a83860eea
Commit an patch from Gabor Greif in Mar 2005. This eliminates the tail
...
pointer from ilist, storing it in the prev pointer of the first node in the
list instead.
This shrinks ilist from 8 to 4 bytes, BasicBlock from 40->36 bytes, Function
from 76->68 bytes, Module from 52->44 bytes.
llvm-svn: 36210
2007-04-17 18:41:42 +00:00
Chris Lattner
77b13b351b
make getnext/getprev accessors private.
...
llvm-svn: 36209
2007-04-17 18:30:41 +00:00
Dan Gohman
a7e1f3c85b
Spell doFinalization right, so that it is a proper virtual override and
...
gets called.
llvm-svn: 36208
2007-04-17 18:21:36 +00:00
Chris Lattner
3bc0ec8776
make next/prev accessors private
...
llvm-svn: 36207
2007-04-17 18:16:39 +00:00
Chris Lattner
23ea4ce93b
bool on darwin/ppc is 4 bytes.
...
llvm-svn: 36206
2007-04-17 18:15:04 +00:00
Chris Lattner
8e28e7654d
remove use of BasicBlock::getNext
...
llvm-svn: 36205
2007-04-17 18:09:47 +00:00
Chris Lattner
917d8832a1
Instruction:: Next/Prev accessors are now private
...
llvm-svn: 36204
2007-04-17 18:03:55 +00:00
Chris Lattner
af5c203dbd
add a note
...
llvm-svn: 36203
2007-04-17 18:03:00 +00:00
Chris Lattner
d503b61318
remove use of BasicBlock::getNext
...
llvm-svn: 36202
2007-04-17 17:54:12 +00:00
Chris Lattner
e4323f863a
Remove use of Instruction::getNext
...
llvm-svn: 36201
2007-04-17 17:52:45 +00:00
Chris Lattner
e5d747e0be
eliminate use of Instruction::getNext()
...
llvm-svn: 36200
2007-04-17 17:51:03 +00:00
Chris Lattner
7b6a5d7956
remove use of Instruction::getNext
...
llvm-svn: 36199
2007-04-17 17:47:54 +00:00
Chris Lattner
058a0c6977
eliminate use of Instruction::getPrev(). Patch by Gabor Greif in 2005.
...
llvm-svn: 36198
2007-04-17 17:38:28 +00:00
Chris Lattner
09139c7951
eliminate a use of Instruction::getPrev(), patch by Gabor Greif in 2005.
...
llvm-svn: 36197
2007-04-17 17:36:12 +00:00
Chris Lattner
c7109ece27
rename X86FunctionInfo to X86MachineFunctionInfo to match the header file
...
it is defined in.
llvm-svn: 36196
2007-04-17 17:21:52 +00:00
Anton Korobeynikov
9bc4b792bf
Implemented correct stack probing on mingw/cygwin for dynamic alloca's.
...
Also, fixed static case in presence of eax livin. This fixes PR331
PS: Why don't we still have push/pop instructions? :)
llvm-svn: 36195
2007-04-17 09:20:00 +00:00
Jeff Cohen
92a09fc556
Make it work on 64-bit systems.
...
llvm-svn: 36194
2007-04-17 05:48:35 +00:00
Jeff Cohen
5780312029
Fix build breakage on 64-bit systems.
...
llvm-svn: 36193
2007-04-17 05:33:04 +00:00
Chris Lattner
db7de8e497
merge several fields in GlobalValue to use the same word, move CallingConv
...
field into SubclassData in Value. This shrinks GlobalVAlue from 48->40
bytes, Function from 88->76, and GlobalVariable from 76->68. This trims
4640 bytes off my testcase, reading a bc file without materializing any
functions.
llvm-svn: 36192
2007-04-17 04:31:29 +00:00
Andrew Lenharth
c894d4e3ce
Use this nifty Constraints thing and fix the inverted conditional moves
...
llvm-svn: 36191
2007-04-17 04:07:59 +00:00
Andrew Lenharth
38746c38c6
this is fixed
...
llvm-svn: 36190
2007-04-17 04:07:27 +00:00
Chris Lattner
cc56e116fe
The (negative) offset from a SymbolTableListTraits-using ilist to its container
...
object is always constant. As such, evaluate it at compile time instead of storing
it as an ivar in SymbolTableListTraits. This shrinks every SymbolTableListTraits
ilist by a word, shrinking BasicBlock from 44->40 bytes, Function from 96->88 bytes,
and Module from 60->52 bytes.
llvm-svn: 36189
2007-04-17 04:04:14 +00:00
Chris Lattner
71a21677f4
Refactor SymbolTableListTraits to only have a single pointer in it, instead
...
of two. This shrinkifies Function by 8 bytes (104->96) and Module by 8
bytes (68->60). On a testcase of mine, this reduces the memory used to
read a module header from 565680b to 561024, a little over 4K.
llvm-svn: 36188
2007-04-17 03:26:42 +00:00
Chris Lattner
3c118ffaf7
urr, yeah.
...
llvm-svn: 36187
2007-04-17 02:04:39 +00:00
Devang Patel
54aa295162
Remove "ModulePasses requiring FunctionPasses" from the list of future
...
extensions.
llvm-svn: 36186
2007-04-17 00:17:11 +00:00
Chris Lattner
be225f5300
SSE4 is apparently public now.
...
llvm-svn: 36185
2007-04-17 00:02:37 +00:00
Devang Patel
ca917ef212
Add PR number for reference.
...
llvm-svn: 36184
2007-04-16 23:52:37 +00:00
Reid Spencer
67ab398ba3
Make long line fit in 80 cols.
...
llvm-svn: 36183
2007-04-16 23:32:28 +00:00
Devang Patel
7d868316fd
Fix
...
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070416/047888.html
llvm-svn: 36182
2007-04-16 23:03:45 +00:00
Devang Patel
e155e1ef8c
New test case.
...
llvm-svn: 36181
2007-04-16 23:02:22 +00:00
Reid Spencer
b640dc70f9
Fix problems in the PartSet lowering having to do with incorrect bit width.
...
llvm-svn: 36180
2007-04-16 22:21:14 +00:00
Reid Spencer
226017813d
Regenerate
...
llvm-svn: 36179
2007-04-16 22:02:23 +00:00