Avoid an extra map lookup (#4623)

Speedup: 5% less time on a real-world compilation batch
(nearly 10k parallel compilations)
(Durations: Before: 156.5s, After: 147.4s)
This commit is contained in:
Sebastien Alaiwan 2021-12-08 20:53:36 +01:00 committed by GitHub
parent 1ed847f438
commit 64328e94db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -260,7 +260,7 @@ void DefUseManager::EraseUseRecordsOfOperandIds(const Instruction* inst) {
id_to_users_.erase(
UserEntry(GetDef(use_id), const_cast<Instruction*>(inst)));
}
inst_to_used_ids_.erase(inst);
inst_to_used_ids_.erase(iter);
}
}