Bye, Bye Compaction Tables. The benefit compaction tables provides doesn't

outweight its computational costs. This patch removes all compaction
table handling from the bcreader and bcwriter. For the record, here's the
difference betweeen having and not having compaction tables for some tests:

Test             With       Without   Size Chg
Olden/mst       5,602         5,598      +0.1%
viterbi        18,026        17,795      +1.3%
obsequi       162,133       166,663      -2.8%
burg          224,090       228,148      -1.8%
kimwitu++   4,933,263     5,121,159      -3.8%
176.gcc     8,470,424     9,141,539      -7.3%

It seems that it is more beneficial to larger files, but even on the largest
test case we have (176.gcc) it only amounts ot an I/O saving of 7.3%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33661 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer
2007-01-30 19:36:46 +00:00
parent 908504347b
commit d2bb887cd1
6 changed files with 34 additions and 721 deletions

View File

@ -212,12 +212,6 @@ protected:
/// @brief Parse a function body
void ParseFunctionBody(Function* Func);
/// @brief Parse the type list portion of a compaction table
void ParseCompactionTypes(unsigned NumEntries);
/// @brief Parse a compaction table
void ParseCompactionTable();
/// @brief Parse global types
void ParseGlobalTypes();
@ -275,15 +269,6 @@ private:
///
unsigned char RevisionNum; // The rev # itself
/// CompactionTypes - If a compaction table is active in the current function,
/// this is the mapping that it contains. We keep track of what resolved type
/// it is as well as what global type entry it is.
std::vector<std::pair<const Type*, unsigned> > CompactionTypes;
/// @brief If a compaction table is active in the current function,
/// this is the mapping that it contains.
std::vector<std::vector<Value*> > CompactionValues;
/// @brief This vector is used to deal with forward references to types in
/// a module.
TypeListTy ModuleTypes;
@ -363,23 +348,12 @@ private:
/// @brief Converts a Type* to its type slot number
unsigned getTypeSlot(const Type *Ty);
/// @brief Converts a normal type slot number to a compacted type slot num.
unsigned getCompactionTypeSlot(unsigned type);
/// @brief Gets the global type corresponding to the TypeId
const Type *getGlobalTableType(unsigned TypeId);
/// This is just like getTypeSlot, but when a compaction table is in use,
/// it is ignored.
unsigned getGlobalTableTypeSlot(const Type *Ty);
/// @brief Get a value from its typeid and slot number
Value* getValue(unsigned TypeID, unsigned num, bool Create = true);
/// @brief Get a value from its type and slot number, ignoring compaction
/// tables.
Value *getGlobalTableValue(unsigned TyID, unsigned SlotNo);
/// @brief Get a basic block for current function
BasicBlock *getBasicBlock(unsigned ID);