aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode/Writer/SlotCalculator.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Bytecode/Writer/SlotCalculator.h')
-rw-r--r--lib/Bytecode/Writer/SlotCalculator.h51
1 files changed, 3 insertions, 48 deletions
diff --git a/lib/Bytecode/Writer/SlotCalculator.h b/lib/Bytecode/Writer/SlotCalculator.h
index de91d2e8f5..820099273b 100644
--- a/lib/Bytecode/Writer/SlotCalculator.h
+++ b/lib/Bytecode/Writer/SlotCalculator.h
@@ -61,17 +61,6 @@ class SlotCalculator {
/// is only possible if building information for a bytecode file.
bool ModuleContainsAllFunctionConstants;
- /// CompactionTable/NodeMap - When function compaction has been performed,
- /// these entries provide a compacted view of the namespace needed to emit
- /// instructions in a function body. The 'getSlot()' method automatically
- /// returns these entries if applicable, or the global entries if not.
- std::vector<TypePlane> CompactionTable;
- TypeList CompactionTypes;
- typedef std::map<const Value*, unsigned> CompactionNodeMapType;
- CompactionNodeMapType CompactionNodeMap;
- typedef std::map<const Type*, unsigned> CompactionTypeMapType;
- CompactionTypeMapType CompactionTypeMap;
-
SlotCalculator(const SlotCalculator &); // DO NOT IMPLEMENT
void operator=(const SlotCalculator &); // DO NOT IMPLEMENT
public:
@@ -85,24 +74,8 @@ public:
int getSlot(const Value *V) const;
int getSlot(const Type* T) const;
- /// getGlobalSlot - Return a slot number from the global table. This can only
- /// be used when a compaction table is active.
- unsigned getGlobalSlot(const Value *V) const;
- unsigned getGlobalSlot(const Type *V) const;
-
- inline unsigned getNumPlanes() const {
- if (CompactionTable.empty())
- return Table.size();
- else
- return CompactionTable.size();
- }
-
- inline unsigned getNumTypes() const {
- if (CompactionTypes.empty())
- return Types.size();
- else
- return CompactionTypes.size();
- }
+ inline unsigned getNumPlanes() const { return Table.size(); }
+ inline unsigned getNumTypes() const { return Types.size(); }
inline unsigned getModuleLevel(unsigned Plane) const {
return Plane < ModuleLevel.size() ? ModuleLevel[Plane] : 0;
@@ -114,11 +87,7 @@ public:
}
TypePlane &getPlane(unsigned Plane);
- TypeList& getTypes() {
- if (!CompactionTypes.empty())
- return CompactionTypes;
- return Types;
- }
+ TypeList& getTypes() { return Types; }
/// incorporateFunction/purgeFunction - If you'd like to deal with a function,
/// use these two methods to get its data into the SlotCalculator!
@@ -133,15 +102,6 @@ public:
string_iterator string_begin() const { return ConstantStrings.begin(); }
string_iterator string_end() const { return ConstantStrings.end(); }
- const std::vector<TypePlane> &getCompactionTable() const {
- return CompactionTable;
- }
-
- const TypeList& getCompactionTypes() const { return CompactionTypes; }
-
- /// @brief Determine if the compaction table (not types) is empty
- bool CompactionTableIsEmpty() const;
-
private:
// getOrCreateSlot - Values can be crammed into here at will... if
// they haven't been inserted already, they get inserted, otherwise
@@ -173,11 +133,6 @@ private:
void processValueSymbolTable(const SymbolTable *ST);
void processSymbolTableConstants(const SymbolTable *ST);
- void buildCompactionTable(const Function *F);
- unsigned getOrCreateCompactionTableSlot(const Value *V);
- unsigned getOrCreateCompactionTableSlot(const Type *V);
- void pruneCompactionTable();
-
// insertPrimitives - helper for constructors to insert primitive types.
void insertPrimitives();
};