[LCG] Don't lookup the child SCC twice. Spotted this by inspection, and

no functionality changed.

llvm-svn: 207750
This commit is contained in:
Chandler Carruth 2014-05-01 12:16:31 +00:00
parent 4b096741b4
commit 034d0d6805
1 changed files with 2 additions and 2 deletions

View File

@ -463,9 +463,9 @@ LazyCallGraph::SCC *LazyCallGraph::formSCC(Node *RootN,
bool IsLeafSCC = true; bool IsLeafSCC = true;
for (Node *SCCN : NewSCC->Nodes) for (Node *SCCN : NewSCC->Nodes)
for (Node &SCCChildN : *SCCN) { for (Node &SCCChildN : *SCCN) {
if (SCCMap.lookup(&SCCChildN) == NewSCC)
continue;
SCC &ChildSCC = *SCCMap.lookup(&SCCChildN); SCC &ChildSCC = *SCCMap.lookup(&SCCChildN);
if (&ChildSCC == NewSCC)
continue;
ChildSCC.ParentSCCs.insert(NewSCC); ChildSCC.ParentSCCs.insert(NewSCC);
IsLeafSCC = false; IsLeafSCC = false;
} }