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

62 Commits

Author SHA1 Message Date
Vladimir Prus
08c8b74864 Reset DEBUG_SYMBOL_TABLE back to 0.
llvm-svn: 28538
2006-05-29 12:54:52 +00:00
Vladimir Prus
8a3a4fb0ba Fix compile error when DEBUG_SYMBOL_TABLE is defined.
llvm-svn: 28537
2006-05-29 12:45:15 +00:00
Chris Lattner
fd80437e76 Fix an iterator invalidation problem in code used by the -strip pass
llvm-svn: 24124
2005-10-31 18:42:37 +00:00
Misha Brukman
53e199440e Remove trailing whitespace
llvm-svn: 21427
2005-04-21 23:48:37 +00:00
Chris Lattner
46653269f4 rename insertEntry to insert
llvm-svn: 20484
2005-03-06 05:55:40 +00:00
Chris Lattner
b1ac7bc7f3 Merge SymbolTable::removeEntry into SymbolTable::remove, its only caller
llvm-svn: 20483
2005-03-06 05:51:09 +00:00
Chris Lattner
57a7a2d1cf Delete the really inefficient method: void remove(const Type* Typ);
Speed up the symbol stripping code by avoiding a linear search of the
type table.

Get rid of removeEntry(type_iterator), since 'remove' is exactly the same
operation.

llvm-svn: 20481
2005-03-06 05:46:41 +00:00
Chris Lattner
f1d5e180ce Remove some really gross and hard to understand code now that
InternallyInconsistent is always false.

llvm-svn: 20477
2005-03-06 05:21:40 +00:00
Chris Lattner
4af779dcba Simplify some code.
llvm-svn: 20476
2005-03-06 05:13:42 +00:00
Chris Lattner
eb5987ee06 remove these methods.
llvm-svn: 20474
2005-03-06 02:37:47 +00:00
Chris Lattner
ffa96dc848 This fixes PR531, a crash when running the CBE on a bytecode file.
The problem is that Function::renameLocalSymbols is iterating through
the symbol table planes, occasionally calling setName to rename a value
(which used to do a symbol table remove/insert pair).

The problem is that if there is only a single value in a particular type
plane that the remove will nuke the symbol table plane, and the insert
will create and insert a new one.  This hoses Function::renameLocalSymbols
because it has an iterator to the old plane, under the (very reasonable)
assumption that simply renaming a value won't cause the type plane to
disappear.

This patch fixes the bug by making the rename operation a single atomic
operation, which has a side effect of making the whole thing faster too. :)

llvm-svn: 20469
2005-03-06 02:14:28 +00:00
Chris Lattner
80ba99a8f6 2nd arg to setName goes away.
llvm-svn: 20460
2005-03-05 19:02:15 +00:00
Chris Lattner
0ac02cee3c Nuke blank line.
llvm-svn: 20154
2005-02-13 17:54:21 +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
Chris Lattner
71bbf1ea00 Change SymbolTable::insertEntry to be more careful about how many map
lookups it does.  This shaves another 5% off of bcreading 252.eon.  Note that
the proper solution to this problem is to fix PR411, but that will have to
wait until later.

llvm-svn: 15455
2004-08-04 00:37:31 +00:00
Reid Spencer
4005f11ca3 bug 122:
- Correct isa<Constant> for GlobalValue subclass
- Fix some tabs and indentation.

llvm-svn: 14932
2004-07-17 23:57:36 +00:00
Reid Spencer
d242724126 Constify SymbolTable's use of Type* so that it never modifies them.
llvm-svn: 14616
2004-07-04 11:55:08 +00:00
Chris Lattner
cf111f5951 Remove unused var
llvm-svn: 14033
2004-06-05 00:03:27 +00:00
Reid Spencer
2791d48685 Made it illegal to pass a Type* through one of the Value* interfaces. The
SymbolTable will now assert if this is done. This didn't find any incorrect
usage of SymbolTable but will prevent future mistakes until Type != Value.

llvm-svn: 13755
2004-05-25 15:20:47 +00:00
Reid Spencer
e6e0da0b9f Completely rewrote the class. SymbolTable now separates Type* from Value* in preparation\
for making Type not derive from Value. There are now separate interfaces \
for looking up, finding, and inserting Types and Values. There are also \
three separate iterator interfaces, one for type planes, one for the types \
(type type plane), and one for values within a type plane. See the \
documentation in the Header file.

llvm-svn: 13752
2004-05-25 08:52:42 +00:00
Chris Lattner
24a9176b66 Make the lookup method const.
llvm-svn: 10667
2003-12-31 07:08:19 +00:00
Chris Lattner
a1da49a55c Finegrainify namespacification
llvm-svn: 10131
2003-11-21 20:23:48 +00:00
Chris Lattner
4bdd0d5d93 Fix PR130, and testcase test/Regression/Linker/2003-11-18-TypeResolution.ll
llvm-svn: 10075
2003-11-19 01:02:52 +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
f40566184d Fix PR95. I'm checking this patch in for Reid Spencer, who figured it out
and wrote it up.  Thanks!!

