[llvm] r207750 - [LCG] Don't lookup the child SCC twice. Spotted this by inspection, and
Chandler Carruth
chandlerc at gmail.com
Thu May 1 05:16:31 PDT 2014
Author: chandlerc
Date: Thu May 1 07:16:31 2014
New Revision: 207750
URL: http://llvm.org/viewvc/llvm-project?rev=207750&view=rev
Log:
[LCG] Don't lookup the child SCC twice. Spotted this by inspection, and
no functionality changed.
Modified:
llvm/trunk/lib/Analysis/LazyCallGraph.cpp
Modified: llvm/trunk/lib/Analysis/LazyCallGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LazyCallGraph.cpp?rev=207750&r1=207749&r2=207750&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LazyCallGraph.cpp (original)
+++ llvm/trunk/lib/Analysis/LazyCallGraph.cpp Thu May 1 07:16:31 2014
@@ -463,9 +463,9 @@ LazyCallGraph::SCC *LazyCallGraph::formS
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;
}
More information about the llvm-commits
mailing list