Reid Spencer
a4ab1c36d2
Fix clearUnusedBits to not depend on "undefined behavior" of >> operator
...
when the bit size is equal to the word size. This happens to work out okay
on x86, but might not on other platforms. The change just detects when
there are no bits to clear (because BitWidth is a multiple of the word size)
and returns early.
Also, move some comments from .cpp file into header.
llvm-svn: 34602
2007-02-25 19:26:01 +00:00
Chris Lattner
b5ce97a83a
one important bugfix: PPC32 didn't have both elf and macho support for
...
external symbols and global addresses. Add the missing ones.
one important workaround: PPCISD::CALL is matched by both PPCcall_ELF
and PPCcall_Macho, disable the _ELF patterns for now.
llvm-svn: 34601
2007-02-25 19:20:53 +00:00
Chris Lattner
05de718ae8
add -enable-eh
...
llvm-svn: 34600
2007-02-25 18:50:48 +00:00
Chris Lattner
a9c561b9e6
optimize duplicate ValueMap lookups
...
llvm-svn: 34599
2007-02-25 18:40:32 +00:00
Dale Johannesen
f6f34ec2e0
cosmetic changes from review of last patch. obvious
...
llvm-svn: 34598
2007-02-25 18:31:31 +00:00
Evan Cheng
550798e5d5
A couple of more places where a register liveness has been extended and its last kill should be updated accordingly.
...
llvm-svn: 34597
2007-02-25 09:51:27 +00:00
Evan Cheng
13e48f975c
Add an assertion.
...
llvm-svn: 34596
2007-02-25 09:47:31 +00:00
Evan Cheng
189678c421
Fix a couple of bugs related IsDead back propagation during coalescing.
...
llvm-svn: 34595
2007-02-25 09:46:31 +00:00
Evan Cheng
8f3e6bfeb3
If the liveinterval of the source instruction has been extended, remove the IsKill marker.
...
llvm-svn: 34594
2007-02-25 09:41:59 +00:00
Evan Cheng
9968353d64
Only add liveinterval to livein set if it isn't assigned a stack slot.
...
llvm-svn: 34593
2007-02-25 09:39:02 +00:00
Chris Lattner
65ba08d627
fastcc functions that return double values now return them in xmm0 on x86-32.
...
This implements CodeGen/X86/fp-stack-ret.ll:test[23]
llvm-svn: 34592
2007-02-25 09:31:16 +00:00
Chris Lattner
200d389a17
verify that double is returned in XMM0 if the function is fastcc.
...
llvm-svn: 34591
2007-02-25 09:30:03 +00:00
Chris Lattner
e4ba88824d
allow vectors to be passed to stdcall/fastcall functions
...
llvm-svn: 34590
2007-02-25 09:14:25 +00:00
Chris Lattner
fac0b30da0
move LowerRET into the 'Return Value Calling Convention Implementation'
...
section of the file.
llvm-svn: 34589
2007-02-25 09:12:39 +00:00
Chris Lattner
65d915a3b6
make all Lower*CallTo implementations use LowerCallResult to handle their
...
result value stuff. This eliminates a bunch of duplicated code and now
GetRetValueLocs is the sole place that decides where a value is returned.
llvm-svn: 34588
2007-02-25 09:10:05 +00:00
Chris Lattner
423224a7b4
pass the calling convention into Lower*CallTo, instead of using ad-hoc flags.
...
llvm-svn: 34587
2007-02-25 09:06:15 +00:00
Chris Lattner
8fa75c3ae8
factor a bunch of code out of LowerCCCCallTo into a new LowerCallResult
...
function. This function now uses GetRetValueLocs to determine *where*
the result values are located and concerns itself with *how* to pull the
values out.
llvm-svn: 34586
2007-02-25 08:59:22 +00:00
Chris Lattner
3bfbc23ccd
move some code around, pass in calling conv, even though it is unused
...
llvm-svn: 34585
2007-02-25 08:29:00 +00:00
Chris Lattner
e9c4c19b27
fold trivial token factor nodes. This allows us to compile
...
test/CodeGen/X86/fp-stack-ret.ll into:
movl 4(%esp), %eax
fldl (%eax)
ret
instead of:
subl $12, %esp
movl 16(%esp), %eax
movsd (%eax), %xmm0
movsd %xmm0, (%esp)
fldl (%esp)
addl $12, %esp
ret
by eliminating a token factor that blocked a check.
llvm-svn: 34584
2007-02-25 08:24:27 +00:00
Chris Lattner
b71ec8d1cf
new testcase
...
llvm-svn: 34583
2007-02-25 08:23:01 +00:00
Chris Lattner
f119813ff4
simplify result value lowering by splitting the selection of *where* to return
...
registers out from the logic of *how* to return them.
This changes X86-64 to mark EAX live out when returning a 32-bit value,
where before it marked RAX liveout.
llvm-svn: 34582
2007-02-25 08:15:11 +00:00
Reid Spencer
ec6159bbea
Allow this to compile now that the header file is checked in.
...
llvm-svn: 34581
2007-02-25 07:30:14 +00:00
Reid Spencer
e7d8a0e3b7
Add a private constructor for efficiency.
...
llvm-svn: 34580
2007-02-25 07:29:03 +00:00
Chris Lattner
bcce79717b
make void-return not a special case
...
llvm-svn: 34579
2007-02-25 07:18:38 +00:00
Chris Lattner
d00fcb3277
eliminate a bunch more temporary vectors from X86 lowering.
...
llvm-svn: 34578
2007-02-25 07:10:00 +00:00
Chris Lattner
f7eeef816d
eliminate temporary vectors created during X86 lowering.
...
llvm-svn: 34577
2007-02-25 06:40:16 +00:00
Chris Lattner
6f25082e67
remove std::vector's in RET lowering.
...
llvm-svn: 34576
2007-02-25 06:21:57 +00:00
Chris Lattner
a38cc935a9
verify i128 return on x86-64 continues to codegen optimally.
...
llvm-svn: 34575
2007-02-25 06:06:49 +00:00
Chris Lattner
041fb5bc67
implement support for the linux/ppc function call ABI. Patch by
...
Nicolas Geoffray!
llvm-svn: 34574
2007-02-25 05:34:32 +00:00
Chris Lattner
ed4920842f
Add XLForm_1_ext template, patch by Nicolas Geoffray.
...
llvm-svn: 34573
2007-02-25 05:07:49 +00:00
Chris Lattner
42cfb7c452
Improve JIT support for linux/ppc: Patch by Nicolas Geoffray!
...
llvm-svn: 34572
2007-02-25 05:04:13 +00:00
Chris Lattner
5adebeb207
this doesn't compile, disable it
...
llvm-svn: 34571
2007-02-25 02:32:44 +00:00
Chris Lattner
18388d5d40
remove these.
...
llvm-svn: 34570
2007-02-25 02:28:21 +00:00
Reid Spencer
0fd90c3447
Clean up lshr and ashr to coding standards.
...
Handle the single word cases for shiftAmt == BitWidth.
llvm-svn: 34569
2007-02-25 01:56:07 +00:00
Dale Johannesen
6e366a1006
remove crediting of Evan Cheng and me.
...
llvm-svn: 34568
2007-02-25 01:42:36 +00:00
Chris Lattner
b9f2992e38
initialize a instance variable
...
llvm-svn: 34567
2007-02-25 01:28:05 +00:00
Chris Lattner
7aa773f8f0
update this for llvm-gcc4
...
llvm-svn: 34566
2007-02-25 01:11:36 +00:00
Reid Spencer
66e162cfcd
Whoops, last word with bits in large shift left wasn't correct.
...
llvm-svn: 34565
2007-02-25 01:08:58 +00:00
Reid Spencer
4dcbccdc99
Fix the > 64 bits case for left shift.
...
llvm-svn: 34564
2007-02-25 00:56:44 +00:00
Dale Johannesen
ccecc12da5
Removed WaterListOffset, inserted BBOffsets. Remove TODO item about this
...
from README.
When no water available, use end of block if in range. (More to do here.)
llvm-svn: 34563
2007-02-25 00:47:03 +00:00
Reid Spencer
ecc067a698
Fix the remainder shifting in KnuthDiv.
...
llvm-svn: 34562
2007-02-24 20:38:01 +00:00
Reid Spencer
d6956a0e8c
1. Fix a bug in fromString for the <= 64bits case
...
2. Fix shl when shiftAmount == BitWidth.
llvm-svn: 34560
2007-02-24 20:19:37 +00:00
Reid Spencer
e2bb0cf83e
1. Fix last bug in KnuthDiv. All divide tests pass up to 1024 bits now.
...
2. Clean up comments, style, coding standards, etc.
3. Simplify a constructor.
Extended testing revealed some additional bugs in shifting. I'll fix these
tomorrow.
llvm-svn: 34559
2007-02-24 10:01:42 +00:00
Reid Spencer
a2a4a55915
Improve documentation.
...
Make divide function internal (it was briefly external for testing).
llvm-svn: 34557
2007-02-24 09:50:13 +00:00
Jim Laskey
53e71a9657
Deal with cases when MMI is not requested.
...
llvm-svn: 34556
2007-02-24 09:45:44 +00:00
Jim Laskey
10c6c6b46d
Drop unused operand.
...
llvm-svn: 34555
2007-02-24 09:44:17 +00:00
Reid Spencer
b45646b14e
1. Make internal functions take const arguments where they should, just
...
to be safe.
2. Make internal functions that return a carry/borrow return bool instead
of uint64_t because the carry/borrow can only be in range [0,1].
3. Assert that the pointers to KnuthDiv are all different so that the
result and operands can't overlap.
4. Add debug output to KnuthDiv function.
5. Fix a problem with KnuthDiv by separating the b's complement operation
from the subtraction borrow operation. This fixes a wide range of
division problems, but alas, not all of them.
llvm-svn: 34554
2007-02-24 03:58:46 +00:00
Bill Wendling
e4ae26c339
Added some more information on how to use "delta" to reduce testcases.
...
llvm-svn: 34553
2007-02-24 03:46:42 +00:00
Chris Lattner
28f1c620c6
Fix PR1216 by cleaning up the ownership of JITResolver.
...
llvm-svn: 34552
2007-02-24 02:57:03 +00:00
Chris Lattner
6faf9e8e97
Fix CodeGen/Generic/2007-02-23-DAGCombine-Miscompile.ll and PR1219
...
llvm-svn: 34551
2007-02-24 02:09:29 +00:00