Evan Cheng
2ae53613ca
These forward declarations are not needed.
...
llvm-svn: 35120
2007-03-16 08:41:06 +00:00
Bill Wendling
e31034125c
Multiplication support for MMX.
...
llvm-svn: 35118
2007-03-15 21:24:36 +00:00
Jeff Cohen
137a16ea95
Fix for VS 2005 problem supplied by Morten Ofstad.
...
llvm-svn: 35098
2007-03-14 15:25:21 +00:00
Zhou Sheng
b9c3707e97
Add zextOrCopy() into APInt for convenience.
...
llvm-svn: 35079
2007-03-13 06:16:26 +00:00
Evan Cheng
6486974e8d
More flexible TargetLowering LSR hooks for testing whether an immediate is
...
a legal target address immediate or scale.
llvm-svn: 35071
2007-03-12 23:26:27 +00:00
Zhou Sheng
e8e618a6ff
Add getSignBit() and operator<<= into APInt for convenience.
...
llvm-svn: 35059
2007-03-11 07:16:10 +00:00
Nick Lewycky
e455937fae
Add getter methods for the extremes of a ConstantRange.
...
llvm-svn: 35056
2007-03-10 15:54:12 +00:00
Bill Wendling
e9b81f5366
Adding more arithmetic operators to MMX. This is an almost exact copy of
...
the addition. Please let me know if you have suggestions.
llvm-svn: 35055
2007-03-10 09:57:05 +00:00
Bill Wendling
6092ce25cf
Added "padd*" support for MMX. Added MMX move stuff to X86InstrInfo so that
...
moves, loads, etc. are recognized.
llvm-svn: 35031
2007-03-08 22:09:11 +00:00
Evan Cheng
58aeb9c444
Add ReadOnlySection directive.
...
llvm-svn: 35015
2007-03-08 01:00:38 +00:00
Evan Cheng
f9e003b653
Added ContainsRelocations() to check if a constant might only be resolvable at load time.
...
llvm-svn: 35014
2007-03-08 00:59:12 +00:00
Anton Korobeynikov
ed4b303c10
Refactoring of formal parameter flags. Enable properly use of
...
zext/sext/aext stuff.
llvm-svn: 35008
2007-03-07 16:25:09 +00:00
Evan Cheng
b127b0bc27
Add a utility function to test whether a load is unindexed.
...
llvm-svn: 35004
2007-03-07 08:04:41 +00:00
Devang Patel
2ac57e1f02
Now IndVarSimplify is a LoopPass.
...
llvm-svn: 35003
2007-03-07 06:39:01 +00:00
Devang Patel
69730c96db
Now LICM is a LoopPass.
...
llvm-svn: 35001
2007-03-07 04:41:30 +00:00
Anton Korobeynikov
942fda027f
Fix DWARF debugging information on x86/Linux and (hopefully)
...
Mingw32/Cygwin targets. This fixes PR978
llvm-svn: 35000
2007-03-07 02:47:57 +00:00
Evan Cheng
7e1cae3d2d
Add skipTo to set internal iterator. Useful when pointed to instruction is deleted.
...
llvm-svn: 34997
2007-03-07 02:36:16 +00:00
Devang Patel
9779e56c04
Now LoopUnroll is a LoopPass.
...
llvm-svn: 34996
2007-03-07 01:38:05 +00:00
Devang Patel
901a27d892
Now LoopUnswitch is a LoopPass.
...
llvm-svn: 34992
2007-03-07 00:26:10 +00:00
Devang Patel
b0743b5d6a
Now LoopStrengthReduce is a LoopPass.
...
llvm-svn: 34984
2007-03-06 21:14:09 +00:00
Devang Patel
4a8725cf2f
Use schedulePass() instead of assignPassManager() to add new LPPassManager.
...
This ensures that require analysis info is available.
llvm-svn: 34980
2007-03-06 19:11:25 +00:00
Devang Patel
ef7ac13406
Add LPPassManager::insertLoop().
...
llvm-svn: 34979
2007-03-06 19:00:02 +00:00
Devang Patel
fca3aa3645
LPPassManager::deleteLoopFromQueue() add meat. Cut-n-paste code from
...
LoopUnswitch pass.
llvm-svn: 34977
2007-03-06 18:38:33 +00:00
Devang Patel
1699384509
LPPassManager. Implement preparePassManager() hook.
...
llvm-svn: 34975
2007-03-06 17:59:37 +00:00
Devang Patel
9d9fc90952
Keep track of higher level analysis.
...
llvm-svn: 34974
2007-03-06 17:52:53 +00:00
Devang Patel
84ffc223f1
LPPassManager : Add initialization and finalizatino hooks.
...
llvm-svn: 34968
2007-03-06 16:59:03 +00:00
Evan Cheng
8b8cac289b
Minor interface change.
...
llvm-svn: 34967
2007-03-06 10:05:14 +00:00
Evan Cheng
372c2c69f8
Register scavenger is now capable of scavenging. It spills a register whose use of furthest away to make it available.
...
llvm-svn: 34964
2007-03-06 10:01:25 +00:00
Anton Korobeynikov
f0b9316552
Enumerate SDISel formal parameter attributes. Make use of new
...
enumeration.
llvm-svn: 34960
2007-03-06 06:10:33 +00:00
Anton Korobeynikov
666d23d4e6
Implement PR1240
...
llvm-svn: 34959
2007-03-06 05:32:48 +00:00
Reid Spencer
d7c6174f85
Make StoreValueToMemory a little more efficient by not copying a
...
GenericValue to a temporary.
llvm-svn: 34957
2007-03-06 05:02:28 +00:00
Reid Spencer
b5caad1d5c
Make GenericeValue into a struct with a union instead of just a union. This
...
allows an APInt value to be constructed. Remove all the native integer types
from the union. These are replaced with the single IntVal of type APInt.
llvm-svn: 34945
2007-03-06 03:01:54 +00:00
Devang Patel
a8c81c5261
Use std::deque to manage loop queue inside LPPassManager.
...
llvm-svn: 34943
2007-03-06 02:30:46 +00:00
Devang Patel
42dd1e92c7
Keep track of inherited analysis. For example, if a loop pass does not
...
preserve dominator info then it should update parent FPPassManager's
available analysis info to reflect this.
llvm-svn: 34942
2007-03-06 01:55:46 +00:00
Devang Patel
d74ede70fb
Add preparePassManager() hook. This allows each pass to check whether
...
current active pass manager is appropriate or not.
A loop pass may consider current LPPassManager in appropraite if loop
pass is not preserving analysis information that is used by other
passes managed by current LPPassManager. In such situation, loop pass
can pop current LPPassManager from the PMStack using this hook
and use new LPPassManager for itself.
llvm-svn: 34941
2007-03-06 01:06:16 +00:00
Bill Wendling
b1c86b49ea
Add the emms intrinsic for MMX support.
...
llvm-svn: 34938
2007-03-05 23:09:45 +00:00
Reid Spencer
ad0075d6d4
Document the use of getValueType() more accurately, specifically explain
...
that the instruction opcode is added to the InstructionVal value and the
consequences of that.
llvm-svn: 34937
2007-03-05 23:06:32 +00:00
Devang Patel
ec2b9a7850
Current pass manager, not the parent pass manager, assumes the role of
...
last user when one of the managed pass uses info provided by parent pass
manager.
This was exposed by LPPassManager work.
llvm-svn: 34936
2007-03-05 22:57:49 +00:00
Devang Patel
003a559633
Avoid constructing std::strings unless pass debugging is ON.
...
llvm-svn: 34933
2007-03-05 20:01:30 +00:00
Jeff Cohen
9bf52a72d1
The hack won't work on VS 2005, and it might not be needed anyway.
...
llvm-svn: 34930
2007-03-05 17:22:33 +00:00
Zhou Sheng
9587a919ee
Correct the calculation in APInt::logBase2().
...
llvm-svn: 34929
2007-03-05 16:42:58 +00:00
Jeff Cohen
50bf51e8ac
Elminate tabs and improve comments.
...
llvm-svn: 34921
2007-03-05 00:46:22 +00:00
Jeff Cohen
b622c11f77
Unbreak VC++ build.
...
llvm-svn: 34917
2007-03-05 00:00:42 +00:00
Chris Lattner
2fbcc0714c
add a getSignBit method, elimiante virtual method from getBitMask()
...
llvm-svn: 34916
2007-03-04 23:33:19 +00:00
Chris Lattner
e824f085c8
fix 80 col violations, mark arrays static
...
llvm-svn: 34915
2007-03-04 23:33:03 +00:00
Chris Lattner
dc3d4406bd
add a new node
...
llvm-svn: 34912
2007-03-04 20:40:06 +00:00
Chris Lattner
f083768df3
add iterator range version of ctor.
...
llvm-svn: 34899
2007-03-04 04:04:43 +00:00
Reid Spencer
30ed3bdaf2
Make the creation functions take an error string. This will help the
...
ExecutionEngine report errors on creation (like bytecode stuff) and also
help to get rid of exception handling.
llvm-svn: 34886
2007-03-03 18:18:11 +00:00
Reid Spencer
c3bfe13ed5
Require the destination GlobalValue for LoadValueFromMemory to be passed
...
in as a parameter instead of returned.
llvm-svn: 34882
2007-03-03 08:35:14 +00:00
Reid Spencer
94a48f06e5
Regularize the interface for conversion functions to/from float/double.
...
llvm-svn: 34881
2007-03-03 08:34:02 +00:00
Reid Spencer
cfe415c4e1
Add APIntVal as a possible GenericeValue.
...
llvm-svn: 34879
2007-03-03 07:36:44 +00:00
Reid Spencer
1a7d446963
Make getNumWords public so that those using getRawData stand a chance of
...
not reading beyond the end of the buffer returned.
llvm-svn: 34873
2007-03-03 06:17:23 +00:00
Reid Spencer
22c4fedabf
Add names for some of the operators. This is needed for the macros in
...
the Interpreter.
llvm-svn: 34872
2007-03-03 05:37:23 +00:00
Reid Spencer
3588ab15d1
Add isPositive for symmetry with isNegative.
...
llvm-svn: 34862
2007-03-03 00:24:39 +00:00
Anton Korobeynikov
e41e3fc74e
Fix uninitialized use of variable. Remove tabs and fix identation.
...
llvm-svn: 34850
2007-03-02 22:19:41 +00:00
Chris Lattner
c3b68788bb
Fix PR1234 by working around a compiler bug.
...
llvm-svn: 34845
2007-03-02 18:16:29 +00:00
Owen Anderson
a0d8da67c1
Fix a typo.
...
llvm-svn: 34836
2007-03-02 05:03:07 +00:00
Evan Cheng
934405cf03
Make it 64-bit safe.
...
llvm-svn: 34829
2007-03-02 02:31:37 +00:00
Reid Spencer
3f770e4afd
Add a non-virtual test for zero, isZero, and rename isUnitValue isOne.
...
These will be used in upcoming patches to avoid virtual function call when
the client knows it is a ConstantInt.
llvm-svn: 34820
2007-03-02 00:27:06 +00:00
Reid Spencer
76b2ce19fc
Add an abs() function to get the absolute value.
...
llvm-svn: 34819
2007-03-01 23:37:09 +00:00
Reid Spencer
1700b52b8b
Remove virtual keyword from method that doesn't need to be virtual.
...
llvm-svn: 34817
2007-03-01 23:20:52 +00:00
Reid Spencer
caace8cffd
Make it possible to create an SCEVUnknown from an APInt as well as an int.
...
llvm-svn: 34816
2007-03-01 22:28:51 +00:00
Reid Spencer
9c61acc450
Add an isUnitValue method for comparison against 1. This just follows a
...
common pattern with isNullValue, isAllOnesValue, etc. It also helps to
prevent things like getZExtValue() == 1, which could assert for large
bitwidths.
llvm-svn: 34813
2007-03-01 21:50:41 +00:00
Owen Anderson
90db545350
Use GCC intrinsics when available, and use smarter fallbacks when not.
...
llvm-svn: 34812
2007-03-01 21:16:30 +00:00
Reid Spencer
022e05fdab
Add doubleToBits and floatToBits methods.
...
llvm-svn: 34807
2007-03-01 20:39:01 +00:00
Jim Laskey
6458e6acb9
Collect eh filter info.
...
llvm-svn: 34804
2007-03-01 20:25:32 +00:00
Jim Laskey
14c5842a91
Add eh filter intrinsic.
...
llvm-svn: 34801
2007-03-01 20:23:39 +00:00
Reid Spencer
f762893b9b
Add bitsToDouble and bitsToFloat methods for re-interpretation of bits as FP.
...
llvm-svn: 34800
2007-03-01 20:06:51 +00:00
Reid Spencer
d1bbfa5aa6
Drop the ConstantInt(const Type&, const APInt&) constructor. It is
...
redundant and more verbose than the ConstantInt(const APInt&) constructor.
llvm-svn: 34792
2007-03-01 19:30:34 +00:00
Reid Spencer
742d1704e1
Add methods for bit width modification: sextOrTrunc, zextOrTrunc.
...
llvm-svn: 34789
2007-03-01 17:15:32 +00:00
Evan Cheng
27bc565497
Add a version of FindUnusedReg that restrict search to a specific set of registers.
...
llvm-svn: 34784
2007-03-01 08:56:24 +00:00
Reid Spencer
6a44033465
Remove the "isSigned" parameters from ConstantRange. It turns out they
...
are not needed as the results are the same with or without it.
Patch by Nicholas Lewycky.
llvm-svn: 34782
2007-03-01 07:54:15 +00:00
Owen Anderson
3062625451
Use the GCC built-in for PopulationCount when it's available, and use a faster
...
algorithm when it's not. This should be particularly noticeable in the
64-bit case.
llvm-svn: 34776
2007-03-01 05:41:28 +00:00
Reid Spencer
d99feafd5f
Add a square root function.
...
llvm-svn: 34775
2007-03-01 05:39:56 +00:00
Reid Spencer
5a642a7991
Reduce #includage by taking a method out of line.
...
llvm-svn: 34774
2007-03-01 04:02:06 +00:00
Reid Spencer
0f49976928
Add an IntegerType::getMask() method to get an APInt mask for the type.
...
llvm-svn: 34771
2007-03-01 02:25:03 +00:00
Evan Cheng
71c2d65e74
Clean up interface.
...
llvm-svn: 34769
2007-03-01 02:18:06 +00:00
Evan Cheng
8a703ad4b6
Track all joined registers and eliminate unneeded kills after all joining are done.
...
llvm-svn: 34767
2007-03-01 02:03:03 +00:00
Evan Cheng
d97ccab64d
MachineBasicBlock fields should not be public.
...
llvm-svn: 34766
2007-03-01 02:00:40 +00:00
Reid Spencer
9b3d6ec983
Move ConstantRange class to lib/Support from lib/Analysis and make its
...
interface not depend on Type or ICmpInst.
llvm-svn: 34761
2007-02-28 22:02:48 +00:00
Reid Spencer
0286bc1af5
Provide an ICmpInst::makeConstantRange to generate a ConstantRange value
...
from a predicate and an APInt. This is removed from ConstantRange class
so that ConstantRange doesn't have to depend on lib/VMCore.
llvm-svn: 34760
2007-02-28 22:00:54 +00:00
Reid Spencer
3a7e9d8e75
For PR1205:
...
Remove ConstantInt from ConstantRange interface and adjust its users to
compensate.
llvm-svn: 34758
2007-02-28 19:57:34 +00:00
Reid Spencer
8774fe816a
Implement a convenience method to construct a ConstantInt directly from an
...
APInt. The implied type is the integer type that corresponds to the bit
width of the APInt.
llvm-svn: 34757
2007-02-28 19:50:21 +00:00
Reid Spencer
56f784d12d
For PR1205:
...
First round of ConstantRange changes. This makes all CR constructors use
only APInt and not use ConstantInt. Clients are adjusted accordingly.
llvm-svn: 34756
2007-02-28 18:57:32 +00:00
Jim Laskey
c114990526
Provide a more meaningful name.
...
llvm-svn: 34751
2007-02-28 18:37:50 +00:00
Reid Spencer
e1f3f1919c
For PR1205:
...
Convert ConstantRange class to use APInt internally as its value type for
the constant range, instead of ConstantInt.
llvm-svn: 34745
2007-02-28 17:36:23 +00:00
Reid Spencer
074b8a080e
Make APInt a little more friendly to its users:
...
* Add support for + and - of a uint64_t.
* Make trunc/sext/zext return *this so it can be chained with other ops
* Add smin, smax, umin, umax functions for getting min/max values.
llvm-svn: 34742
2007-02-28 17:33:36 +00:00
Nate Begeman
e0232ec706
More Mach-O writer improvements.
...
llvm-svn: 34740
2007-02-28 07:40:50 +00:00
Chris Lattner
74bb92902e
add methods for analysis of call results and return nodes.
...
llvm-svn: 34738
2007-02-28 07:09:40 +00:00
Chris Lattner
e74744143f
add methods to analyze calls and formals.
...
llvm-svn: 34736
2007-02-28 06:56:37 +00:00
Reid Spencer
f8470272a7
getActiveWords should return the number of words, not the index of the
...
highest active words. Increment its result by one.
llvm-svn: 34713
2007-02-28 02:20:49 +00:00
Evan Cheng
e8af69632f
Make requiresRegisterScavenging determination on a per MachineFunction basis.
...
llvm-svn: 34711
2007-02-28 00:59:19 +00:00
Evan Cheng
589ba3964b
MRegisterInfo disowns RegScavenger. It's immutable.
...
llvm-svn: 34706
2007-02-28 00:17:36 +00:00
Reid Spencer
98765e17df
Add some syntactic sugar.
...
llvm-svn: 34704
2007-02-27 23:47:33 +00:00
Evan Cheng
a7e4b60b85
Some more code clean up.
...
llvm-svn: 34700
2007-02-27 22:58:43 +00:00
Evan Cheng
8a8dc04e7e
Oops.
...
llvm-svn: 34698
2007-02-27 22:10:52 +00:00
Reid Spencer
31acef50ad
Implement countLeadingOnes() and getMinSignedBits(). This helps to minimize
...
the bit width of negative numbers by computing the minimum bit width for a
negative value. E.g. 0x1800000000000000 could be just 0x8000000000000000
llvm-svn: 34695
2007-02-27 21:59:26 +00:00
Evan Cheng
51f54640de
RegScavenger interface change to make it more flexible.
...
llvm-svn: 34690
2007-02-27 21:09:48 +00:00
Evan Cheng
16fd33ac5c
Let MRegisterInfo owns RegScavenger.
...
llvm-svn: 34689
2007-02-27 21:08:07 +00:00
Evan Cheng
6b70685aa5
Pass IsImp, IsKill, and IsDead to ChangeToRegister.
...
llvm-svn: 34688
2007-02-27 21:06:57 +00:00
Reid Spencer
70cb5d4287
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
c561bd2f18
Allow the RoundDoubleToAPInt function to specify a width to use.
...
llvm-svn: 34672
2007-02-27 18:22:31 +00:00
Devang Patel
28349abeab
Make getPassManagerType() const.
...
llvm-svn: 34669
2007-02-27 15:00:39 +00:00
Chris Lattner
9f059194a7
Minor refactoring of CC Lowering interfaces
...
llvm-svn: 34656
2007-02-27 05:13:54 +00:00
Chris Lattner
dc3adc83e7
move CC Lowering stuff to its own public interface
...
llvm-svn: 34655
2007-02-27 04:43:02 +00:00
Evan Cheng
ca25c0ee0d
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
b31bffed96
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
bdec83e4d2
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
3d88599863
Fix indentation.
...
llvm-svn: 34643
2007-02-26 21:06:05 +00:00
Reid Spencer
eed186ee58
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
62530f93b3
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
862ee00550
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
5aa8560eab
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
76ac8f82bd
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
a7bd1d0b04
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
16f043a12a
Add a private constructor for efficiency.
...
llvm-svn: 34580
2007-02-25 07:29:03 +00:00
Reid Spencer
8fe5240289
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
2195fc41ec
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
d3ccdfd04d
Loop passes are set up to accept pointer.
...
llvm-svn: 34527
2007-02-23 17:53:17 +00:00
Evan Cheng
c6ee20233e
Temporay hook to enable register scavening for specific targets only.
...
llvm-svn: 34513
2007-02-23 01:07:04 +00:00
Evan Cheng
9965aebd5d
Use findRegisterUseOperand to find a kill of particular register.
...
llvm-svn: 34512
2007-02-23 01:04:26 +00:00
Evan Cheng
956fdeb694
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
55c3827281
Teach LoopPass to assign itself one Loop Pass Manager.
...
llvm-svn: 34510
2007-02-23 00:36:57 +00:00
Devang Patel
715add3462
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
4e335c6c71
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
1bce781670
Copy and paste silliness.
...
llvm-svn: 34507
2007-02-22 23:52:23 +00:00
Devang Patel
de7d49053f
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
cc607daac1
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
3ed4d3efeb
Typo.
...
llvm-svn: 34498
2007-02-22 16:40:10 +00:00
Jim Laskey
9df1a1d8d8
Remove isAccessable.
...
llvm-svn: 34497
2007-02-22 16:39:03 +00:00
Jim Laskey
7f5872c455
Simplify lowering and selection of exception ops.
...
llvm-svn: 34491
2007-02-22 15:37:19 +00:00
Jim Laskey
e0008e23cf
Simplify lowering and selection of exception ops.
...
llvm-svn: 34488
2007-02-22 14:56:36 +00:00
Devang Patel
20525d2836
Add Loop Pass Manager.
...
llvm-svn: 34487
2007-02-22 08:56:17 +00:00
Jim Laskey
3796abea0f
Support to provide exception and selector registers.
...
llvm-svn: 34482
2007-02-21 22:54:50 +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
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
Devang Patel
a673b600c8
Simplify
...
llvm-svn: 34469
2007-02-21 19:57:33 +00:00
Reid Spencer
4f44f5e8ac
Add a dump() method for debugging.
...
llvm-svn: 34464
2007-02-21 03:56:12 +00:00
Devang Patel
57bc4d1bc2
Fix memory leak (PR 775).
...
llvm-svn: 34462
2007-02-21 02:36:31 +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
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
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
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
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
f7ed82da10
Re-apply my liveintervalanalysis changes. Now with PR1207 fixes.
...
llvm-svn: 34428
2007-02-19 21:49:54 +00:00
Chris Lattner
b5d703018b
llvm-gcc issue fixed, revert reversal :)
...
llvm-svn: 34425
2007-02-19 20:01:23 +00:00
Evan Cheng
0a02f82767
Temporarily reverting the patch. It's breaking llvm-gcc build.
...
llvm-svn: 34423
2007-02-19 19:23:41 +00:00
Chris Lattner
4669b0bf54
remove dead methods
...
llvm-svn: 34419
2007-02-19 07:44:24 +00:00
Chris Lattner
544a633656
add alternate version of constant ctors that don't take a vector. For now
...
this offers no performance advantage.
llvm-svn: 34415
2007-02-19 07:23:24 +00:00
Reid Spencer
da81bf4d3e
For PR1207:
...
Revert patches that caused the problem. Evan, please investigate and reapply
when you've discovered the problem.
llvm-svn: 34399
2007-02-19 03:20:00 +00:00
Reid Spencer
577f4bd78c
Add some new constants.
...
llvm-svn: 34398
2007-02-19 03:18:22 +00:00
Reid Spencer
68b6184884
1. "unsigned" -> "uint32_t" to gaurantee its bit width on all platforms.
...
Size matters in this case.
2. Remove the unused whichByte private function, which was also broken.
3. Remove the non-const overload of the getWord function, getWord() is
never used as an lvalue.
4. Rename some local variables for clarity (e.g. API -> Result).
llvm-svn: 34390
2007-02-18 18:42:35 +00:00
Reid Spencer
fbd48a566a
Implement signed output for toString.
...
Fix bugs in countLeadingZeros and countTrailingZeros.
llvm-svn: 34386
2007-02-18 00:44:22 +00:00
Chris Lattner
9df8be40fe
temporarily revert Devang's most recent patch, which caused a large
...
compile-time regression in LLC.
llvm-svn: 34385
2007-02-17 23:14:24 +00:00
Evan Cheng
2605082f0e
- Changes how function livein's are handled, they now have a start index of 0.
...
- When coalescing a copy MI, if its destination is "dead", propagate the
property to the source MI's destination if there are no intervening uses.
- Detect dead function live-in's and remove them.
llvm-svn: 34383
2007-02-17 11:15:40 +00:00
Evan Cheng
6accd480a2
Added findRegisterDefOperand().
...
llvm-svn: 34380
2007-02-17 11:10:18 +00:00
Evan Cheng
0479014657
Added removeLiveIn and more livein iterators.
...
llvm-svn: 34378
2007-02-17 11:07:41 +00:00
Evan Cheng
08ceaae6b1
Allow LiveVariables to track liveness of more registers.
...
llvm-svn: 34377
2007-02-17 11:07:08 +00:00
Evan Cheng
6457b9eff4
- Added regsOverlap() to test if two registers overlap. Or in case they are
...
virtual registers, test if they the same.
- Added a virtual method to return target specific reserved registers, e.g. SP.
llvm-svn: 34375
2007-02-17 11:04:35 +00:00
Devang Patel
98354dabc1
Use inverted map to speedup collectLastUses().
...
llvm-svn: 34364
2007-02-17 03:53:44 +00:00
Chris Lattner
04eb16b415
Do not dereference invalid ranges. Generalize targetdata alignment model.
...
This fixes the UnitTests/Vector/sumarray-dbl regressions.
llvm-svn: 34358
2007-02-17 00:41:42 +00:00
Reid Spencer
a32372d110
Fix bugs introduced by constructor parameter order change.
...
llvm-svn: 34357
2007-02-17 00:18:01 +00:00
Reid Spencer
1d0721209d
Review changes:
...
1. Function style changes.
2. 80-col violations.
3. Better names for things.
4. Arrange constructors so they all take bit width first.
5. Add named signed and unsigned comparison functions and remove the
corresponding operators.
6. Remove operator&& and operator|| but provide a getBoolValue function which
converts to bool as comparison against 0. This allows the normal && and
|| operators to be used as if (X.getBoolValue() && Y.getBoolValue())
Note: this still doesn't function 100% yet. I'm working on the bugs now.
llvm-svn: 34353
2007-02-16 22:36:51 +00:00
Anton Korobeynikov
d01defedf6
Add possibility to set memory limit for binaries run via libSystem. This
...
is especially needed for bugpoint. This partly implements PR688
llvm-svn: 34349
2007-02-16 19:11:07 +00:00
Chris Lattner
c992e18f8d
make mayWriteToMemory a non-virtual function
...
llvm-svn: 34334
2007-02-15 23:15:00 +00:00
Reid Spencer
03d4a8a368
For PR1195:
...
PACKED_ALIGN -> VECTOR_ALIGN
llvm-svn: 34330
2007-02-15 22:07:05 +00:00
Evan Cheng
8307918cc8
Proper fix for the off-by-one bug in clear_unused_bits().
...
llvm-svn: 34328
2007-02-15 21:38:15 +00:00
Reid Spencer
33f5e9ed15
Fix an off-by-one bug in computing the index of the word to clear.
...
llvm-svn: 34326
2007-02-15 20:49:10 +00:00
Reid Spencer
c592ad2be1
Make sure Capacity gets initialized too.
...
llvm-svn: 34325
2007-02-15 20:14:06 +00:00
Evan Cheng
7a259ffba3
Missing a ;
...
llvm-svn: 34322
2007-02-15 19:29:05 +00:00
Evan Cheng
4d1fd55a9f
BitVector::reference operator=(const reference& rhs) is unnecessary thanks to autoconvert to bool.
...
llvm-svn: 34320
2007-02-15 19:21:44 +00:00
Evan Cheng
410bee3478
Remove unnecessary checks.
...
llvm-svn: 34319
2007-02-15 19:18:12 +00:00
Evan Cheng
62615e233d
operator== returns false when two bitvectors have different sizes.
...
llvm-svn: 34317
2007-02-15 19:16:21 +00:00
Evan Cheng
106db04124
Merges two resize() variants.
...
llvm-svn: 34316
2007-02-15 19:12:39 +00:00
Evan Cheng
5f96248376
Clear no longer deleting the bits to avoid mallocs.
...
llvm-svn: 34315
2007-02-15 19:10:34 +00:00
Evan Cheng
b959dc3746
BitVector::count() bugs.
...
llvm-svn: 34314
2007-02-15 19:09:36 +00:00
Evan Cheng
6194cdc7b8
Eliminate a redundent ctor; eliminate one more potential new [0].
...
llvm-svn: 34313
2007-02-15 19:05:25 +00:00
Evan Cheng
06efb34da5
1 -> 1L since BitWord has type unsigned long.
...
llvm-svn: 34312
2007-02-15 19:03:23 +00:00
Evan Cheng
86f9f761ef
Eliminate new[0], just set Bits to NULL.
...
llvm-svn: 34311
2007-02-15 18:59:15 +00:00
Chris Lattner
fd27ed9733
Add a new Value::getNameStr method, which is preferred over getName.
...
llvm-svn: 34310
2007-02-15 18:53:54 +00:00
Evan Cheng
5f1aacd1bd
Inverted the condition by accident.
...
llvm-svn: 34309
2007-02-15 18:48:41 +00:00
Evan Cheng
3dd60a52fd
Bug fixes: assignment operator forgot to copy over size; copy ctor forgot to clear unused top bits.
...
llvm-svn: 34305
2007-02-15 08:15:58 +00:00
Zhou Sheng
cfa2ac0592
Fix some buges:
...
1. Make getMinValue() returns the right value.
2. Fix the ByteSwap() crash problem.
3. Make Postfix increment work correctly.
4. Fix some bugs in LogBase2, Hi/LoBits and UDiv.
llvm-svn: 34304
2007-02-15 06:36:31 +00:00
Evan Cheng
14edd1989b
Use BitVector instead of vector<bool> which can be extremely slow.
...
llvm-svn: 34302
2007-02-15 05:59:24 +00:00
Evan Cheng
ee7c774b8e
Add a BitVector class.
...
llvm-svn: 34301
2007-02-15 05:56:11 +00:00
Reid Spencer
09575bac2e
For PR1195:
...
Change use of "packed" term to "vector" in comments, strings, variable
names, etc.
llvm-svn: 34300
2007-02-15 03:39:18 +00:00
Evan Cheng
cba7633cb5
isPhysRegUsed should be const.
...
llvm-svn: 34295
2007-02-15 02:55:51 +00:00
Evan Cheng
12ac070433
Should pass isKill and isDead to addRegOperand() as well.
...
llvm-svn: 34294
2007-02-15 02:52:40 +00:00
Reid Spencer
d84d35ba70
For PR1195:
...
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.
llvm-svn: 34293
2007-02-15 02:26:10 +00:00
Reid Spencer
dad84a7c02
Fixed packed structure breakage from earlier TargetData patch; applied
...
Chris Lattner's code style suggestions.
Patch by Scott Michel!
llvm-svn: 34292
2007-02-15 02:11:06 +00:00
Chris Lattner
945e437c65
Generalize TargetData strings, to support more interesting forms of data.
...
Patch by Scott Michel.
llvm-svn: 34266
2007-02-14 05:52:17 +00:00
Reid Spencer
5153525402
Make some minor improvements to APInt:
...
1. Make all the operators use uppercase
2. Rename APIntRoundToDouble method just RoundToDouble, the APInt is
redundant.
3. Turn the class on for compilation.
llvm-svn: 34253
2007-02-13 22:41:58 +00:00
Lauro Ramos Venancio
de9b8d05d8
Add comment about original function argument alignment.
...
llvm-svn: 34243
2007-02-13 17:57:38 +00:00
Reid Spencer
16c6b85c78
Fix a compilation error that caused the nightly test to fail.
...
llvm-svn: 34239
2007-02-13 09:26:04 +00:00
Chris Lattner
0f04816cad
Switch UnaryOperators to default to passing names up by const char* when possible.
...
This speeds up bcreading by 1.5%.
llvm-svn: 34233
2007-02-13 07:54:42 +00:00
Chris Lattner
cb9a626c67
add a setName variant that takes a null-terminated string. This can be
...
used to avoid std::string allocations in common cases.
llvm-svn: 34232
2007-02-13 07:53:34 +00:00
Chris Lattner
10eb59abd8
fix a critical bug in smallvector, where it would destroy elements that are
...
not in its range (!).
llvm-svn: 34230
2007-02-13 07:25:36 +00:00
Chris Lattner
e563e480d9
eliminate instruction ctors that take vectors.
...
llvm-svn: 34228
2007-02-13 06:22:32 +00:00
Chris Lattner
b5fcc28075
Add invokeinst and callinst ctors that don't take vectors.
...
llvm-svn: 34214
2007-02-13 01:04:01 +00:00
Chris Lattner
054ba2c002
remove some dead methods.
...
llvm-svn: 34213
2007-02-13 00:58:44 +00:00
Andrew Lenharth
a224f7ba77
I love non-deturminism. Returning objects with references to stack objects is a bad idea (TM).
...
llvm-svn: 34210
2007-02-13 00:37:50 +00:00
Zhou Sheng
d707d63317
1. Make APInt::shl work correctly and more efficiently.
...
2. Add functions to support the numberical conversion between APInt and
double/float.
llvm-svn: 34201
2007-02-12 20:02:55 +00:00
Jim Laskey
2b13fadc82
Wrong value type.
...
llvm-svn: 34199
2007-02-12 19:05:51 +00:00
Chris Lattner
8d160d68b8
avoid creating a temporary string when reading the symbol table for a
...
module. This speeds up the bcreader 11%.
llvm-svn: 34198
2007-02-12 18:53:43 +00:00
Chris Lattner
1a5de584dc
Add new setName accessor which doesn't require creating a string.
...
llvm-svn: 34197
2007-02-12 18:52:59 +00:00
Chris Lattner
32ab643df7
Switch ValueSymbolTable to use StringMap<Value*> instead of std::map<std::string, Value*>
...
as its main datastructure. There are many improvements yet to be made, but
this speeds up opt --std-compile-opts on 447.dealII by 7.3%.
llvm-svn: 34193
2007-02-12 05:18:08 +00:00
Chris Lattner
eed47cc598
add #include
...
llvm-svn: 34190
2007-02-12 05:00:35 +00:00
Chris Lattner
081cb83407
add new ShouldRehash method to factor out common code. Fix the dtor to not
...
delete tombstones.
llvm-svn: 34189
2007-02-11 21:46:36 +00:00
Chris Lattner
6539a21e6c
do not allow hash table to be filled with tombstones.
...
llvm-svn: 34186
2007-02-11 21:07:36 +00:00
Chris Lattner
77baa56a70
Add support for removing elements out of StringMap.
...
llvm-svn: 34185
2007-02-11 20:58:00 +00:00
Chris Lattner
db08c1bc83
Replace the ugly FindValue method with STL-like find methods.
...
llvm-svn: 34183
2007-02-11 19:49:41 +00:00
Chris Lattner
9521fec8cf
remove support for stringmap visitors now that iterators exist.
...
llvm-svn: 34180
2007-02-11 08:22:15 +00:00
Chris Lattner
aac10ff6bf
add iterator support, plus support for size() and empty().
...
llvm-svn: 34178
2007-02-11 08:12:13 +00:00
Nick Lewycky
63f110880b
Fix comments to match names of functions.
...
llvm-svn: 34173
2007-02-11 00:58:49 +00:00
Chris Lattner
b625082a42
add a helper method: Value::takeName
...
llvm-svn: 34171
2007-02-11 00:37:27 +00:00
Chris Lattner
a48a96ef5f
Split StringMapEntry construction out of StringMap, into StringMapEntry.
...
llvm-svn: 34170
2007-02-11 00:10:26 +00:00
Chris Lattner
695ab7174f
remove dead method.
...
llvm-svn: 34164
2007-02-10 20:37:40 +00:00
Chris Lattner
e472f9c4dc
eliminate the std::vector from StructLayout, allocating the elements immediately
...
after the StructLayout object in memory. This marginally improves locality,
speeding up -load-vn -gcse by ~0.8%.
llvm-svn: 34158
2007-02-10 20:15:41 +00:00
Chris Lattner
b84892d2d2
encapsulate the rest of the StructLayout members.
...
llvm-svn: 34157
2007-02-10 19:59:22 +00:00
Chris Lattner
c473d8e431
Privatize StructLayout::MemberOffsets, adding an accessor
...
llvm-svn: 34156
2007-02-10 19:55:17 +00:00
Chris Lattner
2230c96657
add helper method.
...
llvm-svn: 34155
2007-02-10 19:54:24 +00:00
Chris Lattner
336e3962ff
Change TargetData::getIndexedOffset interface to not require indices
...
in a vector.
llvm-svn: 34153
2007-02-10 19:33:15 +00:00
Reid Spencer
9aac907740
Compaction tables don't exist any more.
...
llvm-svn: 34148
2007-02-10 14:07:56 +00:00
Chris Lattner
3541003208
Make find return the appropriate iterator/const_iterator
...
llvm-svn: 34137
2007-02-10 06:58:17 +00:00
Chris Lattner
d0a27bc995
Allow DenseMAp to take an explicit DenseMapKeyInfo
...
llvm-svn: 34134
2007-02-10 06:34:58 +00:00
Evan Cheng
bcf1d7faef
Add live-ins to MachineBasicBlock.
...
llvm-svn: 34111
2007-02-10 02:38:19 +00:00
Zhou Sheng
e93db8fba2
Eliminates friend function declaration inside APInt, instead, adds public
...
methods as those global function's internal implementation.
llvm-svn: 34083
2007-02-09 07:48:24 +00:00
Evan Cheng
92658d5648
Move SimplifySetCC to TargetLowering and allow it to be shared with legalizer.
...
llvm-svn: 34065
2007-02-08 22:13:59 +00:00
Chris Lattner
751a42010b
Rename CStringMap -> StringMap, since it now supports nul characters in the
...
strings.
llvm-svn: 34064
2007-02-08 19:20:57 +00:00
Chris Lattner
259ba20bd8
Allow cstringmap to contain strings with nul characters in them.
...
llvm-svn: 34062
2007-02-08 19:08:37 +00:00
Zhou Sheng
fbf61eaba7
As Chris and Reid suggested, remove "isSigned" field from APInt, instead,
...
add some signed/unsigned arithmetic operation functions into APInt.h to
handle the signed/unsigned issue. These functions will be defined inside a
namespace "APIntOps" which is inside llvm namespace.
llvm-svn: 34053
2007-02-08 14:35:19 +00:00
Bill Wendling
e796b6de45
Fixed comments.
...
llvm-svn: 34040
2007-02-08 06:05:08 +00:00
Bill Wendling
27361926d2
Added new method to finish up the addition of passes to emit files. This
...
allows us to split that method into two so that we can optionally call a
concrete function to add a writer. Removed moribund addObjectWriter()
method.
llvm-svn: 34030
2007-02-08 01:34:45 +00:00
Bill Wendling
6ea699e0fe
Declarations for functions that create different file writers.
...
llvm-svn: 34028
2007-02-08 01:31:38 +00:00
Bill Wendling
860ce1b82e
Moved from include/llvm/CodeGen to lib/CodeGen.
...
llvm-svn: 34027
2007-02-08 01:30:50 +00:00
Chris Lattner
ddfead20e8
move archive-specific stuff out of bcreader into archive library.
...
llvm-svn: 34022
2007-02-07 23:53:17 +00:00
Chris Lattner
d220dc1426
move an llvmc-specific function out of the bcreader into llvmc.
...
llvm-svn: 34021
2007-02-07 23:48:32 +00:00
Chris Lattner
a0e49f2ead
push bytecode decompressor out through APIs. Now the bytecode reader
...
api's look like this:
ModuleProvider *getBytecodeModuleProvider(
const std::string &Filename, ///< Name of file to be read
BCDecompressor_t *BCDC = Compressor::decompressToNewBuffer,
std::string* ErrMsg = 0, ///< Optional error message holder
BytecodeHandler* H = 0 ///< Optional handler for reader events
);
This is ugly, but allows a client to say:
getBytecodeModuleProvider("foo", 0);
If they do this, there is no dependency on the compression libraries, saving
codesize.
llvm-svn: 34012
2007-02-07 21:41:02 +00:00
Jim Laskey
2682ea616f
Automatically generating intrinsic declarations from Dan Gohman. Modified
...
to construct FunctionType in separate function, and, have getDeclaration
return a Function instead of a Constant.
llvm-svn: 34008
2007-02-07 20:38:26 +00:00
Lauro Ramos Venancio
9c89e2e548
Fix build error.
...
include/llvm/ADT/APInt.h:326: error: âassertâ was not declared in this scope
llvm-svn: 34002
2007-02-07 16:59:17 +00:00
Chris Lattner
426fff7b42
remove dead ivars.
...
llvm-svn: 33996
2007-02-07 07:33:02 +00:00
Chris Lattner
bbe7d71039
remove the handleVBR32/handleVBR64 callbacks. They are very fine-grained.
...
llvm-svn: 33994
2007-02-07 06:53:02 +00:00
Chris Lattner
88051b0fad
shrink vmcore by moving symbol table stripping support out of VMCore into
...
the one IPO pass that uses it.
llvm-svn: 33990
2007-02-07 06:22:45 +00:00
Chris Lattner
f5df4859cd
eliminate ValueSymbolTable::rename, it has no advantage over using remove+insert.
...
Make insert/remove assert if used incorrectly instead of returning a bool.
llvm-svn: 33988
2007-02-07 06:13:49 +00:00
Chris Lattner
7130bc2477
Make SymbolTable::insert, SymbolTable::remove and SymbolTable::rename private.
...
llvm-svn: 33987
2007-02-07 06:06:24 +00:00
Zhou Sheng
687a08d59c
As Chris suggested, fixed some problems. (This is the first part.)
...
llvm-svn: 33986
2007-02-07 05:58:38 +00:00
Chris Lattner
c8d5207b85
Eliminate the O(n) version of TypeSymbolTable::remove, it is dead. When
...
inserting a type into the type symbol table, only compute unique name if not
in symtab already.
llvm-svn: 33983
2007-02-07 05:35:58 +00:00
Chris Lattner
afd6f2f463
TypeSymbolTable::rename is dead, remove it
...
llvm-svn: 33982
2007-02-07 05:29:34 +00:00
Chris Lattner
260cfa99b2
eliminate std::vector's from the bchandler interface
...
llvm-svn: 33979
2007-02-07 05:09:50 +00:00
Chris Lattner
e346767f06
do not let the table fill up with tombstones.
...
llvm-svn: 33973
2007-02-07 01:11:25 +00:00
Chris Lattner
df0d5a1836
Fix a really subtle bug where the entire hash table could fill with
...
tombstones, causing subsequent insertions to infinitely loop.
llvm-svn: 33972
2007-02-07 00:55:59 +00:00
Jim Laskey
a9e7064774
Deemed too cute to live.
...
llvm-svn: 33964
2007-02-06 18:19:44 +00:00
Jim Laskey
5aed30d5cf
Support var arg intrinsics.
...
llvm-svn: 33962
2007-02-06 18:02:54 +00:00
Lauro Ramos Venancio
0e47295cf0
Fix build error.
...
UniqueVector.h:66: error: âassertâ was not declared in this scope
llvm-svn: 33961
2007-02-06 14:59:28 +00:00
Zhou Sheng
c43c1402ef
As Reid suggested, fixed some problems.
...
llvm-svn: 33954
2007-02-06 05:59:47 +00:00
Chris Lattner
de20c42da5
Simplify this a bit, add an assertion
...
llvm-svn: 33936
2007-02-05 23:24:48 +00:00
Chris Lattner
3d5c1e3fa7
StableBasicBlockNumbering is conceptually just a wrapper around UniqueVector,
...
so we should actually use a UniqueVector to implement it.
llvm-svn: 33935
2007-02-05 23:19:24 +00:00
Chris Lattner
51c0fb9e48
Const method must use const_iterator.
...
llvm-svn: 33933
2007-02-05 23:18:32 +00:00
Reid Spencer
0b843a34f4
For PR411:
...
Clean up the Module::getFunction interface. getMainFunction and
getNamedFunction are now gone. Just use getFunction instead.
llvm-svn: 33920
2007-02-05 21:17:06 +00:00
Reid Spencer
3aaaa0b2bd
For PR411:
...
This patch replaces the SymbolTable class with ValueSymbolTable which does
not support types planes. This means that all symbol names in LLVM must now
be unique. The patch addresses the necessary changes to deal with this and
removes code no longer needed as a result. This completes the bulk of the
changes for this PR. Some cleanup patches will follow.
llvm-svn: 33918
2007-02-05 20:47:22 +00:00
Zhou Sheng
85f9778f0b
Add a class APInt to represent arbitrary precision constant integral values.
...
It is a functional replacement for common case integer type like "unsigned",
"uint64_t", but also allows non-byte-width integer type and large integer
value types such as 3-bits, 15-bits, or more than 64-bits of precision. For
more details, see pr1043.
llvm-svn: 33913
2007-02-05 17:29:16 +00:00
Bill Wendling
4573a8f613
Use unsigned char& instead of std::vector<>::reference.
...
llvm-svn: 33896
2007-02-05 02:37:07 +00:00
Chris Lattner
19083a4671
switch the VRBaseMap in the scheduler from an std::map to a DenseMap. This
...
speeds up the isel pass from 2.5570s to 2.4722s on kc++ (3.4%).
llvm-svn: 33879
2007-02-04 08:47:20 +00:00
Chris Lattner
9af2c86bc8
Introduce new UnarySDNode/BinarySDNode/TernarySDNode nodes, which coallocate
...
their operands with the node itself. This reduces malloc traffic for operand
lists. This reduces isel time on kc++ from 2.6164 to 2.5570s, about 2.3%.
llvm-svn: 33878
2007-02-04 08:35:21 +00:00
Chris Lattner
69b02ab54c
Add a new SDNode ctor and InitOperands method. This allows the operands for
...
an SDNode to be allocated as part of the node itself, instead of being a
separate new[]'d object. Switch HandleSDNode, LoadSDNode, and StoreSDNode
to use this mechanism. This saves one heap allocation and free for each node
of this type that is allocated. This reduces isel time from 2.7638 to 2.6164s
on kc++, which is a 5.6% speedup.
llvm-svn: 33877
2007-02-04 08:13:53 +00:00
Chris Lattner
22639f3d90
eliminate the SDNode::setValueTypes method.
...
llvm-svn: 33876
2007-02-04 07:37:24 +00:00
Chris Lattner
f17b4222e2
eliminate a bunch of duplicate ctors and helper functions.
...
llvm-svn: 33875
2007-02-04 07:28:00 +00:00
Chris Lattner
edfc7e5fa2
move MorphNode to out of line and merge setNodeOperands into it. There is
...
no behavior or performance change here.
llvm-svn: 33869
2007-02-04 02:49:29 +00:00
Chris Lattner
3bf17b6fa5
simplify MorphNodeTo to take a VTList operand.
...
llvm-svn: 33868
2007-02-04 02:41:42 +00:00
Chris Lattner
486edfbc6f
eliminate some extraneous methods in SDNode
...
llvm-svn: 33867
2007-02-04 02:32:44 +00:00
Chris Lattner
20754cc579
Give each selectiondag node class a home for it's vtable and rtti info
...
llvm-svn: 33866
2007-02-04 02:23:32 +00:00
Chris Lattner
692457f107
add a version of insert that takes the key and value.
...
llvm-svn: 33856
2007-02-04 00:42:41 +00:00
Reid Spencer
3f4e6e84dc
For PR1163:
...
Make the Module's dependent library use a std::vector instead of SetVector
adjust #includes in .cpp files because SetVector.h is no longer included.
llvm-svn: 33855
2007-02-04 00:40:42 +00:00
Chris Lattner
09ec2c842a
Make SmallSetVector useful
...
llvm-svn: 33854
2007-02-04 00:30:40 +00:00
Chris Lattner
0732bec915
Various bugfixes
...
llvm-svn: 33848
2007-02-04 00:12:12 +00:00
Chris Lattner
2b2b6c6c97
Convert SetVector to be a true adapter class and add SmallSetVector.
...
llvm-svn: 33846
2007-02-03 23:56:03 +00:00
Reid Spencer
8de97bba5a
For PR1072:
...
Removing -raise has neglible positive or negative side effects so we are
opting to remove it. See the PR for comparison details.
llvm-svn: 33844
2007-02-03 23:15:56 +00:00
Chris Lattner
db83265e3c
8 buckets is way too small to start out with. This was only for testing.
...
llvm-svn: 33835
2007-02-03 19:30:48 +00:00
Chris Lattner
a025ab9fa8
remove a dead header
...
llvm-svn: 33820
2007-02-03 03:02:10 +00:00
Bill Wendling
f382ea30fd
Added GetTargetRelocation method.
...
llvm-svn: 33815
2007-02-03 02:38:57 +00:00
Bill Wendling
0ceb8bb770
Added some accessor methods.
...
llvm-svn: 33814
2007-02-03 02:38:15 +00:00
Bill Wendling
761d275c35
Moved MachORelocation to its own header file. Have a call through the
...
TargetMachOInfo object to the GetTargetRelocation method. Pass into it
non-Mach-O-specific parameters.
llvm-svn: 33813
2007-02-03 02:37:51 +00:00
Bill Wendling
98ea0ea39e
New file for the MachORelocation structure. It doesn't have to be tied to the
...
MachOWriter.h file.
llvm-svn: 33812
2007-02-03 02:36:17 +00:00
Chris Lattner
0a30b1f00f
switch the sched unit map over to use a DenseMap instead of std::map. This
...
speeds up isel as a whole time by 2.6%.
llvm-svn: 33810
2007-02-03 01:34:13 +00:00
Chris Lattner
1bfc7ab6a7
Switch inliner over to use DenseMap instead of std::map for ValueMap. This
...
speeds up the inliner 16%.
llvm-svn: 33801
2007-02-03 00:08:31 +00:00
Chris Lattner
f4af392bd9
silence annoying warning in release-asserts build
...
llvm-svn: 33797
2007-02-02 21:19:18 +00:00
Chris Lattner
1a49acad38
add find/erase, add const iterators, fix bugs in iterators.
...
llvm-svn: 33791
2007-02-02 20:34:32 +00:00
Chris Lattner
5b8ecfdb89
add iterators
...
llvm-svn: 33790
2007-02-02 19:27:13 +00:00
Reid Spencer
2341c22ec7
Changes to support making the shift instructions be true BinaryOperators.
...
This feature is needed in order to support shifts of more than 255 bits
on large integer types. This changes the syntax for llvm assembly to
make shl, ashr and lshr instructions look like a binary operator:
shl i32 %X, 1
instead of
shl i32 %X, i8 1
Additionally, this should help a few passes perform additional optimizations.
llvm-svn: 33776
2007-02-02 02:16:23 +00:00
Devang Patel
04bb891670
Pretty print pass managers.
...
llvm-svn: 33767
2007-02-01 22:10:12 +00:00
Jim Laskey
c3de9b4b14
Support for non-landing pad exception handling.
...
llvm-svn: 33755
2007-02-01 16:31:34 +00:00
Reid Spencer
e15a8b7a55
Fix a homonymo in a comment.
...
llvm-svn: 33754
2007-02-01 12:09:51 +00:00
Anton Korobeynikov
1b4e6015b4
Fixed uninitialized stuff inside LegalizeDAG. Fortunately, the only
...
affected part is codegen of "memove" inside x86 backend. This fixes
PR1144
llvm-svn: 33752
2007-02-01 08:39:52 +00:00
Chris Lattner
8001a63281
Add a new dense hash table implementation
...
llvm-svn: 33751
2007-02-01 07:49:59 +00:00
Chris Lattner
1003dc72b4
rename DenseMap to IndexedMap.
...
llvm-svn: 33749
2007-02-01 05:32:05 +00:00
Chris Lattner
dcdfa788b1
rename DenseMap -> IndexedMap.
...
llvm-svn: 33748
2007-02-01 05:28:10 +00:00
Devang Patel
df4e992af8
Add printVersion(). Linker can use it to print LLVM version number.
...
llvm-svn: 33738
2007-02-01 01:46:06 +00:00
Devang Patel
9eb2caaeb6
Add PrintVersionMessage() that tools can use to print version number
...
without exiting program.
llvm-svn: 33737
2007-02-01 01:43:37 +00:00
Chris Lattner
245ed94b76
add missing ctor
...
llvm-svn: 33714
2007-01-31 20:08:34 +00:00
Chris Lattner
79807c3dfe
implement the new GEP instruction ctors.
...
llvm-svn: 33708
2007-01-31 19:47:18 +00:00
Evan Cheng
53026f1d5a
Allow the target to override the ISD::CondCode that's to be used to test the
...
result of the comparison libcall against zero.
llvm-svn: 33701
2007-01-31 09:29:11 +00:00
Evan Cheng
98aa8cbf4e
Added O_F32 and O_64 in addition to UO_F32 and UO_64 even though by
...
default they call the same libgcc routine. The result of the calls are
"tested" differently.
llvm-svn: 33700
2007-01-31 09:26:31 +00:00
Chris Lattner
64488b1cc3
Revise APIs for creating constantexpr GEPs to not require the use of
...
vectors. This allows us to eliminate many temporary vectors, and their
associated malloc/free pairs.
llvm-svn: 33691
2007-01-31 04:39:29 +00:00
Chris Lattner
86e359e5cb
Make this a *real* header:
...
1. Remove using namespace llvm;
2. Remove unneeded #includes.
3. Add #include guard.
Also add prototypes for new code moved from transformutils to libanalysis.
llvm-svn: 33682
2007-01-30 23:47:35 +00:00
Chris Lattner
ec84c162d8
move constant folding code out of Utils/Local into libanalysis
...
llvm-svn: 33681
2007-01-30 23:46:43 +00:00
Chris Lattner
ad84a730ba
The inliner/cloner can now optionally take TargetData info, which can be
...
used by constant folding.
llvm-svn: 33676
2007-01-30 23:22:39 +00:00
Chris Lattner
1e6cf2ee3c
Change constant folding APIs to take an optional TargetData, and change
...
ConstantFoldInstOperands/ConstantFoldCall to take a pointer to an array
of operands + size, instead of an std::vector.
llvm-svn: 33669
2007-01-30 23:12:47 +00:00
Reid Spencer
5301e7c605
For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoid
...
confusion with external linkage types.
llvm-svn: 33663
2007-01-30 20:08:39 +00:00
Reid Spencer
3a0bbb0a4d
Compaction tables no longer supported, remove its block ID.
...
llvm-svn: 33662
2007-01-30 19:37:26 +00:00
Jim Laskey
ee23de6c36
Out of line function.
...
llvm-svn: 33641
2007-01-29 23:40:33 +00:00
Jim Laskey
3f9f250928
Only gather frame info if debug or eh.
...
llvm-svn: 33639
2007-01-29 23:20:22 +00:00
Devang Patel
1c3633e461
- Undo previous check-in (i.e. Do not export TimingInfo class through
...
PassManagers.h).
- Add StopPassTimer() and StartPassTimer() to expose TimingInfo to
CallGraphPassManager
- Use these two APIs in CalLgraphPassManager to measure timings.
llvm-svn: 33638
2007-01-29 23:10:37 +00:00
Nate Begeman
eda5997cc8
Finish off bug 680, allowing targets to custom lower frame and return
...
address nodes.
llvm-svn: 33636
2007-01-29 22:58:52 +00:00
Nate Begeman
2a562ba47b
Properly support cstrings
...
llvm-svn: 33629
2007-01-29 21:20:42 +00:00
Jim Laskey
d1154860a4
Flag to control exception handling.
...
llvm-svn: 33628
2007-01-29 20:48:32 +00:00
Devang Patel
55bcb50840
Move TimingInfo into PassManagers.h so that other libs can use it.
...
llvm-svn: 33626
2007-01-29 20:06:26 +00:00
Jim Laskey
b4a2f05d1c
Landing pad-less eh for PPC.
...
llvm-svn: 33622
2007-01-29 18:51:14 +00:00
Reid Spencer
34dbbca483
IntrinsicLowering now requires TargetData.
...
llvm-svn: 33617
2007-01-29 17:39:50 +00:00
Anton Korobeynikov
6843149863
Make doxygen happy
...
llvm-svn: 33609
2007-01-29 00:09:00 +00:00
Reid Spencer
326bf785a2
Adjust a comment to reflect reality.
...
llvm-svn: 33607
2007-01-28 22:26:42 +00:00
Anton Korobeynikov
037c867b54
Propagate changes from my local tree. This patch includes:
...
1. New parameter attribute called 'inreg'. It has meaning "place this
parameter in registers, if possible". This is some generalization of
gcc's regparm(n) attribute. It's currently used only in X86-32 backend.
2. Completely rewritten CC handling/lowering code inside X86 backend.
Merged stdcall + c CCs and fastcall + fast CC.
3. Dropped CSRET CC. We cannot add struct return variant for each
target-specific CC (e.g. stdcall + csretcc and so on).
4. Instead of CSRET CC introduced 'sret' parameter attribute. Setting in
on first attribute has meaning 'This is hidden pointer to structure
return. Handle it gently'.
5. Fixed small bug in llvm-extract + add new feature to
FunctionExtraction pass, which relinks all internal-linkaged callees
from deleted function to external linkage. This will allow further
linking everything together.
NOTEs: 1. Documentation will be updated soon.
2. llvm-upgrade should be improved to translate csret => sret.
Before this, there will be some unexpected test fails.
llvm-svn: 33597
2007-01-28 13:31:35 +00:00
Chris Lattner
c56fd7fe0f
provide a definition for uintptr_t
...
llvm-svn: 33592
2007-01-27 23:52:33 +00:00
Chris Lattner
107cba6102
Make SmallSet<whatever*, N> faster by transparently implementing it with
...
SmallPtrSet. Some clients will need to use SmallPtrSet directly though if
they need to iterate over the set.
llvm-svn: 33584
2007-01-27 08:20:15 +00:00
Chris Lattner
c4f9d11c32
add some missing API
...
llvm-svn: 33583
2007-01-27 08:19:03 +00:00
Chris Lattner
084a169d49
Give SmallSet a reasonable fallback if it gets large: use an std::set.
...
llvm-svn: 33582
2007-01-27 08:14:53 +00:00
Chris Lattner
39ab70cf80
implement SmallPtrSet::erase
...
llvm-svn: 33581
2007-01-27 07:59:10 +00:00
Chris Lattner
030a2dcc1e
Fix a limitation of SmallPtrSet. Before it would assert if the smallsize
...
was not a power of two. Now it rounds up to the next power of two internally.
llvm-svn: 33580
2007-01-27 07:52:27 +00:00
Chris Lattner
498f00a26a
add some comments on the algorithm
...
llvm-svn: 33579
2007-01-27 07:24:51 +00:00
Chris Lattner
74102df857
Add a new SmallSet ADT specialized for pointers.
...
llvm-svn: 33577
2007-01-27 07:10:46 +00:00
Reid Spencer
679004e719
Add some comments, fix an 80 cols violation.
...
llvm-svn: 33576
2007-01-27 04:42:50 +00:00
Bill Wendling
a9167da9bb
Accessor for the TargetELFWriterInfo class object.
...
llvm-svn: 33572
2007-01-27 02:55:04 +00:00
Bill Wendling
2ee13a0881
The TargetELFWriterInfo class holds target-specific information for the ELF writer.
...
llvm-svn: 33570
2007-01-27 02:53:50 +00:00
Chris Lattner
672a31c835
simplify insert interface
...
llvm-svn: 33567
2007-01-27 02:13:58 +00:00
Chris Lattner
33aba834e5
clean up comment
...
llvm-svn: 33566
2007-01-27 01:14:20 +00:00
Nate Begeman
f209495e93
Handle multiple functions, properly mangle symbols, and fix support for
...
scattered relocations.
llvm-svn: 33555
2007-01-26 22:39:48 +00:00
Chris Lattner
1ac3256c22
fit in 80 cols
...
llvm-svn: 33553
2007-01-26 21:48:40 +00:00
Jim Laskey
5a1df9748b
rename files
...
llvm-svn: 33552
2007-01-26 21:38:26 +00:00
Jim Laskey
c56315c2b5
Change the MachineDebugInfo to MachineModuleInfo to better reflect usage
...
for debugging and exception handling.
llvm-svn: 33550
2007-01-26 21:22:28 +00:00
Jim Laskey
f9e5445ed4
Make LABEL a builtin opcode.
...
llvm-svn: 33537
2007-01-26 14:34:52 +00:00
Reid Spencer
6a8d4eab6a
For PR761:
...
BCReader no longer has a header that contains the endinanness and
pointer size. It's been replaced by datalayout field.
llvm-svn: 33528
2007-01-26 08:09:01 +00:00
Reid Spencer
1743debcf2
For PR761:
...
Remove the setEndiannes and setPointerSize methods. These are now set
through the setDataLayout method.
llvm-svn: 33526
2007-01-26 08:07:01 +00:00