mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 20:23:59 +00:00
Signficantly speed up printing by not emitting the same file twice with
different names. Large SCC's tend to be big, so this saves a lot of time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19970 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -274,9 +274,15 @@ static void printCollection(const Collection &C, std::ostream &O,
|
|||||||
Gr.getAuxFunctionCalls().size() : Gr.getFunctionCalls().size();
|
Gr.getAuxFunctionCalls().size() : Gr.getFunctionCalls().size();
|
||||||
|
|
||||||
TotalCallNodes += NumCalls;
|
TotalCallNodes += NumCalls;
|
||||||
if (I->getName() == "main" || !OnlyPrintMain)
|
if (I->getName() == "main" || !OnlyPrintMain) {
|
||||||
Gr.writeGraphToFile(O, Prefix+I->getName());
|
Function *SCCFn = Gr.getReturnNodes().begin()->first;
|
||||||
else {
|
if (&*I == SCCFn)
|
||||||
|
Gr.writeGraphToFile(O, Prefix+I->getName());
|
||||||
|
else
|
||||||
|
O << "Didn't write '" << Prefix+I->getName()
|
||||||
|
<< ".dot' - Graph already emitted to '" << Prefix+SCCFn->getName()
|
||||||
|
<< "\n";
|
||||||
|
} else {
|
||||||
O << "Skipped Writing '" << Prefix+I->getName() << ".dot'... ["
|
O << "Skipped Writing '" << Prefix+I->getName() << ".dot'... ["
|
||||||
<< Gr.getGraphSize() << "+" << NumCalls << "]\n";
|
<< Gr.getGraphSize() << "+" << NumCalls << "]\n";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user