1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
Commit Graph

4898 Commits

Author SHA1 Message Date
Evan Cheng
561bf1736e Pass IsImp, IsKill, and IsDead to ChangeToRegister.
llvm-svn: 34688
2007-02-27 21:06:57 +00:00
Reid Spencer
9e66d0921a Improve APInt interface:
1. Add unsigned and signed versions of methods so a "bool" argument doesn't
   need to be passed in.
2. Make the various getMin/getMax functions all be inline since they are
   so simple.
3. Simplify sdiv and srem code.

llvm-svn: 34680
2007-02-27 20:24:31 +00:00
Reid Spencer
612dfe195b Allow the RoundDoubleToAPInt function to specify a width to use.
llvm-svn: 34672
2007-02-27 18:22:31 +00:00
Devang Patel
89791371ce Make getPassManagerType() const.
llvm-svn: 34669
2007-02-27 15:00:39 +00:00
Chris Lattner
11a1c2113c Minor refactoring of CC Lowering interfaces
llvm-svn: 34656
2007-02-27 05:13:54 +00:00
Chris Lattner
e34136f6d5 move CC Lowering stuff to its own public interface
llvm-svn: 34655
2007-02-27 04:43:02 +00:00
Evan Cheng
341fc2bf88 forward() should not increment internal iterator. Its client may insert instruction between now and next forward() call.
llvm-svn: 34649
2007-02-27 01:58:48 +00:00
Reid Spencer
c8cc0f997e For PR1205:
Implement the first step towards arbitrary precision integer support in
LLVM. The APInt class provides arbitrary precision arithmetic and value
representation. This patch changes ConstantInt to use APInt as its value
representation without supporting bit widths > 64 yet. That change will
come after ConstantFolding handles bit widths > 64 bits.

llvm-svn: 34647
2007-02-26 23:54:03 +00:00
Evan Cheng
0fd5788077 Joining an interval with a dead copy instruction. Shorten the live range to the last use.
llvm-svn: 34645
2007-02-26 21:37:37 +00:00
Reid Spencer
9bc19eab08 Fix indentation.
llvm-svn: 34643
2007-02-26 21:06:05 +00:00
Reid Spencer
18629544d3 1. Split getValue() into getSExtValue() and getZExtValue() to match
ConstantInt better.
2. Add a getHashValue() method.

llvm-svn: 34641
2007-02-26 20:57:12 +00:00
Reid Spencer
11f19f730c Implement inline methods that make transition of ConstantInt to use APInt
easier to comprehend and might be useful elsewhere.

llvm-svn: 34635
2007-02-26 17:50:32 +00:00
Reid Spencer
1252a271a1 Make isNegative() a const function since it doesn't modify the APInt.
llvm-svn: 34630
2007-02-26 07:45:40 +00:00
Reid Spencer
e8e8ea4fba Add an isNegative method to determine if the APInt's value is negative.
This is much less expensive than a test against zero.

llvm-svn: 34619
2007-02-26 01:20:59 +00:00
Chris Lattner
50be7cd320 Rework GlobalValue::removeDeadConstantUsers to always remove dead constant
exprs hanging off a global, even if the global is not otherwise dead.  This
requires some tricky iterator gymnastics.

This implements Transforms/GlobalOpt/constantexpr-dangle.ll by deleting a
constantexpr that made it appear that the address of the function was taken.

llvm-svn: 34608
2007-02-25 21:06:13 +00:00
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
Reid Spencer
e7d8a0e3b7 Add a private constructor for efficiency.
llvm-svn: 34580
2007-02-25 07:29:03 +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
Chris Lattner
0eb72353e4 Refactor the setName stuff, moving it down the inheritance hierarchy, to
solve a crash in -instcombine -debug that was hit while investigating PR1217

llvm-svn: 34544
2007-02-24 00:55:48 +00:00
Devang Patel
06b8983669 Loop passes are set up to accept pointer.
llvm-svn: 34527
2007-02-23 17:53:17 +00:00
Evan Cheng
df6be7d4fc Temporay hook to enable register scavening for specific targets only.
llvm-svn: 34513
2007-02-23 01:07:04 +00:00
Evan Cheng
387f1c2bdf Use findRegisterUseOperand to find a kill of particular register.
llvm-svn: 34512
2007-02-23 01:04:26 +00:00
Evan Cheng
f9ef2bfd8a Initial check in of register scavenger. Its only current functionality is tracking live registers per MBB.
llvm-svn: 34511
2007-02-23 01:01:19 +00:00
Devang Patel
46cad14ab8 Teach LoopPass to assign itself one Loop Pass Manager.
llvm-svn: 34510
2007-02-23 00:36:57 +00:00
Devang Patel
9a7b18fa3d Add facility that allows LoopPass to re-insert a loop into
Loop Pass Manager's queue.

llvm-svn: 34509
2007-02-23 00:16:44 +00:00
Devang Patel
bbfd00e658 Add LPPassManager interface that LoopPass can use to skip
rest of the passes in the queue for a loop.

llvm-svn: 34508
2007-02-23 00:10:16 +00:00
Evan Cheng
6b25288ab7 Copy and paste silliness.
llvm-svn: 34507
2007-02-22 23:52:23 +00:00
Devang Patel
b170ebf833 Add LoopQueue. This is used by loop pass manager to manage loop nest.
llvm-svn: 34504
2007-02-22 23:30:07 +00:00
Evan Cheng
68e7fe47f6 Remove unnecessary isKill properties if a live range has been lengthened due to coalescing.
llvm-svn: 34503
2007-02-22 23:03:39 +00:00
Jim Laskey
d16ed8329e Typo.
llvm-svn: 34498
2007-02-22 16:40:10 +00:00
Jim Laskey
8c79f0f892 Remove isAccessable.
llvm-svn: 34497
2007-02-22 16:39:03 +00:00
Jim Laskey
655bea55fe Simplify lowering and selection of exception ops.
llvm-svn: 34491
2007-02-22 15:37:19 +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
Jim Laskey
6a937ad320 Support to provide exception and selector registers.
llvm-svn: 34482
2007-02-21 22:54:50 +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
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
Devang Patel
ee1da8a703 Simplify
llvm-svn: 34469
2007-02-21 19:57:33 +00:00
Reid Spencer
807eadb51a Add a dump() method for debugging.
llvm-svn: 34464
2007-02-21 03:56:12 +00:00
Devang Patel
96f62d7c95 Fix memory leak (PR 775).
llvm-svn: 34462
2007-02-21 02:36:31 +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
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
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