diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2014-05-01 12:16:31 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2014-05-01 12:16:31 +0000 |
commit | 54bf6fd4a57878f9247646eb3074c7f4141f39fa (patch) | |
tree | 9d22a8a6e5d6cbd183e11dfd5b23bda391a1ed64 /lib/Analysis | |
parent | b8f462501b625cff6835ea8ff290e4b6524cf400 (diff) | |
download | llvm-54bf6fd4a57878f9247646eb3074c7f4141f39fa.tar.gz llvm-54bf6fd4a57878f9247646eb3074c7f4141f39fa.tar.bz2 llvm-54bf6fd4a57878f9247646eb3074c7f4141f39fa.tar.xz |
[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
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/LazyCallGraph.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/LazyCallGraph.cpp b/lib/Analysis/LazyCallGraph.cpp index f88fc79fbd..276956b644 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; } |