summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode/Writer/SlotCalculator.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-09 07:51:47 +0000
committerChris Lattner <sabre@nondot.org>2007-02-09 07:51:47 +0000
commitfc30d1bb6999c8c372879f7adbf08b78cab38e3c (patch)
tree0d73bbfa438e38f674a4ea9ed6e2e4200c680991 /llvm/lib/Bytecode/Writer/SlotCalculator.cpp
parente93db8fba23c2d4366c94f67d27f6b3dc6a45cff (diff)
downloadbcm5719-llvm-fc30d1bb6999c8c372879f7adbf08b78cab38e3c.tar.gz
bcm5719-llvm-fc30d1bb6999c8c372879f7adbf08b78cab38e3c.zip
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. llvm-svn: 34084
Diffstat (limited to 'llvm/lib/Bytecode/Writer/SlotCalculator.cpp')
-rw-r--r--llvm/lib/Bytecode/Writer/SlotCalculator.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/llvm/lib/Bytecode/Writer/SlotCalculator.cpp b/llvm/lib/Bytecode/Writer/SlotCalculator.cpp
index 197f20601a6..478216d145d 100644
--- a/llvm/lib/Bytecode/Writer/SlotCalculator.cpp
+++ b/llvm/lib/Bytecode/Writer/SlotCalculator.cpp
@@ -171,7 +171,6 @@ void SlotCalculator::processModule() {
}
getOrCreateSlot(I->getType());
}
- processSymbolTableConstants(&F->getValueSymbolTable());
}
// Insert constants that are named at module level into the slot pool so that
@@ -233,15 +232,6 @@ void SlotCalculator::processValueSymbolTable(const ValueSymbolTable *VST) {
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 @@ void SlotCalculator::incorporateFunction(const Function *F) {
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");
OpenPOWER on IntegriCloud