Chris Lattner
536a465ceb
Change the signature of replaceUsesOfWithOnConstant to take a Use* and not
...
take the bool. The bool is always true dynamically.
llvm-svn: 23625
2005-10-04 18:12:13 +00:00
Chris Lattner
92616caa1a
Split SimpleConstantVal up into its components, so each Constant subclass gets
...
a different enum value. This allows 'classof' for these to be really simple,
not needing to call getType() anymore.
This speeds up isa/dyncast/etc for constants, and also makes them smaller.
For example, the text section of a release build of InstCombine.cpp shrinks
from 230037 bytes to 216363 bytes, a 6% reduction.
llvm-svn: 23466
2005-09-27 06:08:32 +00:00
Chris Lattner
808a5d8750
Add long-overdue helpers for getting constants with known upper bits
...
llvm-svn: 23426
2005-09-24 22:57:28 +00:00
Jim Laskey
5f57048c62
Move code dependency for MathExtras.h out of Constants.h.
...
llvm-svn: 22840
2005-08-17 20:06:22 +00:00
Jim Laskey
61e3d7bca5
Culling out use of unions for converting FP to bits and vice versa.
...
llvm-svn: 22838
2005-08-17 19:34:49 +00:00
Misha Brukman
3f0aa3dbf8
Remove trailing whitespace
...
llvm-svn: 21408
2005-04-21 20:19:05 +00:00
Alkis Evlogimenos
19bea8930f
Add new function getPtrPtrFromArrayPtr().
...
llvm-svn: 20684
2005-03-19 11:40:31 +00:00
Chris Lattner
9b289130f7
Eliminate the explicit opcode field in ConstantExpr, using the SubclassData
...
field to hold it instead. This shrinks memory usage for 176.gcc from
57628728 to 57598144 bytes, a small reduction of about 30K.
llvm-svn: 20047
2005-02-05 02:00:12 +00:00
Chris Lattner
d8266ae3dd
Adjust to changes in the User class.
...
llvm-svn: 19888
2005-01-29 00:33:00 +00:00
Chris Lattner
79c3a57af7
Change this method to return ulong, not uint, for 64-bit targets.
...
llvm-svn: 18906
2004-12-13 19:48:51 +00:00
Alkis Evlogimenos
f57d029464
Use getOperand() and remove getElementAt() function.
...
llvm-svn: 18612
2004-12-08 03:45:20 +00:00
Alkis Evlogimenos
806fb993fe
Add accessors for Constants in a ConstantStruct.
...
llvm-svn: 18550
2004-12-05 20:09:18 +00:00
Misha Brukman
dd92de83ca
Fix grammar in comments to getSizeOf()
...
llvm-svn: 17200
2004-10-24 03:18:30 +00:00
Alkis Evlogimenos
75aa7bdf21
Improve comments and wrap to 80 columns.
...
llvm-svn: 17198
2004-10-24 03:01:32 +00:00
Alkis Evlogimenos
a893aad8fb
Add ConstantExpr::getSizeOf(Type*).
...
llvm-svn: 17196
2004-10-24 01:41:10 +00:00
Chris Lattner
1217610926
Add new UndefValue class
...
llvm-svn: 17035
2004-10-16 18:05:25 +00:00
Chris Lattner
aa3facb3fe
Update doco, make doxygen more, use standard dividers.
...
llvm-svn: 16948
2004-10-13 04:44:53 +00:00
Chris Lattner
63ba63bb56
Allow creation of GEP constantexprs with a vector of value* operands as
...
well as a vector of constant*'s. It turns out that this is more efficient
and all of the clients want to do that, so we should cater to them.
llvm-svn: 16923
2004-10-11 22:52:25 +00:00
Reid Spencer
c4abcbefb1
Changes For Bug 352
...
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.
llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Brian Gaeke
01636f4e0f
Packed types, brought to you by Brad Jones
...
llvm-svn: 15938
2004-08-20 06:00:58 +00:00
Chris Lattner
c53f15303d
Move method out of line
...
llvm-svn: 15497
2004-08-04 18:49:52 +00:00
Alkis Evlogimenos
f846e483bb
Remove uneeded getValues() functions.
...
llvm-svn: 15488
2004-08-04 08:47:21 +00:00
Chris Lattner
a81b270e18
Add a special version of getType for ConstantPointerNull, exposing the fact
...
that all Null pointers have pointer type
llvm-svn: 15458
2004-08-04 02:42:17 +00:00
Misha Brukman
ab7bc6af0d
Convert tabs to spaces; fix name of function in assert() description.
...
llvm-svn: 15009
2004-07-19 21:11:45 +00:00
Chris Lattner
5a4eaff632
inline classof implementations, eliminate use of virtual methods.
...
classof<ConstantXXX> is now MUCH faster than it used to be.
llvm-svn: 14986
2004-07-19 00:58:47 +00:00
Reid Spencer
51fd2506ad
****** ABOLISH ConstantPointerRef *****
...
llvm-svn: 14919
2004-07-17 23:26:57 +00:00
Chris Lattner
10686c55cc
Add a helper method. The StructType element is completely redundant in most
...
cases
llvm-svn: 14777
2004-07-12 20:36:08 +00:00
Chris Lattner
3a8e3bce6c
Make ConstantBool act like a 1 bit ConstantInt, in order to simplify client
...
code. Patch contributed by Vladimir Prus.
llvm-svn: 14280
2004-06-21 12:12:12 +00:00
Chris Lattner
0185a86e38
Add some helpers
...
llvm-svn: 13737
2004-05-25 05:32:13 +00:00
Chris Lattner
eb1caeca2a
Add ConstantExpr::get(Sign|Zero)Extend methods
...
llvm-svn: 12648
2004-04-04 23:20:30 +00:00
Chris Lattner
7f5d56b43a
Add a bunch of methods that should have been added a long time ago.
...
llvm-svn: 12526
2004-03-29 02:37:53 +00:00
Chris Lattner
e77ff566cb
Add support for select constant exprs
...
llvm-svn: 12309
2004-03-12 05:50:39 +00:00
Chris Lattner
363cd9e4b8
Add a new ConstantAggregateZero class, to fix PR239. This makes zero
...
initializers for constant structs and arrays take constant space, instead of
space proportinal to the number of elements. This reduces the memory usage of
the LLVM compiler by hundreds of megabytes when compiling some nasty SPEC95
benchmarks.
llvm-svn: 11470
2004-02-15 05:53:04 +00:00
Chris Lattner
0f819b9523
ConstantArray::get and ConstantStruct::get now just return pointers to
...
'Constant', instead of specific subclass pointers. In the future, these will
return an instance of ConstantAggregateZero if all of the inputs are zeros.
llvm-svn: 11467
2004-02-15 04:14:47 +00:00
Chris Lattner
f5812885e3
Correct the method I just added to actually return false sometimes
...
llvm-svn: 11069
2004-02-02 18:53:04 +00:00
Chris Lattner
990f40f069
Add a new method to ConstantFP
...
llvm-svn: 11068
2004-02-02 18:40:29 +00:00
Chris Lattner
7e93bb1d9e
The first half of a fix for PR218 & test/Regression/Assembler/2004-02-01-NegativeZero.llx
...
llvm-svn: 11063
2004-02-01 22:48:09 +00:00
Chris Lattner
599ab961c4
Add new ConstantArray::isString(), as the conditions for using getString()
...
are complex enough to check that it should be a seperate method.
While I'm here, improve ConstantArray::getNullValue a bit, though the
FIXME is still quite valid.
llvm-svn: 10850
2004-01-14 17:06:21 +00:00
Chris Lattner
cf1d9df549
The getShift method is no obsolete
...
llvm-svn: 10797
2004-01-12 19:37:26 +00:00
Chris Lattner
1f762c7571
The ConstantPointer class is now gone.
...
llvm-svn: 10057
2003-11-17 19:47:21 +00:00
Chris Lattner
9995768f47
Fixes for PR114: Thanks to Reid Spencer!
...
llvm-svn: 10029
2003-11-16 20:21:15 +00:00
Brian Gaeke
d25f86d683
Put all LLVM code into the llvm namespace, as per bug 109.
...
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
John Criswell
16c6cda9d5
Added LLVM copyright header (for lack of a better term).
...
llvm-svn: 9304
2003-10-20 20:19:47 +00:00
Chris Lattner
cb5dd5ba25
Add some new methods to forward to
...
llvm-svn: 8852
2003-10-05 00:13:28 +00:00
Chris Lattner
2e3f124f10
These methods are dead, remove them
...
llvm-svn: 8839
2003-10-03 18:39:40 +00:00
Chris Lattner
4e4c763dfc
Standardize header file comments
...
llvm-svn: 8782
2003-09-30 18:37:50 +00:00
Chris Lattner
51f4550b50
Allow for "unsafe" replaceAllUsesWith operatations, for use during type resolution
...
llvm-svn: 8208
2003-08-29 05:36:05 +00:00
Chris Lattner
913c260d94
Add more doxygen comments, add new ConstantInt::getRawValue method
...
llvm-svn: 7244
2003-07-23 14:49:06 +00:00
Chris Lattner
6c12776232
Remove a ton of extraneous #includes
...
llvm-svn: 6842
2003-06-22 03:08:05 +00:00
John Criswell
4781723de6
Included assert.h so that the code compiles under newer versions of GCC.
...
llvm-svn: 6682
2003-06-11 14:01:36 +00:00