llvm-svn: 9832
2003-11-09 19:39:48 +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
b6c8569f05 Regularize header file comments
llvm-svn: 9071
2003-10-13 03:32:08 +00:00
Chris Lattner
18c3f42894 This checkin basically amounts to a complete rewrite of the type-resolution
machinery.  This dramatically simplifies how things works, removes irritating
little corner cases, and overall improves speed and reliability.

Highlights of this change are:

1. The exponential algorithm built into the code is now gone.  For example
   the time to disassemble one bytecode file from the mesa benchmark went
   from taking 12.5s to taking 0.16s.
2. The linker bugs should be dramatically reduced.  The one remaining bug
   has to do with constant handling, which I actually introduced in
   "union-find" checkins.
3. The code is much easier to follow, as a result of fewer special cases.
   It's probably also smaller.  yaay.

llvm-svn: 8842
2003-10-03 18:46:24 +00:00
Misha Brukman
993b605832 Spell `occurrence' correctly.
llvm-svn: 8388
2003-09-08 03:08:43 +00:00
Chris Lattner
0382bf2e98 This is now unnecessary
llvm-svn: 8347
2003-09-04 23:38:22 +00:00
Chris Lattner
055944e9d3 Fix bug: Linker/2003-08-28-TypeResolvesGlobal2.ll
llvm-svn: 8206
2003-08-29 05:11:34 +00:00
Chris Lattner
f104b6e6ad Fix bug: Linker/2003-08-28-TypeResolvesGlobal.ll
llvm-svn: 8202
2003-08-29 04:49:54 +00:00
Chris Lattner
1351c304dc Remove redundant const qualifiers from cast<> expressions
llvm-svn: 7253
2003-07-23 15:30:06 +00:00
Chris Lattner
1cab8ed666 Remove using declarations and extraneous #includes
llvm-svn: 6303
2003-05-22 21:47:17 +00:00
Chris Lattner
7a43d882e2 Fix bug: Assembler/2002-12-15-GlobalResolve.ll
llvm-svn: 5039
2002-12-15 16:41:52 +00:00
Chris Lattner
05eed92679 planes is not spelled with an O
llvm-svn: 5037
2002-12-15 16:20:23 +00:00
Chris Lattner
7be670ef4b - Eliminate SymbolTable::ParentSymTab, ST::localLookup, and
Function::ParentSymTab.  These aren't needed at all.

llvm-svn: 4186
2002-10-15 21:26:29 +00:00
Chris Lattner
dfd421a7df MEGAPATCH checkin.
For details, See: docs/2002-06-25-MegaPatchInfo.txt

llvm-svn: 2779
2002-06-25 16:13:24 +00:00
Chris Lattner
590bcc9629 We actually need this code for the release build to prevent link errors,
un#ifdef it.

llvm-svn: 2606
2002-05-10 18:54:35 +00:00
Chris Lattner
0b712a046b Remove some gross code by using the Value::dump method to do debug dumps
llvm-svn: 2150
2002-04-07 22:33:13 +00:00
Chris Lattner
849c762b02 Change references from Method to Function
change references from MethodARgument to FunctionArgument

llvm-svn: 1991
2002-03-26 18:01:55 +00:00
Chris Lattner
b44f81b987 * Add new method localLookup
* SymbolTable::remove(Value *N) checks to see if we are internally
  inconsistent before looking for a type plane (caused a crash)
* insertEntry now does a local lookup instead of a global lookup, which was
  causing an infinite loop in the renamer logic.
* Added assertions to make sure stuff stays happy
* Now the linker correctly links the SPECINT2000 mcf benchmark

llvm-svn: 1840
2002-03-08 20:26:17 +00:00
Chris Lattner
d18db4006d This checkin fixes the bug described in:
test/Regression/Assembler/2002-01-24-BadSymbolTableAssert.ll

llvm-svn: 1583
2002-01-25 03:56:34 +00:00
Chris Lattner
3dc9a2a61f Changes to build successfully with GCC 3.02
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Chris Lattner
f6b7da2bb5 Rename ConstPoolVal -> Constant
Rename ConstPool*   -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h

llvm-svn: 1407
2001-12-03 22:26:30 +00:00
Chris Lattner
463cc31132 Create a new #include "Support/..." directory structure to move things
from "llvm/Support/..." that are not llvm dependant.

Move files and fix #includes

llvm-svn: 1400
2001-11-27 00:03:19 +00:00
Chris Lattner
1e270e0e2b If a name conflict occurs when inserting a value, rename it.
llvm-svn: 1346
2001-11-26 17:01:18 +00:00
Chris Lattner
d61e4631f5 Fix major bugs in type resolution
llvm-svn: 1092
2001-11-03 03:27:53 +00:00
Chris Lattner
861e84b114 Remove unnamed prototypes that are created.
llvm-svn: 964
2001-10-23 15:30:18 +00:00
Chris Lattner
db06de9f17 More symbol table bugfixes that are impossible to track down. Goody
llvm-svn: 960
2001-10-23 02:32:45 +00:00