Commit Graph

124 Commits

Author SHA1 Message Date
Reid Spencer f064bb2617 Fix a typo in an assertion comment.
Patch contributed by Vladimir Merzliakov.

llvm-svn: 20529
2005-03-09 15:19:41 +00:00
Chris Lattner cdb9bfc150 remove all of the various setName implementations, consolidating them into
Value::setName, which is no longer virtual.

llvm-svn: 20464
2005-03-05 19:51:50 +00:00
Chris Lattner cc77b84fcb Constants never get names.
llvm-svn: 20459
2005-03-05 19:01:59 +00:00
Chris Lattner d0df99ce86 Adjust to changes in User class. Aggregate constants now must explicitly
manage their operands.

llvm-svn: 19890
2005-01-29 00:34:39 +00:00
Misha Brukman 3852f652bf Fix grammar
llvm-svn: 19854
2005-01-27 06:46:38 +00:00
Chris Lattner 1ece6f83ba Allow getZeroExtend and getSignExtend to work with boolean inputs.
llvm-svn: 19210
2005-01-01 15:59:57 +00:00
Chris Lattner acc4e54552 Change this method to return ulong, not uint, for 64-bit targets.
llvm-svn: 18906
2004-12-13 19:48:51 +00:00
Reid Spencer b95f8ab3ef Revert the recent patches to "fix" ConstantFP::isValueValidForType. None
of them seem to work everywhere.

llvm-svn: 18598
2004-12-07 07:38:08 +00:00
Reid Spencer ae056bdd36 Provide a missing header file.
llvm-svn: 18597
2004-12-07 07:08:08 +00:00
Reid Spencer 744d95e8c7 Fix some comments.
llvm-svn: 18596
2004-12-07 07:06:47 +00:00
Alkis Evlogimenos 2b91842092 Fix check for valid floats. Also use and HUGE_VALF instead
of std::numeric_limits, because they work in more platforms.

llvm-svn: 18593
2004-12-07 06:46:50 +00:00
Reid Spencer a8288d93ae For PR409: \
Test the range of float constants to ensure we are not attempting to create a \
float constant using a double value that is out of range for a float

llvm-svn: 18585
2004-12-06 22:18:37 +00:00
Chris Lattner 99a669b110 Add hooks to free all memory allocated by the singleton factories in these
files.  Patch contributed by Morten Ofstad!

llvm-svn: 17995
2004-11-19 16:39:44 +00:00
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