aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/DebugInfo.cpp
diff options
context:
space:
mode:
authorAlexandre Ganea <aganea@havenstudios.com>2025-09-05 15:28:19 -0400
committerGitHub <noreply@github.com>2025-09-05 15:28:19 -0400
commit5cda2424c8f9a0ecac2cc9f6c7f41883a16bea12 (patch)
tree81c45e1bb024b48f3089d8c5e4764ddf34bc662d /llvm/lib/IR/DebugInfo.cpp
parenta549e73cad60336d8e9c0622ae7ad86aa65ef4ce (diff)
downloadllvm-5cda2424c8f9a0ecac2cc9f6c7f41883a16bea12.zip
llvm-5cda2424c8f9a0ecac2cc9f6c7f41883a16bea12.tar.gz
llvm-5cda2424c8f9a0ecac2cc9f6c7f41883a16bea12.tar.bz2
[LLD][COFF] Add more `--time-trace` tags for ThinLTO linking (#156471)
In order to better see what's going on during ThinLTO linking, this PR adds more profile tags when using `--time-trace` on a `lld-link.exe` invocation. After PR, linking `clang.exe`: <img width="3839" height="2026" alt="Capture d’écran 2025-09-02 082021" src="https://github.com/user-attachments/assets/bf0c85ba-2f85-4bbf-a5c1-800039b56910" /> Linking a custom (Unreal Engine game) binary gives a completly different picture, probably because of using Unity files, and the sheer amount of input files (here, providing over 60 GB of .OBJs/.LIBs). <img width="1940" height="1008" alt="Capture d’écran 2025-09-02 102048" src="https://github.com/user-attachments/assets/60b28630-7995-45ce-9e8c-13f3cb5312e0" />
Diffstat (limited to 'llvm/lib/IR/DebugInfo.cpp')
-rw-r--r--llvm/lib/IR/DebugInfo.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index b468d92..166521a 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -36,6 +36,7 @@
#include "llvm/IR/Module.h"
#include "llvm/IR/PassManager.h"
#include "llvm/Support/Casting.h"
+#include "llvm/Support/TimeProfiler.h"
#include <algorithm>
#include <cassert>
#include <optional>
@@ -563,6 +564,7 @@ bool llvm::stripDebugInfo(Function &F) {
}
bool llvm::StripDebugInfo(Module &M) {
+ llvm::TimeTraceScope timeScope("Strip debug info");
bool Changed = false;
for (NamedMDNode &NMD : llvm::make_early_inc_range(M.named_metadata())) {