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 | 034d0d6805fbb658f0d3fff1fef345dcd00fd358 (patch) | |
tree | a26b238c1d0174c2c6d140f314db1a2ba8b90e90 /llvm/lib/Analysis/LazyCallGraph.cpp | |
parent | 4b096741b4f2d0372cc307873edbace5cc18cda8 (diff) | |
download | llvm-034d0d6805fbb658f0d3fff1fef345dcd00fd358.zip llvm-034d0d6805fbb658f0d3fff1fef345dcd00fd358.tar.gz llvm-034d0d6805fbb658f0d3fff1fef345dcd00fd358.tar.bz2 |
[LCG] Don't lookup the child SCC twice. Spotted this by inspection, and
no functionality changed.
llvm-svn: 207750
Diffstat (limited to 'llvm/lib/Analysis/LazyCallGraph.cpp')
-rw-r--r-- | llvm/lib/Analysis/LazyCallGraph.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/LazyCallGraph.cpp b/llvm/lib/Analysis/LazyCallGraph.cpp index f88fc79..276956b 100644 --- a/llvm/lib/Analysis/LazyCallGraph.cpp +++ b/llvm/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; } |