Initial checkin of simple&fast SSA based GCSE algorithm
[oota-llvm.git] / include / llvm / SymbolTable.h
index e425e88d0d214fb543a41efbd186d81010d12ffc..8085101204be1cea4adb9d8a04cdb19100eacce6 100644 (file)
@@ -1,4 +1,4 @@
-//===-- llvm/SymbolTable.h - Implement a type planned symtab ------*- C++ -*-=//
+//===-- llvm/SymbolTable.h - Implement a type plane'd symtab ------*- C++ -*-=//
 //
 // This file implements a symbol table that has planed broken up by type.  
 // Identical types may have overlapping symbol names as long as they are 
 #define LLVM_SYMBOL_TABLE_H
 
 #include "llvm/Value.h"
+#include "llvm/Type.h"              // FIXME: Remove
+#include "llvm/ConstantVals.h"      // FIXME: Remove
 #include <map>
 
-#ifndef NDEBUG             // Only for assertions
-#include "llvm/Type.h"
-#include "llvm/ConstantVals.h"
-#endif
-
-class Type;
-
 class SymbolTable : public AbstractTypeUser,
                    public std::map<const Type *, 
                                     std::map<const std::string, Value *> > {
@@ -54,6 +49,11 @@ public:
   // lookup - Returns null on failure...
   Value *lookup(const Type *Ty, const std::string &name);
 
+  // localLookup - Look in this symbol table without falling back on parent,
+  // if non-existing.  Returns null on failure...
+  //
+  Value *localLookup(const Type *Ty, const std::string &name);
+
   // insert - Add named definition to the symbol table...
   inline void insert(Value *N) {
     assert(N->hasName() && "Value must be named to go into symbol table!");