[llvm-commits] CVS: llvm/lib/Bytecode/Writer/SlotCalculator.cpp SlotCalculator.h Writer.cpp
Chris Lattner
sabre at nondot.org
Thu Feb 8 23:52:03 PST 2007
Changes in directory llvm/lib/Bytecode/Writer:
SlotCalculator.cpp updated: 1.82 -> 1.83
SlotCalculator.h updated: 1.27 -> 1.28
Writer.cpp updated: 1.156 -> 1.157
---
Log message:
1. constants can never occur in the symbol table.
2. All function-level constants are now incorporated into the module-level
constant pool, since the compaction table was removed. Eliminate extra
work to check for them.
This speeds up the bcwriter from 24.4s to 13.1s on 447.dealII and .73 -> .56s
on kc++ in a release build.
---
Diffs of the changes: (+0 -21)
SlotCalculator.cpp | 18 ------------------
SlotCalculator.h | 1 -
Writer.cpp | 2 --
3 files changed, 21 deletions(-)
Index: llvm/lib/Bytecode/Writer/SlotCalculator.cpp
diff -u llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.82 llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.83
--- llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.82 Mon Feb 5 14:47:20 2007
+++ llvm/lib/Bytecode/Writer/SlotCalculator.cpp Fri Feb 9 01:51:47 2007
@@ -171,7 +171,6 @@
}
getOrCreateSlot(I->getType());
}
- processSymbolTableConstants(&F->getValueSymbolTable());
}
// Insert constants that are named at module level into the slot pool so that
@@ -233,15 +232,6 @@
getOrCreateSlot(VI->second);
}
-void SlotCalculator::processSymbolTableConstants(const ValueSymbolTable *VST) {
- // Now do the constant values in all planes
- for (ValueSymbolTable::const_iterator VI = VST->begin(), VE = VST->end();
- VI != VE; ++VI)
- if (isa<Constant>(VI->second) && !isa<GlobalValue>(VI->second))
- getOrCreateSlot(VI->second);
-}
-
-
void SlotCalculator::incorporateFunction(const Function *F) {
assert((ModuleLevel.empty() ||
ModuleTypeLevel == 0) && "Module already incorporated!");
@@ -270,14 +260,6 @@
for (constant_iterator CI = constant_begin(F), CE = constant_end(F);
CI != CE; ++CI)
getOrCreateSlot(*CI);
-
- // If there is a symbol table, it is possible that the user has names for
- // constants that are not being used. In this case, we will have problems
- // if we don't emit the constants now, because otherwise we will get
- // symbol table references to constants not in the output. Scan for these
- // constants now.
- //
- processSymbolTableConstants(&F->getValueSymbolTable());
}
SC_DEBUG("Inserting Instructions:\n");
Index: llvm/lib/Bytecode/Writer/SlotCalculator.h
diff -u llvm/lib/Bytecode/Writer/SlotCalculator.h:1.27 llvm/lib/Bytecode/Writer/SlotCalculator.h:1.28
--- llvm/lib/Bytecode/Writer/SlotCalculator.h:1.27 Mon Feb 5 14:47:20 2007
+++ llvm/lib/Bytecode/Writer/SlotCalculator.h Fri Feb 9 01:51:47 2007
@@ -132,7 +132,6 @@
//
void processTypeSymbolTable(const TypeSymbolTable *ST);
void processValueSymbolTable(const ValueSymbolTable *ST);
- void processSymbolTableConstants(const ValueSymbolTable *ST);
// insertPrimitives - helper for constructors to insert primitive types.
void insertPrimitives();
Index: llvm/lib/Bytecode/Writer/Writer.cpp
diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.156 llvm/lib/Bytecode/Writer/Writer.cpp:1.157
--- llvm/lib/Bytecode/Writer/Writer.cpp:1.156 Mon Feb 5 14:47:20 2007
+++ llvm/lib/Bytecode/Writer/Writer.cpp Fri Feb 9 01:51:47 2007
@@ -1112,8 +1112,6 @@
// Get slot information about the function...
Table.incorporateFunction(F);
- outputConstants(true);
-
// Output all of the instructions in the body of the function
outputInstructions(F);
More information about the llvm-commits
mailing list