[BOLT][NFCI] Avoid calling registerName() twice
Calling registerName() for the same symbol twice, even with a different size, has no effect other than the lookup overhead. Avoid the redundancy. Fixes facebookincubator/BOLT#299 Reviewed By: Amir Differential Revision: https://reviews.llvm.org/D136115
This commit is contained in:
parent
0674f2ec96
commit
dc8035bddd
|
@ -1068,6 +1068,7 @@ void RewriteInstance::discoverFileObjects() {
|
|||
if (opts::Verbosity >= 1)
|
||||
outs() << "BOLT-INFO: skipping possibly another entry for function "
|
||||
<< *PreviousFunction << " : " << UniqueName << '\n';
|
||||
registerName(SymbolSize);
|
||||
} else {
|
||||
outs() << "BOLT-INFO: using " << UniqueName << " as another entry to "
|
||||
<< "function " << *PreviousFunction << '\n';
|
||||
|
@ -1084,7 +1085,6 @@ void RewriteInstance::discoverFileObjects() {
|
|||
assert(SI->second == Symbol && "wrong symbol found");
|
||||
FileSymRefs.erase(SI);
|
||||
}
|
||||
registerName(SymbolSize);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue