Commit Graph

4884 Commits

Author SHA1 Message Date
Devang Patel
84da80d10b Make getPassManagerType() const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34669 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 15:00:39 +00:00
Chris Lattner
13513b7a50 Minor refactoring of CC Lowering interfaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34656 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 05:13:54 +00:00
Chris Lattner
362e98a5f5 move CC Lowering stuff to its own public interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34655 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 04:43:02 +00:00
Evan Cheng
ed570dedad forward() should not increment internal iterator. Its client may insert instruction between now and next forward() call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34649 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-27 01:58:48 +00:00
Reid Spencer
532d0ce208 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34647 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-26 23:54:03 +00:00
Evan Cheng
edeffb37dc Joining an interval with a dead copy instruction. Shorten the live range to the last use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34645 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-26 21:37:37 +00:00
Reid Spencer
946bca5bae Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34643 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-26 21:06:05 +00:00
Reid Spencer
31a81f0190 1. Split getValue() into getSExtValue() and getZExtValue() to match
ConstantInt better.
2. Add a getHashValue() method.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34641 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-26 20:57:12 +00:00
Reid Spencer
f99705e898 Implement inline methods that make transition of ConstantInt to use APInt
easier to comprehend and might be useful elsewhere.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34635 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-26 17:50:32 +00:00
Reid Spencer
ebf4ebd691 Make isNegative() a const function since it doesn't modify the APInt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34630 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-26 07:45:40 +00:00
Reid Spencer
dcffd5c3d9 Add an isNegative method to determine if the APInt's value is negative.
This is much less expensive than a test against zero.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34619 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-26 01:20:59 +00:00
Chris Lattner
1cf5574636 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34608 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-25 21:06:13 +00:00
Reid Spencer
c68c2243dc 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34602 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-25 19:26:01 +00:00
Reid Spencer
20b1f5db1e Add a private constructor for efficiency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34580 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-25 07:29:03 +00:00
Reid Spencer
d03d012ad9 Improve documentation.
Make divide function internal (it was briefly external for testing).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34557 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-24 09:50:13 +00:00
Chris Lattner
910c80a075 Refactor the setName stuff, moving it down the inheritance hierarchy, to
solve a crash in -instcombine -debug that was hit while investigating PR1217


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34544 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-24 00:55:48 +00:00
Devang Patel
4b2646326b Loop passes are set up to accept pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34527 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-23 17:53:17 +00:00
Evan Cheng
5b7d5964c2 Temporay hook to enable register scavening for specific targets only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34513 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-23 01:07:04 +00:00
Evan Cheng
76d7e76c15 Use findRegisterUseOperand to find a kill of particular register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34512 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-23 01:04:26 +00:00
Evan Cheng
96fa612373 Initial check in of register scavenger. Its only current functionality is tracking live registers per MBB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34511 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-23 01:01:19 +00:00
Devang Patel
bfd5905584 Teach LoopPass to assign itself one Loop Pass Manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34510 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-23 00:36:57 +00:00
Devang Patel
8ded5852fe Add facility that allows LoopPass to re-insert a loop into
Loop Pass Manager's queue.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34509 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-23 00:16:44 +00:00
Devang Patel
5afdc7d785 Add LPPassManager interface that LoopPass can use to skip
rest of the passes in the queue for a loop.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34508 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-23 00:10:16 +00:00
Evan Cheng
7d35c0e2b9 Copy and paste silliness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34507 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 23:52:23 +00:00
Devang Patel
d0e6e33043 Add LoopQueue. This is used by loop pass manager to manage loop nest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34504 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 23:30:07 +00:00
Evan Cheng
30cac02a92 Remove unnecessary isKill properties if a live range has been lengthened due to coalescing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34503 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 23:03:39 +00:00
Jim Laskey
f033833109 Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34498 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 16:40:10 +00:00
Jim Laskey
033c9715d9 Remove isAccessable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34497 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 16:39:03 +00:00
Jim Laskey
2bc210d99f Simplify lowering and selection of exception ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34491 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 15:37:19 +00:00
Jim Laskey
2ad9f17fee Simplify lowering and selection of exception ops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34488 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 14:56:36 +00:00
Devang Patel
16a31c4ebf Add Loop Pass Manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34487 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-22 08:56:17 +00:00
Jim Laskey
62819f3144 Support to provide exception and selector registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34482 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 22:54:50 +00:00
Jim Laskey
bda9b0ec7b Add support for changes in DwarfWriter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34478 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 22:47:38 +00:00
Jim Laskey
a15be8ce3a Add TAI field for exception table section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34477 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 22:43:40 +00:00
Jim Laskey
9b25b8ca24 Allow for live in registers for eh landing pads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34475 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 22:41:17 +00:00
Jim Laskey
30b8e51add Add a flag to MBBs to indicate whether it is an eh landing pad.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34474 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 22:39:52 +00:00
Jim Laskey
59667fe203 Add structures used for collecting eh information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34473 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 22:38:31 +00:00
Jim Laskey
f09f2e304d Add new instructions for handling data passed into eh landing pad.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34472 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 22:37:22 +00:00
Jim Laskey
9cf8927a7b Add new intrinsics for eh support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34471 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 22:35:57 +00:00
Devang Patel
07d49acbf9 Simplify
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34469 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 19:57:33 +00:00
Reid Spencer
f31c784f27 Add a dump() method for debugging.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34464 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 03:56:12 +00:00
Devang Patel
ffee0d4dfe Fix memory leak (PR 775).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34462 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-21 02:36:31 +00:00
Reid Spencer
e91f7847e6 Add an internal convenience method for division that urem and udiv use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34448 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-20 08:43:42 +00:00
Chris Lattner
f543f748c3 eliminate some dead friends.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34447 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-20 07:18:01 +00:00
Chris Lattner
6b6f6ba66c 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34445 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-20 06:39:57 +00:00
Chris Lattner
d1afbd02ef Make ConstantInt::getTrue/getFalse be llvm_shutdown safe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34443 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-20 06:11:36 +00:00
Chris Lattner
b4d7e35dde add a way to register an arbitrary cleanup function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34442 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-20 06:08:37 +00:00
Chris Lattner
eb41bddfdf Clean up the internals of the ConstantInt machinery
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34441 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-20 05:55:46 +00:00
Chris Lattner
0963ad5271 remove some dead passes and stuff specific to the reoptimizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34438 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-20 05:31:35 +00:00
Chris Lattner
a9a23d8faf remove some passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34437 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-20 05:31:04 +00:00