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
Chris Lattner
bfbeedf462
remove reoptimizer-specific passes
...
llvm-svn: 34439
2007-02-20 05:31:49 +00:00
Chris Lattner
388222d25e
remove some dead passes and stuff specific to the reoptimizer.
...
llvm-svn: 34438
2007-02-20 05:31:35 +00:00
Chris Lattner
71ced5505c
remove some passes
...
llvm-svn: 34437
2007-02-20 05:31:04 +00:00
Chris Lattner
502e4b271a
remove dead method
...
llvm-svn: 34436
2007-02-20 05:29:47 +00:00
Evan Cheng
f35559f26f
Dead code.
...
llvm-svn: 34435
2007-02-20 01:29:10 +00:00
Evan Cheng
a6399ed8d6
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
52e307f820
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
bd46f28da7
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
78e1ec0122
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
aa8e491a2f
Added test case for PR1207.
...
llvm-svn: 34429
2007-02-19 21:53:59 +00:00
Evan Cheng
e4ab9c032b
Re-apply my liveintervalanalysis changes. Now with PR1207 fixes.
...
llvm-svn: 34428
2007-02-19 21:49:54 +00:00
Evan Cheng
9482b32217
Fix test case.
...
llvm-svn: 34427
2007-02-19 21:47:02 +00:00
Chris Lattner
429de9a4ad
this passes now
...
llvm-svn: 34426
2007-02-19 20:20:04 +00:00
Chris Lattner
f501d245c8
llvm-gcc issue fixed, revert reversal :)
...
llvm-svn: 34425
2007-02-19 20:01:23 +00:00
Chris Lattner
8f9dc788c1
remove warning
...
llvm-svn: 34424
2007-02-19 19:46:17 +00:00