mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Reduce double set lookups. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219505 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -172,9 +172,7 @@ ForwardDominanceFrontierBase<BlockT>::calculate(const DomTreeT &DT,
|
||||
DomSetType &S = this->Frontiers[currentBB];
|
||||
|
||||
// Visit each block only once.
|
||||
if (visited.count(currentBB) == 0) {
|
||||
visited.insert(currentBB);
|
||||
|
||||
if (visited.insert(currentBB)) {
|
||||
// Loop over CFG successors to calculate DFlocal[currentNode]
|
||||
for (auto SI = BlockTraits::child_begin(currentBB),
|
||||
SE = BlockTraits::child_end(currentBB);
|
||||
|
@@ -165,10 +165,10 @@ private:
|
||||
//
|
||||
bool ProcessInterval(NodeTy *Node) {
|
||||
BasicBlock *Header = getNodeHeader(Node);
|
||||
if (Visited.count(Header)) return false;
|
||||
if (!Visited.insert(Header).second)
|
||||
return false;
|
||||
|
||||
Interval *Int = new Interval(Header);
|
||||
Visited.insert(Header); // The header has now been visited!
|
||||
|
||||
// Check all of our successors to see if they are in the interval...
|
||||
for (typename GT::ChildIteratorType I = GT::child_begin(Node),
|
||||
|
Reference in New Issue
Block a user