From: Chandler Carruth Date: Thu, 1 May 2014 12:16:31 +0000 (+0000) Subject: [LCG] Don't lookup the child SCC twice. Spotted this by inspection, and X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=54bf6fd4a57878f9247646eb3074c7f4141f39fa;p=oota-llvm.git [LCG] Don't lookup the child SCC twice. Spotted this by inspection, and no functionality changed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207750 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/LazyCallGraph.cpp b/lib/Analysis/LazyCallGraph.cpp index f88fc79fbd7..276956b644d 100644 --- a/lib/Analysis/LazyCallGraph.cpp +++ b/lib/Analysis/LazyCallGraph.cpp @@ -463,9 +463,9 @@ LazyCallGraph::SCC *LazyCallGraph::formSCC(Node *RootN, bool IsLeafSCC = true; for (Node *SCCN : NewSCC->Nodes) for (Node &SCCChildN : *SCCN) { - if (SCCMap.lookup(&SCCChildN) == NewSCC) - continue; SCC &ChildSCC = *SCCMap.lookup(&SCCChildN); + if (&ChildSCC == NewSCC) + continue; ChildSCC.ParentSCCs.insert(NewSCC); IsLeafSCC = false; }