[PATCH] D110326: [LegacyPassManager] Demangling function name in ftime-trace output.
gehry via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 23 06:04:39 PDT 2021
Sockke created this revision.
Sockke added reviewers: thakis, anton-afanasyev, Enna1, MTC.
Herald added subscribers: dexonsmith, hiraditya.
Sockke requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Demangling compiled C++ function names so that it makes the data more readable in analyzing platform.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D110326
Files:
llvm/lib/IR/LegacyPassManager.cpp
Index: llvm/lib/IR/LegacyPassManager.cpp
===================================================================
--- llvm/lib/IR/LegacyPassManager.cpp
+++ llvm/lib/IR/LegacyPassManager.cpp
@@ -32,6 +32,7 @@
#include "llvm/Support/TimeProfiler.h"
#include "llvm/Support/Timer.h"
#include "llvm/Support/raw_ostream.h"
+#include "llvm/Demangle/Demangle.h"
#include <algorithm>
#include <unordered_set>
using namespace llvm;
@@ -1417,7 +1418,7 @@
FunctionSize = F.getInstructionCount();
}
- llvm::TimeTraceScope FunctionScope("OptFunction", F.getName());
+ llvm::TimeTraceScope FunctionScope("OptFunction", StringRef(demangle(F.getName().str())));
for (unsigned Index = 0; Index < getNumContainedPasses(); ++Index) {
FunctionPass *FP = getContainedPass(Index);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110326.374516.patch
Type: text/x-patch
Size: 781 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210923/4bfbc846/attachment.bin>
More information about the llvm-commits
mailing list