mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-28 06:32:09 +00:00
Make this MUCH faster by avoiding a linear search in the symbol table code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20479 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c9a33cefb8
commit
82aa566795
@ -80,8 +80,7 @@ bool DTE::runOnModule(Module &M) {
|
|||||||
// the type is not used, remove it.
|
// the type is not used, remove it.
|
||||||
const Type *RHS = TI->second;
|
const Type *RHS = TI->second;
|
||||||
if (ShouldNukeSymtabEntry(RHS) || !UsedTypes.count(RHS)) {
|
if (ShouldNukeSymtabEntry(RHS) || !UsedTypes.count(RHS)) {
|
||||||
SymbolTable::type_iterator ToRemove = TI++;
|
ST.remove(TI++);
|
||||||
ST.remove(ToRemove->second);
|
|
||||||
++NumKilled;
|
++NumKilled;
|
||||||
Changed = true;
|
Changed = true;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user