Reid Spencer
564f193ad0
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
b5e0b0bc5e
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
e4da6fa801
Use std::deque to manage loop queue inside LPPassManager.
...
llvm-svn: 34943
2007-03-06 02:30:46 +00:00
Devang Patel
45343b04b3
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
edbde240be
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
c52174dee3
Add the emms intrinsic for MMX support.
...
llvm-svn: 34938
2007-03-05 23:09:45 +00:00
Reid Spencer
5ecf7f6214
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
79495d839e
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
6668a341ae
Avoid constructing std::strings unless pass debugging is ON.
...
llvm-svn: 34933
2007-03-05 20:01:30 +00:00
Jeff Cohen
84d84f7381
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
b6d1ac8682
Correct the calculation in APInt::logBase2().
...
llvm-svn: 34929
2007-03-05 16:42:58 +00:00
Jeff Cohen
b58af23ff3
Elminate tabs and improve comments.
...
llvm-svn: 34921
2007-03-05 00:46:22 +00:00
Jeff Cohen
98c99a3a02
Unbreak VC++ build.
...
llvm-svn: 34917
2007-03-05 00:00:42 +00:00
Chris Lattner
7fdddda045
add a getSignBit method, elimiante virtual method from getBitMask()
...
llvm-svn: 34916
2007-03-04 23:33:19 +00:00
Chris Lattner
69aafa4be8
fix 80 col violations, mark arrays static
...
llvm-svn: 34915
2007-03-04 23:33:03 +00:00
Chris Lattner
295b3d69b1
add a new node
...
llvm-svn: 34912
2007-03-04 20:40:06 +00:00
Chris Lattner
2510829eba
add iterator range version of ctor.
...
llvm-svn: 34899
2007-03-04 04:04:43 +00:00
Reid Spencer
cdb5aa2805
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
e96b55e61f
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
e2bf55dfe8
Regularize the interface for conversion functions to/from float/double.
...
llvm-svn: 34881
2007-03-03 08:34:02 +00:00
Reid Spencer
36fb227e99
Add APIntVal as a possible GenericeValue.
...
llvm-svn: 34879
2007-03-03 07:36:44 +00:00
Reid Spencer
503dda5840
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
47b01d6acb
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
e5244b132b
Add isPositive for symmetry with isNegative.
...
llvm-svn: 34862
2007-03-03 00:24:39 +00:00
Anton Korobeynikov
af46a0e4a2
Fix uninitialized use of variable. Remove tabs and fix identation.
...
llvm-svn: 34850
2007-03-02 22:19:41 +00:00
Chris Lattner
68244ce570
Fix PR1234 by working around a compiler bug.
...
llvm-svn: 34845
2007-03-02 18:16:29 +00:00
Owen Anderson
6d3b179de3
Fix a typo.
...
llvm-svn: 34836
2007-03-02 05:03:07 +00:00
Evan Cheng
44257955c8
Make it 64-bit safe.
...
llvm-svn: 34829
2007-03-02 02:31:37 +00:00
Reid Spencer
53a673b3ed
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
d86182b19b
Add an abs() function to get the absolute value.
...
llvm-svn: 34819
2007-03-01 23:37:09 +00:00
Reid Spencer
c5d33cef76
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
ee77d22f26
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
2ce72a4bd8
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
070c37407c
Use GCC intrinsics when available, and use smarter fallbacks when not.
...
llvm-svn: 34812
2007-03-01 21:16:30 +00:00
Reid Spencer
003170430b
Add doubleToBits and floatToBits methods.
...
llvm-svn: 34807
2007-03-01 20:39:01 +00:00
Jim Laskey
73e3ad1b10
Collect eh filter info.
...
llvm-svn: 34804
2007-03-01 20:25:32 +00:00
Jim Laskey
88c98a4128
Add eh filter intrinsic.
...
llvm-svn: 34801
2007-03-01 20:23:39 +00:00
Reid Spencer
90b6227b81
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
b4e877c488
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
6a95676875
Add methods for bit width modification: sextOrTrunc, zextOrTrunc.
...
llvm-svn: 34789
2007-03-01 17:15:32 +00:00
Evan Cheng
0aa68b9246
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
3f3487918c
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
cbbf9aa6b0
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
b6dd32889e
Add a square root function.
...
llvm-svn: 34775
2007-03-01 05:39:56 +00:00
Reid Spencer
32d0051c64
Reduce #includage by taking a method out of line.
...
llvm-svn: 34774
2007-03-01 04:02:06 +00:00
Reid Spencer
4937dcdf1f
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
b2afac27e9
Clean up interface.
...
llvm-svn: 34769
2007-03-01 02:18:06 +00:00
Evan Cheng
d1fa618990
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
0c89fbb835
MachineBasicBlock fields should not be public.
...
llvm-svn: 34766
2007-03-01 02:00:40 +00:00
Reid Spencer
f119927a6f
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