Commit Graph

51 Commits

Author SHA1 Message Date
Reid Spencer
edd5d9ece1 Some cleanups for compilation with GCC 4.0.0 to remove warnings:
* Use C++ style casts, not C style casts
* Abstract base classes should have virtual destructor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22057 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-15 16:13:11 +00:00
Misha Brukman
9769ab2226 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21408 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 20:19:05 +00:00
Chris Lattner
bf4515e218 move some method declarations around to make it clear that users should
not call insert(Value *Val), remove(Value* Val), or
changeName(Value *V, const std::string &Name)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20488 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 06:03:44 +00:00
Chris Lattner
c0d369d879 this method is never called.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20487 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 06:00:24 +00:00
Chris Lattner
73091bcebe the only caller of insertEntry is insert, inline it and remove insertEntry
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20485 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 05:56:02 +00:00
Chris Lattner
58b004c2a3 remove this method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20482 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 05:50:49 +00:00
Chris Lattner
1327c5ab99 Delete the really inefficient method: void remove(const Type* Typ);
Get rid of removeEntry(type_iterator), since 'remove' is exactly the same
operation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20480 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 05:46:00 +00:00
Chris Lattner
c9a33cefb8 InternallyInconsistent is dead!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20478 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 05:22:05 +00:00
Chris Lattner
84ceb33f92 remove these dead methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20475 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 02:38:24 +00:00
Chris Lattner
ea8186ad62 nuke some dead methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20470 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 02:25:02 +00:00
Chris Lattner
eaadf58276 Add a new method, allow symtab to poke name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20468 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-06 02:10:40 +00:00
Chris Lattner
d81b691ea0 remove extraneous spaces from argument lists.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20465 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-05 19:58:40 +00:00
Chris Lattner
637b77224f Fix typeo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18530 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-05 06:33:15 +00:00
Chris Lattner
c063502e32 Warning fixes for VC++, contributed by Morten Ofstad!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17831 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-15 19:02:35 +00:00
Reid Spencer
3e7bb400bf Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14923 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-17 23:30:45 +00:00
Reid Spencer
9d625274ea Constify usage of Type* on the interface to ensure SymbolTable doesn't
modify types (it never should). Clean up some comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14594 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 10:49:41 +00:00
Misha Brukman
046b1622eb Fix case of doxygen directive \p.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13985 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-03 15:14:00 +00:00
Chris Lattner
eaca89b48e Eliminate this form of SymbolTable::remove. It ignores the type argument
anyway.  Add a form that takes a type_iterator for the C backend.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13873 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-28 05:30:29 +00:00
Reid Spencer
9b41dcfa60 Tighten up checking on SymbolTable interface to make it illegal to pass a
Type* where a Value* is expected.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13794 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-26 21:46:18 +00:00
Misha Brukman
6f3512865e Fix spelling of doxygen directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13791 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-26 17:42:51 +00:00
Reid Spencer
bdfb668fee 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13745 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-25 08:45:53 +00:00
Chris Lattner
69284b03d1 Make the lookup method const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10667 91177308-0d34-0410-b5e6-96231b3b80d8
2003-12-31 07:08:19 +00:00
Brian Gaeke
d0fde30ce8 Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 22:41:34 +00:00
Chris Lattner
d5b1245e8c Fix PR95. I'm checking this patch in for Reid Spencer, who figured it out
and wrote it up.  Thanks!!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9832 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-09 19:39:48 +00:00
Brian Gaeke
0bd2189e5f Fix apparent typo in head-of-file comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9400 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-23 04:01:49 +00:00
John Criswell
6fbcc26f14 Added LLVM copyright header (for lack of a better term).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9304 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 20:19:47 +00:00
Chris Lattner
7685ac8d35 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8842 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-03 18:46:24 +00:00
Chris Lattner
48486893f4 Standardize header file comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8782 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 18:37:50 +00:00
Chris Lattner
3acbd5d5d4 Add period
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8090 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-23 23:15:10 +00:00
Chris Lattner
3889a2cb05 Remove a ton of extraneous #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6842 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-22 03:08:05 +00:00
John Criswell
be583b914d Included assert.h so that the code compiles under newer versions of GCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6682 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-11 14:01:36 +00:00
Chris Lattner
fe9664ce7c Add new function to allow removal of typed named elements
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5442 91177308-0d34-0410-b5e6-96231b3b80d8
2003-01-30 20:54:03 +00:00
Chris Lattner
0dad6e9c95 - Eliminate SymbolTable::ParentSymTab, ST::localLookup, and
Function::ParentSymTab.  These aren't needed at all.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4186 91177308-0d34-0410-b5e6-96231b3b80d8
2002-10-15 21:26:29 +00:00
Chris Lattner
9ae93cdcc8 Fix two FIXME's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2377 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 19:49:58 +00:00
Chris Lattner
853737706f The interesting contents of SymTabValue were incorporated into Function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2346 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-28 04:46:07 +00:00
Chris Lattner
8937375e4b Make the release build work
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2097 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-04 19:19:27 +00:00
Chris Lattner
e82f1c6cb7 * 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1840 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-08 20:26:17 +00:00
Chris Lattner
fad83694a2 Fix typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1834 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-08 18:38:08 +00:00
Chris Lattner
697954c15d Changes to build successfully with GCC 3.02
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1503 91177308-0d34-0410-b5e6-96231b3b80d8
2002-01-20 22:54:45 +00:00
Chris Lattner
e9bb2df410 Rename ConstPoolVal -> Constant
Rename ConstPool*   -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1407 91177308-0d34-0410-b5e6-96231b3b80d8
2001-12-03 22:26:30 +00:00
Chris Lattner
e638c10cb0 More symbol table bugfixes that are impossible to track down. Goody
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@960 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-23 02:32:45 +00:00
Chris Lattner
d48d6c74ad Fix another annoying bug that took forever to track down. This one involves abstract type resolution at a bad time that broke symbol tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@958 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-23 01:53:01 +00:00
Chris Lattner
9245fc75a4 Fix bug exposed by this testcase:
declare int "call_operand"      (%rtx_def*, int)        ;; Prototype for: call_operand
declare int "restore_operand"   (%rtx_def*, int)        ;; Prototype for: restore_operand

