mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-02 19:24:25 +00:00
Reduce double set lookups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230798 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -346,11 +346,10 @@ namespace {
|
||||
/// Push BV onto BlockValueStack unless it's already in there.
|
||||
/// Returns true on success.
|
||||
bool pushBlockValue(const std::pair<BasicBlock *, Value *> &BV) {
|
||||
if (BlockValueSet.count(BV))
|
||||
if (!BlockValueSet.insert(BV).second)
|
||||
return false; // It's already in the stack.
|
||||
|
||||
BlockValueStack.push(BV);
|
||||
BlockValueSet.insert(BV);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user