Commit Graph

31724 Commits

Author SHA1 Message Date
Jim Laskey
4b37a4c712 Selection and lowering for exception handling.
llvm-svn: 34481
2007-02-21 22:53:45 +00:00
Jim Laskey
e4ccf22c34 Itanium ABI exception handing support.
llvm-svn: 34480
2007-02-21 22:49:50 +00:00
Jim Laskey
09953e6482 Exception handling support.
llvm-svn: 34479
2007-02-21 22:48:45 +00:00
Jim Laskey
18fc09723c Add support for changes in DwarfWriter.
llvm-svn: 34478
2007-02-21 22:47:38 +00:00
Jim Laskey
af76e0e58f Add TAI field for exception table section.
llvm-svn: 34477
2007-02-21 22:43:40 +00:00
Jim Laskey
2dc5245c4a Make branch folding behave in the presence of landing pads.
llvm-svn: 34476
2007-02-21 22:42:20 +00:00
Jim Laskey
5b2b7c1024 Allow for live in registers for eh landing pads.
llvm-svn: 34475
2007-02-21 22:41:17 +00:00
Jim Laskey
dbe2491c44 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
88dd2fd332 Add structures used for collecting eh information.
llvm-svn: 34473
2007-02-21 22:38:31 +00:00
Jim Laskey
e0c549eeef Add new instructions for handling data passed into eh landing pad.
llvm-svn: 34472
2007-02-21 22:37:22 +00:00
Jim Laskey
303fa60b61 Add new intrinsics for eh support.
llvm-svn: 34471
2007-02-21 22:35:57 +00:00
Evan Cheng
84a041eb98 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
a673b600c8 Simplify
llvm-svn: 34469
2007-02-21 19:57:33 +00:00
Reid Spencer
58a6a43cb3 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
31f99b9b45 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
db2abec8ac Fix the carry in addition.
llvm-svn: 34465
2007-02-21 05:44:56 +00:00
Reid Spencer
4f44f5e8ac Add a dump() method for debugging.
llvm-svn: 34464
2007-02-21 03:56:12 +00:00
Reid Spencer
1ba833564e 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
57bc4d1bc2 Fix memory leak (PR 775).
llvm-svn: 34462
2007-02-21 02:36:31 +00:00
Evan Cheng
e563c7eb27 Out of bound reference.
llvm-svn: 34461
2007-02-21 02:27:39 +00:00
Evan Cheng
de037a821a Use BitVector instead. No functionality change.
llvm-svn: 34460
2007-02-21 02:22:03 +00:00
Reid Spencer
74cf82e522 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
7a6a8d5116 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
71b8723f07 This cast broke lots of tests.
llvm-svn: 34457
2007-02-20 21:30:56 +00:00
Dan Gohman
8c8597c4d9 Fix typos in comments.
llvm-svn: 34456
2007-02-20 20:52:03 +00:00
Reid Spencer
4bb430c4b4 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
a83af6e1fc 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
fb77b2ba13 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
1bed091776 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
2db2c526a5 eliminate some dead friends.
llvm-svn: 34447
2007-02-20 07:18:01 +00:00
Chris Lattner
c6ee77d1b0 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
a80bf0b2a6 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
4510c99a57 Not all managedstatics need object pointers.
llvm-svn: 34444
2007-02-20 06:18:57 +00:00
Chris Lattner
281735098a Make ConstantInt::getTrue/getFalse be llvm_shutdown safe.
llvm-svn: 34443
2007-02-20 06:11:36 +00:00
Chris Lattner
94524b335f add a way to register an arbitrary cleanup function.
llvm-svn: 34442
2007-02-20 06:08:37 +00:00
Chris Lattner
5db2f47364 Clean up the internals of the ConstantInt machinery
llvm-svn: 34441
2007-02-20 05:55:46 +00:00
Chris Lattner
dbcb0d3ffe simplify some code that was not llvm_shutdown safe
llvm-svn: 34440
2007-02-20 05:46:39 +00:00
Chris Lattner
c35fe713ff remove reoptimizer-specific passes
llvm-svn: 34439
2007-02-20 05:31:49 +00:00
Chris Lattner
3f9accd62d remove some dead passes and stuff specific to the reoptimizer.
llvm-svn: 34438
2007-02-20 05:31:35 +00:00
Chris Lattner
ffbe511d9e remove some passes
llvm-svn: 34437
2007-02-20 05:31:04 +00:00
Chris Lattner
62b2842b6f remove dead method
llvm-svn: 34436
2007-02-20 05:29:47 +00:00
Evan Cheng
61cd0914ed Dead code.
llvm-svn: 34435
2007-02-20 01:29:10 +00:00
Evan Cheng
b68a774fd9 How the heck did I forget patterns for llvm.x86.sse2.cmp.sd?
llvm-svn: 34434
2007-02-20 00:39:09 +00:00
Reid Spencer
50c723ae72 Add a section on the target datalayout syntax and describe the defaults
and rules used by LLVM to construct the target's layout rules.

llvm-svn: 34433
2007-02-19 23:54:10 +00:00
Reid Spencer
b6d01caf22 Simplify some code by moving variable declarations into the only block that
uses them.

llvm-svn: 34432
2007-02-19 23:30:10 +00:00
Reid Spencer
421bad0dc5 Implement support for non-standard integer bit widths of any size. The
rules alignment is to pick the alignment that corresponds to the smallest
specified alignment that is larger than the bit width of the type or the
largest specified integer alignment if none are larger than the bitwidth
of the type. For the byte size, the size returned is the next larger
multiple of the alignment for that type (using the above rule). This patch
also changes bit widths from "short" to "uint32_t" to ensure there are
enough bits to specify any bit width that LLVM can handle (currently 2^23);
16-bits isn't enough.

llvm-svn: 34431
2007-02-19 22:35:00 +00:00
Evan Cheng
0c99b096c5 Added test case for PR1207.
llvm-svn: 34429
2007-02-19 21:53:59 +00:00
Evan Cheng
f7ed82da10 Re-apply my liveintervalanalysis changes. Now with PR1207 fixes.
llvm-svn: 34428
2007-02-19 21:49:54 +00:00
Evan Cheng
d5cfe7d004 Fix test case.
llvm-svn: 34427
2007-02-19 21:47:02 +00:00
Chris Lattner
8982e3b063 this passes now
llvm-svn: 34426
2007-02-19 20:20:04 +00:00