Chris Lattner
1af7b8451e
new testcase
...
llvm-svn: 36243
2007-04-18 03:04:37 +00:00
Chris Lattner
15c1b820cc
fix a pasto
...
llvm-svn: 36242
2007-04-18 03:01:40 +00:00
Evan Cheng
9fcce44e7f
New crasher test case.
...
llvm-svn: 36241
2007-04-18 02:35:10 +00:00
Evan Cheng
b408e8f11d
Don't populate TryAgainList when coalescing only physical registers with virtual registers.
...
llvm-svn: 36240
2007-04-18 02:30:19 +00:00
Devang Patel
883ff07672
Cache DT[*SI] lookup.
...
llvm-svn: 36239
2007-04-18 01:19:55 +00:00
Chris Lattner
82738fe254
don't access argument list of prototypes
...
llvm-svn: 36238
2007-04-18 00:57:22 +00:00
Devang Patel
5976db0103
Fix
...
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070416/047971.html
llvm-svn: 36236
2007-04-18 00:53:01 +00:00
Devang Patel
da48b7dcce
New test.
...
llvm-svn: 36235
2007-04-18 00:51:43 +00:00
Chris Lattner
0d7265650d
what's an & between friends?
...
llvm-svn: 36234
2007-04-18 00:43:05 +00:00
Evan Cheng
a5a0c7c909
Increment use count of new virtuals created during PHI elimination.
...
llvm-svn: 36233
2007-04-18 00:36:11 +00:00
Chris Lattner
135a077c93
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
4fe9eb5052
new testcase
...
llvm-svn: 36230
2007-04-17 23:43:31 +00:00
Evan Cheng
5118226c6c
Oops. Didn't mean to check in a quick hack.
...
llvm-svn: 36227
2007-04-17 23:33:39 +00:00
Chris Lattner
4aff52bf3d
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
598bc0d9a3
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
9a861a8550
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
0a8d14ce67
new testcase
...
llvm-svn: 36220
2007-04-17 21:12:26 +00:00
Duncan Sands
1ff58a45ae
Use // not ; since this is C.
...
llvm-svn: 36219
2007-04-17 20:50:33 +00:00
Evan Cheng
b881bdabd9
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
a9cde02ee3
New test case.
...
llvm-svn: 36217
2007-04-17 20:29:12 +00:00
Evan Cheng
57b5214d59
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
2f45bf31c5
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
8387cf1100
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
9b91d98a30
Add comment
...
llvm-svn: 36213
2007-04-17 19:34:00 +00:00
Chris Lattner
9ad5915559
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
2a4054bddb
new testcase
...
llvm-svn: 36211
2007-04-17 19:03:02 +00:00
Chris Lattner
51109b7830
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
ceb4b20807
make getnext/getprev accessors private.
...
llvm-svn: 36209
2007-04-17 18:30:41 +00:00
Dan Gohman
2ce1116b33
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
4a1e0b8c3e
make next/prev accessors private
...
llvm-svn: 36207
2007-04-17 18:16:39 +00:00
Chris Lattner
d1721d2e50
bool on darwin/ppc is 4 bytes.
...
llvm-svn: 36206
2007-04-17 18:15:04 +00:00
Chris Lattner
233f97ac6a
remove use of BasicBlock::getNext
...
llvm-svn: 36205
2007-04-17 18:09:47 +00:00
Chris Lattner
b0aebc208c
Instruction:: Next/Prev accessors are now private
...
llvm-svn: 36204
2007-04-17 18:03:55 +00:00
Chris Lattner
2509d7547d
add a note
...
llvm-svn: 36203
2007-04-17 18:03:00 +00:00
Chris Lattner
24e2d9ca03
remove use of BasicBlock::getNext
...
llvm-svn: 36202
2007-04-17 17:54:12 +00:00
Chris Lattner
672db8eab5
Remove use of Instruction::getNext
...
llvm-svn: 36201
2007-04-17 17:52:45 +00:00
Chris Lattner
cd9bda71a0
eliminate use of Instruction::getNext()
...
llvm-svn: 36200
2007-04-17 17:51:03 +00:00
Chris Lattner
77a3edcb92
remove use of Instruction::getNext
...
llvm-svn: 36199
2007-04-17 17:47:54 +00:00
Chris Lattner
d9b7511928
eliminate use of Instruction::getPrev(). Patch by Gabor Greif in 2005.
...
llvm-svn: 36198
2007-04-17 17:38:28 +00:00
Chris Lattner
da1ed8de79
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
ff0598de75
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
8b7aab009e
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
8e84687350
Make it work on 64-bit systems.
...
llvm-svn: 36194
2007-04-17 05:48:35 +00:00
Jeff Cohen
38be56ddf5
Fix build breakage on 64-bit systems.
...
llvm-svn: 36193
2007-04-17 05:33:04 +00:00
Chris Lattner
3c2ff10b93
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
2077814c91
Use this nifty Constraints thing and fix the inverted conditional moves
...
llvm-svn: 36191
2007-04-17 04:07:59 +00:00
Andrew Lenharth
fb40bd5654
this is fixed
...
llvm-svn: 36190
2007-04-17 04:07:27 +00:00
Chris Lattner
422cfcdcb3
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
b47aa543bb
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
0ed36f4078
urr, yeah.
...
llvm-svn: 36187
2007-04-17 02:04:39 +00:00