diff options
Diffstat (limited to 'polly/lib/CodeGen/PerfMonitor.cpp')
| -rw-r--r-- | polly/lib/CodeGen/PerfMonitor.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/polly/lib/CodeGen/PerfMonitor.cpp b/polly/lib/CodeGen/PerfMonitor.cpp index 9fbd07b2649..5423d5a4fa6 100644 --- a/polly/lib/CodeGen/PerfMonitor.cpp +++ b/polly/lib/CodeGen/PerfMonitor.cpp @@ -152,6 +152,15 @@ Function *PerfMonitor::insertFinalReporting() { RuntimeDebugBuilder::createCPUPrinter(Builder, "Total: ", CyclesTotal, "\n"); RuntimeDebugBuilder::createCPUPrinter(Builder, "Scops: ", CyclesInScops, "\n"); + + // Print the preamble for per-scop information. + RuntimeDebugBuilder::createCPUPrinter(Builder, "\n"); + RuntimeDebugBuilder::createCPUPrinter(Builder, "Per SCoP information\n"); + RuntimeDebugBuilder::createCPUPrinter(Builder, "--------------------\n"); + + RuntimeDebugBuilder::createCPUPrinter( + Builder, "scop function, " + "entry block name, exit block name, total time\n"); ReturnFromFinal = Builder.CreateRetVoid(); return ExitFn; } @@ -173,9 +182,10 @@ void PerfMonitor::AppendScopReporting() { std::string EntryName, ExitName; std::tie(EntryName, ExitName) = S.getEntryExitStr(); - RuntimeDebugBuilder::createCPUPrinter( - Builder, "Scop(", S.getFunction().getName(), " |from: ", EntryName, - " |to: ", ExitName, "): ", CyclesInCurrentScop, "\n"); + // print in CSV for easy parsing with other tools. + RuntimeDebugBuilder::createCPUPrinter(Builder, S.getFunction().getName(), + ", ", EntryName, ", ", ExitName, ", ", + CyclesInCurrentScop, "\n"); ReturnFromFinal = Builder.CreateRetVoid(); } |

