1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

98 Commits

Author SHA1 Message Date
Chris Lattner
100d0875ba 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
58104df77b Fix #includes of i*.h => Instructions.h as per PR403.
llvm-svn: 15334
2004-07-29 17:30:56 +00:00
Chris Lattner
6dbdddfa28 classof implementations are now inlined
llvm-svn: 14987
2004-07-19 00:59:10 +00:00
Reid Spencer
56e2bed436 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
3f023d6df9 implement new helper method
llvm-svn: 14776
2004-07-12 20:35:11 +00:00
Reid Spencer
abf33934d2 #include <iostream> since its not in Value.h any more.
llvm-svn: 14614
2004-07-04 11:51:24 +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
0cd29ae2cd Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
llvm-svn: 14201
2004-06-17 18:19:28 +00:00
Chris Lattner
6a6148fda0 Workaround or a VS miscompilation bug
llvm-svn: 14078
2004-06-08 23:21:39 +00:00
Chris Lattner
f6950439d6 Delete some unreachable code
llvm-svn: 14031
2004-06-04 23:52:36 +00:00
Chris Lattner
84431acbf1 Implement some helpers
llvm-svn: 13738
2004-05-25 05:32:43 +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
5a789b5e06 Add support for constant expr casts
llvm-svn: 12564
2004-03-31 02:56:11 +00:00
Chris Lattner
1d78eb6094 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
50dc89f874 Handle -0.0 correctly
llvm-svn: 12530
2004-03-29 19:51:24 +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
c84ec93d3e 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
aa5d8cb72f Eliminate nightmarish API
llvm-svn: 12214
2004-03-08 06:11:10 +00:00
Chris Lattner
11c0e5b684 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
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
52cc69f39e Remove dependence on return type of ConstantStruct::get
llvm-svn: 11466
2004-02-15 04:07:32 +00:00
Chris Lattner
3fd2b573f1 Remove dependence on the return type of ConstantArray::get
llvm-svn: 11463
2004-02-15 04:05:58 +00:00
Chris Lattner
c8d0942108 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
16690fad3d Adjust to the changed StructType interface. In particular, getElementTypes() is gone.
llvm-svn: 11228
2004-02-09 04:37:31 +00:00
Chris Lattner
a61cda01c2 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
317a6fec82 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
8767bd75e4 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
a991025919 Implement ConstantArray::isString
llvm-svn: 10851
2004-01-14 17:06:38 +00:00
Chris Lattner
b4e121c364 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
d757923e11 Move ConstantHandling.h into lib/VMCore and out of include/llvm
llvm-svn: 10805
2004-01-12 20:48:11 +00:00
Chris Lattner
b420886171 Eliminate ConstantFoldShiftInstruction reference
llvm-svn: 10801
2004-01-12 20:40:42 +00:00
Chris Lattner
35771f4fd2 Fix out of date comment, remove use of ConstantExpr::getShift
llvm-svn: 10794
2004-01-12 19:12:58 +00:00
Chris Lattner
52759f5c5e Make ConstantExpr::get work for shifts as well
llvm-svn: 10790
2004-01-12 19:04:55 +00:00
Chris Lattner
a1da49a55c Finegrainify namespacification
llvm-svn: 10131
2003-11-21 20:23:48 +00:00
Chris Lattner
1f762c7571 The ConstantPointer class is now gone.
llvm-svn: 10057
2003-11-17 19:47:21 +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
Chris Lattner
352ad83271 Add support for constant expr shifts
llvm-svn: 9735
2003-11-05 19:53:03 +00:00
Chris Lattner
4347464e2a Fix bug: instcombine/2003-10-23-InstcombineNullFail.ll
llvm-svn: 9403
2003-10-23 05:21:48 +00:00
Chris Lattner
53d92d23b0 Fix problem which effected linking apache
llvm-svn: 9335
2003-10-21 17:39:59 +00:00
John Criswell
b402729b30 Added LLVM project notice to the top of every C++ source file.
Header files will be on the way.

llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Chris Lattner
bd123c6e51 Add a sanity check for constant expression casts
llvm-svn: 8951
2003-10-07 22:19:19 +00:00
Chris Lattner
b5f0d32b91 Type tables are now AbstractTypeUsers. This allows them to merge together
constants as necessary due to type resolution.  With this change, the
following spec benchmarks now link: 176.gcc, 177.mesa, 252.eon,
253.perlbmk, & 300.twolf.  IOW, all SPEC INT and FP benchmarks now link.

llvm-svn: 8853
2003-10-05 00:17:43 +00:00
Chris Lattner
06dbcc0540 Minor random speedup: make Constant::getNullValue only call ConstantFOO::get
once!

llvm-svn: 8845
2003-10-03 19:34:51 +00:00
Chris Lattner
101d5058cb These methods are dead, remove them. Because the bodies will soon be
ressurected, just ifdef them out for now.

llvm-svn: 8840
2003-10-03 18:39:57 +00:00
Chris Lattner
83856d0df1 There is no reason for Value to be an AbstractTypeUser. This just makes things
significantly more complete.  Instead, just make DerivedType's AbstractTypeUser's,
and make Value contain a PATypeHolder.

llvm-svn: 8828
2003-10-02 19:44:40 +00:00
Chris Lattner
286e92a9ef Implement "unsafe" replaceAllUsesWWith stuff for use during type resolution.
llvm-svn: 8209
2003-08-29 05:36:46 +00:00
Chris Lattner
a2a7b891e5 Refactor code to make it useful outside of Constants.cpp
llvm-svn: 8205
2003-08-29 05:09:37 +00:00
Misha Brukman
cda7f97dbb The word dependent' has no a'.
llvm-svn: 8030
2003-08-21 22:14:26 +00:00
Chris Lattner
9fed232059 Fix linking bug in xboard
llvm-svn: 7952
2003-08-18 16:54:48 +00:00