Jim Laskey
25993e18e6
Use exception flag.
...
llvm-svn: 34496
2007-02-22 16:22:15 +00:00
Jim Laskey
8ddfb7141b
Revert changes for a simplier solution.
...
llvm-svn: 34495
2007-02-22 16:21:18 +00:00
Jim Laskey
4990356454
Remove assertion.
...
llvm-svn: 34494
2007-02-22 16:12:17 +00:00
Jim Laskey
f6f24530c0
Tighten up error checking of args.
...
llvm-svn: 34493
2007-02-22 16:10:05 +00:00
Jim Laskey
dccc6d3a82
Handle lowering invoke to call correctly.
...
llvm-svn: 34492
2007-02-22 15:38:06 +00:00
Jim Laskey
655bea55fe
Simplify lowering and selection of exception ops.
...
llvm-svn: 34491
2007-02-22 15:37:19 +00:00
Andrew Lenharth
72869dad9c
missed cast elimination
...
llvm-svn: 34490
2007-02-22 15:17:45 +00:00
Jim Laskey
b57ee1fc37
Simplify lowering and selection of exception ops.
...
llvm-svn: 34488
2007-02-22 14:56:36 +00:00
Devang Patel
aabb87cffe
Add Loop Pass Manager.
...
llvm-svn: 34487
2007-02-22 08:56:17 +00:00
Chris Lattner
0dd2c9452c
clarify llvm-gcc GPL issue
...
llvm-svn: 34486
2007-02-22 06:33:23 +00:00
Reid Spencer
cbff120eeb
When converting from 64 to 32-bits, use the actual number of words to
...
extract the value, not the number of words implied by the active bits.
This fixes numerous, but not all divide bugs.
llvm-svn: 34484
2007-02-22 00:58:45 +00:00
Reid Spencer
d51b03d452
Fix countLeadingZeros in the case that the bitwidth evenly divides the
...
word size. This fixes all reads of uninitialized data (buffer over read)
and makes APInt.cpp memory clean, per valgrind. The only remaining
problem is division in a few cases.
llvm-svn: 34483
2007-02-22 00:22:00 +00:00
Jim Laskey
6a937ad320
Support to provide exception and selector registers.
...
llvm-svn: 34482
2007-02-21 22:54:50 +00:00
Jim Laskey
58eaac9160
Selection and lowering for exception handling.
...
llvm-svn: 34481
2007-02-21 22:53:45 +00:00
Jim Laskey
2bbd4312c0
Itanium ABI exception handing support.
...
llvm-svn: 34480
2007-02-21 22:49:50 +00:00
Jim Laskey
a5ee0bbf17
Exception handling support.
...
llvm-svn: 34479
2007-02-21 22:48:45 +00:00
Jim Laskey
bce43df323
Add support for changes in DwarfWriter.
...
llvm-svn: 34478
2007-02-21 22:47:38 +00:00
Jim Laskey
d1e09aa74a
Add TAI field for exception table section.
...
llvm-svn: 34477
2007-02-21 22:43:40 +00:00
Jim Laskey
b56b6a7042
Make branch folding behave in the presence of landing pads.
...
llvm-svn: 34476
2007-02-21 22:42:20 +00:00
Jim Laskey
1ac1a19f01
Allow for live in registers for eh landing pads.
...
llvm-svn: 34475
2007-02-21 22:41:17 +00:00
Jim Laskey
8fdff03f2b
Add a flag to MBBs to indicate whether it is an eh landing pad.
...
llvm-svn: 34474
2007-02-21 22:39:52 +00:00
Jim Laskey
534bc5a9a3
Add structures used for collecting eh information.
...
llvm-svn: 34473
2007-02-21 22:38:31 +00:00
Jim Laskey
013a72ffd4
Add new instructions for handling data passed into eh landing pad.
...
llvm-svn: 34472
2007-02-21 22:37:22 +00:00
Jim Laskey
c13cc1eac7
Add new intrinsics for eh support.
...
llvm-svn: 34471
2007-02-21 22:35:57 +00:00
Evan Cheng
0e7be3c4e0
ELF / PIC requires GOT be in the EBX register during calls via PLT GOT pointer.
...
Add implicit uses of EBX to calls to ensure liveintervalanalysis does not treat
the GOT in EBX move as dead upon definition.
This should fix PR1207.
llvm-svn: 34470
2007-02-21 21:18:14 +00:00
Devang Patel
ee1da8a703
Simplify
...
llvm-svn: 34469
2007-02-21 19:57:33 +00:00
Reid Spencer
df5fe8163d
Reorganize some code to make it clearer, avoid a few uninitialized memory
...
reads, and reduce the number of temporary APInt instances we construct.
llvm-svn: 34467
2007-02-21 08:21:52 +00:00
Chris Lattner
b8a9b86473
revert r1.68. This breaks 'make install' without doing 'make' first, but
...
fixes PR1208.
llvm-svn: 34466
2007-02-21 06:23:20 +00:00
Reid Spencer
95874f6bc9
Fix the carry in addition.
...
llvm-svn: 34465
2007-02-21 05:44:56 +00:00
Reid Spencer
807eadb51a
Add a dump() method for debugging.
...
llvm-svn: 34464
2007-02-21 03:56:12 +00:00
Reid Spencer
c4662ad089
1. Add a dump() method for faster debugging.
...
2. Change 0 initialization of union to larger component so all is zeroed.
3. Fix the borrow logic in subtraction so it works for > 128 bits.
4. Rewrite fromString to use a simpler but correct algorithm and also to
not set the bit width contrary to the user's request.
5. Optimize toString a bit by making it only do one Knuth divide per
iteration instead of two.
With these changes, all arithmetic passes (verified by pari/GP) up to
1024 bits except for certain division cases.
llvm-svn: 34463
2007-02-21 03:55:44 +00:00
Devang Patel
96f62d7c95
Fix memory leak (PR 775).
...
llvm-svn: 34462
2007-02-21 02:36:31 +00:00
Evan Cheng
517ca88cdd
Out of bound reference.
...
llvm-svn: 34461
2007-02-21 02:27:39 +00:00
Evan Cheng
0003c692cc
Use BitVector instead. No functionality change.
...
llvm-svn: 34460
2007-02-21 02:22:03 +00:00
Reid Spencer
1fbf856864
Fix countLeadingZeros to actually return the correct number.
...
Fix toString to correctly return "0" for zero valued APInts over 128 bits.
llvm-svn: 34459
2007-02-21 00:29:48 +00:00
Reid Spencer
17d47c5062
Make long addition and subtraction work. Speed things up by using internal
...
functions more.
llvm-svn: 34458
2007-02-20 23:40:25 +00:00
Evan Cheng
0af52bec6b
This cast broke lots of tests.
...
llvm-svn: 34457
2007-02-20 21:30:56 +00:00
Dan Gohman
e24135a647
Fix typos in comments.
...
llvm-svn: 34456
2007-02-20 20:52:03 +00:00
Reid Spencer
b27fcd8cb6
Clean up variable names in operator*.
...
Attempt #3 for getting a portable INFINITY value.
llvm-svn: 34454
2007-02-20 20:42:10 +00:00
Reid Spencer
4caebb1af8
Use INFINITY macro from math.h instead of constructing hex floating point
...
constants (avoids warnings).
llvm-svn: 34452
2007-02-20 18:29:12 +00:00
Reid Spencer
80b41ab5f7
First version that can process arith.cpp test case up to 1024 bits:
...
1. Ensure pVal is set to 0 in each constructor.
2. Fix roundToDouble to make correct calculations and not read beyond the
end of allocated memory.
3. Implement Knuth's "classical algorithm" for division from scratch and
eliminate buffer overflows and uninitialized mememory reads. Document
it properly too.
4. Implement a wrapper function for KnuthDiv which handles the 64-bit to
32-bit conversion and back. It also implement short division for the
n == 1 case that Knuth's algorithm can't handle.
5. Simplify the logic of udiv and urem a little, make them exit early, and
have them use the "divide" wrapper function to perform the division
or remainder operation.
6. Move the toString function to the end of the file, closer to where
the division functions are located.
Note: division is still broken for some > 64 bit values, but at least it
doesn't crash any more.
llvm-svn: 34449
2007-02-20 08:51:03 +00:00
Reid Spencer
2e50b9ed5b
Add an internal convenience method for division that urem and udiv use.
...
llvm-svn: 34448
2007-02-20 08:43:42 +00:00
Chris Lattner
b6ddd260ec
eliminate some dead friends.
...
llvm-svn: 34447
2007-02-20 07:18:01 +00:00
Chris Lattner
be8f4becf4
switch ConstantFP's from ValueMap to DenseMap, which is much faster to query
...
and is more memory efficient.
llvm-svn: 34446
2007-02-20 07:17:17 +00:00
Chris Lattner
37a49eb48d
cleanup ConstantInt to use a single DenseMap for uniquing instead of the
...
heavy-weight ValueMap class. This reduces mem usage bc reading kc++ by 29K,
even though it only creates 2955 constant ints!
llvm-svn: 34445
2007-02-20 06:39:57 +00:00
Chris Lattner
b22fb7fc60
Not all managedstatics need object pointers.
...
llvm-svn: 34444
2007-02-20 06:18:57 +00:00
Chris Lattner
adb16a1a53
Make ConstantInt::getTrue/getFalse be llvm_shutdown safe.
...
llvm-svn: 34443
2007-02-20 06:11:36 +00:00
Chris Lattner
08e1470365
add a way to register an arbitrary cleanup function.
...
llvm-svn: 34442
2007-02-20 06:08:37 +00:00
Chris Lattner
c8db23f8a7
Clean up the internals of the ConstantInt machinery
...
llvm-svn: 34441
2007-02-20 05:55:46 +00:00
Chris Lattner
26dc9c9dc8
simplify some code that was not llvm_shutdown safe
...
llvm-svn: 34440
2007-02-20 05:46:39 +00:00