Alkis Evlogimenos
23e565484a
Gep indices must be of int, uint, long or ulong type.
...
llvm-svn: 17313
2004-10-28 06:43:38 +00:00
Alkis Evlogimenos
ba28dc8c54
Make this actually work.
...
llvm-svn: 17199
2004-10-24 03:02:16 +00:00
Alkis Evlogimenos
da5de05b9b
Add ConstantExpr::getSizeOf(Type*).
...
llvm-svn: 17196
2004-10-24 01:41:10 +00:00
Chris Lattner
d5f67d8ca6
Implement UndefValue class
...
llvm-svn: 17040
2004-10-16 18:07:16 +00:00
Chris Lattner
13128ab8fb
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
Alkis Evlogimenos
0507ffebb1
When creating constant arrays check that the initializer vector is the
...
same size as the one in the array type.
llvm-svn: 16354
2004-09-15 02:32:15 +00:00
Alkis Evlogimenos
cb031d9518
Add assertion descriptiosn on type mismatches when creating
...
ConstantArray and ConstantPacked objects.
llvm-svn: 16261
2004-09-10 04:16:59 +00:00
Reid Spencer
7c16caa336
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
0220904e7a
Packed types, brought to you by Brad Jones
...
llvm-svn: 15938
2004-08-20 06:00:58 +00:00
Chris Lattner
caf3f3e970
Check constant expression validity more strictly
...
llvm-svn: 15883
2004-08-17 17:28:46 +00:00
Chris Lattner
20a4dab308
Add a hack to work around a problem my changes exposed
...
llvm-svn: 15509
2004-08-04 22:26:13 +00:00
Chris Lattner
29ca2c6f7a
Fix a latent bug exposed by my recent changes
...
llvm-svn: 15498
2004-08-04 18:50:09 +00:00
Alkis Evlogimenos
f0cc814974
Stop using getValues().
...
llvm-svn: 15482
2004-08-04 08:02:59 +00:00
Chris Lattner
3e650aff8b
Implement a FIXME, by not searching linearly through a map to remove an
...
element. This speeds up the bytecode reader from 12.86s to 8.72s on 252.eon.
llvm-svn: 15463
2004-08-04 04:48:01 +00:00
Misha Brukman
63b38bd2ed
Fix #includes of i*.h => Instructions.h as per PR403.
...
llvm-svn: 15334
2004-07-29 17:30:56 +00:00
Chris Lattner
5230e70834
classof implementations are now inlined
...
llvm-svn: 14987
2004-07-19 00:59:10 +00:00
Reid Spencer
1ebe1abe22
bug 122:
...
- Replace ConstantPointerRef usage with GlobalValue usage
- Minimize redundant isa<GlobalValue> usage
- Correct isa<Constant> for GlobalValue subclass
- Delete ConstantPointerRef member function implementations
llvm-svn: 14928
2004-07-17 23:48:33 +00:00
Chris Lattner
d6108ca27e
implement new helper method
...
llvm-svn: 14776
2004-07-12 20:35:11 +00:00
Reid Spencer
cf394bf2d5
#include <iostream> since its not in Value.h any more.
...
llvm-svn: 14614
2004-07-04 11:51:24 +00:00
Chris Lattner
265eb6469a
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
6b7275996c
Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
...
llvm-svn: 14201
2004-06-17 18:19:28 +00:00
Chris Lattner
74248512eb
Workaround or a VS miscompilation bug
...
llvm-svn: 14078
2004-06-08 23:21:39 +00:00
Chris Lattner
42d5b0878b
Delete some unreachable code
...
llvm-svn: 14031
2004-06-04 23:52:36 +00:00
Chris Lattner
db8bdba593
Implement some helpers
...
llvm-svn: 13738
2004-05-25 05:32:43 +00:00
Chris Lattner
dd28474610
Add ConstantExpr::get(Sign|Zero)Extend methods
...
llvm-svn: 12648
2004-04-04 23:20:30 +00:00
Chris Lattner
467cb2bc5d
Add support for constant expr casts
...
llvm-svn: 12564
2004-03-31 02:56:11 +00:00
Chris Lattner
b7897ce431
Fix a latent bug in select constantexpr handling that was broke 253.perlbmk
...
llvm-svn: 12562
2004-03-30 22:51:03 +00:00
Chris Lattner
3cdc27c868
Handle -0.0 correctly
...
llvm-svn: 12530
2004-03-29 19:51:24 +00:00
Chris Lattner
817175f883
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
6e415c06c2
Add support for select constant expressions. Use reserve a bit more to avoid
...
memory wasteage.
llvm-svn: 12323
2004-03-12 05:54:04 +00:00
Chris Lattner
9f4918ab93
Eliminate nightmarish API
...
llvm-svn: 12214
2004-03-08 06:11:10 +00:00
Chris Lattner
04b60fe5ad
Move the folding of gep null, 0, 0, 0 to a place where it can be shared and
...
enjoyed by all, fixing a fixme. Add an assert
llvm-svn: 11505
2004-02-16 20:46:13 +00:00
Chris Lattner
9fba3da879
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
015e821279
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
37a716fa80
Remove dependence on return type of ConstantStruct::get
...
llvm-svn: 11466
2004-02-15 04:07:32 +00:00
Chris Lattner
c75bf528c1
Remove dependence on the return type of ConstantArray::get
...
llvm-svn: 11463
2004-02-15 04:05:58 +00:00
Chris Lattner
5d56c478ba
Keep a cache of non-abstract null arrays and structs. This speeds up llvm-dis
...
from 16.57 -> 13.46s on 129.compress.
llvm-svn: 11462
2004-02-15 02:46:46 +00:00
Chris Lattner
ac6db755c3
Adjust to the changed StructType interface. In particular, getElementTypes() is gone.
...
llvm-svn: 11228
2004-02-09 04:37:31 +00:00
Chris Lattner
ac80ea4970
Second half of a fix for PR218 & test/Regression/Assembler/2004-02-01-NegativeZero.llx.
...
Basically we store floating point values as their integral components, instead of relying
on the semantics of floating point < to differentiate between values. This is likely to
make the map search be faster anyway.
llvm-svn: 11064
2004-02-01 22:49:04 +00:00
Chris Lattner
241ed4c500
Fix a problem brian ran into with the bytecode reader asserting. It turns
...
out that the problem was actually the writer writing out a 'null' value
because it didn't normalize it. This fixes:
test/Regression/Assembler/2004-01-22-FloatNormalization.ll
llvm-svn: 10967
2004-01-23 00:55:21 +00:00
Chris Lattner
e8701f690f
Fix bug in previous checkin: Demorgan would be ashamed of me, I need to
...
lay off the crack.
llvm-svn: 10855
2004-01-14 17:51:53 +00:00
Chris Lattner
e8dfccaabd
Implement ConstantArray::isString
...
llvm-svn: 10851
2004-01-14 17:06:38 +00:00
Chris Lattner
5a945e3616
Rename ConstantHandling.* -> ConstantFolding.*
...
Move a bunch of (now) private stuff from ConstantFolding.h into
ConstantFolding.cpp.
This _finally_ gets us to a place where we have a sane constant folder. The
rules are:
1. LLVM clients now use ConstantExpr::get* methods to fold constants. If they
cannot be folded, a constantexpr is created, so these methods always return
valid Constant*'s.
2. The implementation of ConstantExpr::get* uses the functions exposed by
ConstantFolding.h to try to fold constants. If they cannot be folded,
they should return a null pointer.
3. The implementation of ConstantFolding can do whatever it wants, and only
has one client (Constants.cpp)
This cuts down on the wierd dependencies, and eliminates the two interfaces.
The old constanthandling interface was especially bad for clients to use
because almost none of them took the failure condition into consideration,
thus leading to obscure problems.
llvm-svn: 10807
2004-01-12 21:13:12 +00:00
Chris Lattner
2361bd02a1
Move ConstantHandling.h into lib/VMCore and out of include/llvm
...
llvm-svn: 10805
2004-01-12 20:48:11 +00:00
Chris Lattner
0bba771f49
Eliminate ConstantFoldShiftInstruction reference
...
llvm-svn: 10801
2004-01-12 20:40:42 +00:00
Chris Lattner
9eb2b527ad
Fix out of date comment, remove use of ConstantExpr::getShift
...
llvm-svn: 10794
2004-01-12 19:12:58 +00:00
Chris Lattner
5645e8a82d
Make ConstantExpr::get work for shifts as well
...
llvm-svn: 10790
2004-01-12 19:04:55 +00:00
Chris Lattner
189d19fb04
Finegrainify namespacification
...
llvm-svn: 10131
2003-11-21 20:23:48 +00:00
Chris Lattner
e120a73166
The ConstantPointer class is now gone.
...
llvm-svn: 10057
2003-11-17 19:47:21 +00:00
Brian Gaeke
960707c335
Put all LLVM code into the llvm namespace, as per bug 109.
...
llvm-svn: 9903
2003-11-11 22:41:34 +00:00