%rtx_def = type opaque
%rtx_def = type int
implementation


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@934 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-22 04:55:44 +00:00
Chris Lattner
067238d5d9 Expose typedefs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@738 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-13 06:17:50 +00:00
Chris Lattner
4387370c1c Factor parentness out of Module & GlobalVariable into GlobalValue
Implement SymbolTable debug/dump utility


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@710 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-03 19:28:15 +00:00
Chris Lattner
cfe26c930a Add more support for new style casts
Convert more code to use them


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@695 91177308-0d34-0410-b5e6-96231b3b80d8
2001-10-01 18:26:53 +00:00
Chris Lattner
46cbff625e Chris seems fond of #include <vector>. Fix these. Also convert use list in
Value to a vector instead of a list.

Move SchedGraph.h & SchedPriorities.h into lib/CodeGen/InstrScheduling


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@572 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-14 16:56:32 +00:00
Chris Lattner
46b23d92e3 Support abstract types by keeping on the use list of the abstract type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@425 91177308-0d34-0410-b5e6-96231b3b80d8
2001-09-07 16:21:36 +00:00
Chris Lattner
083735d582 Fixed typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201 91177308-0d34-0410-b5e6-96231b3b80d8
2001-07-16 16:17:18 +00:00
Chris Lattner
3bcd6394ec * Rename get.*Operator to create seeing that it would have to be qualified
with the classname anyways.
* Add an isPHINode() method to Instruction
* Add getUniqueName() to SymbolTable class
* Add an insert method to ValueHolder


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73 91177308-0d34-0410-b5e6-96231b3b80d8
2001-06-25 07:31:05 +00:00