[llvm-branch-commits] [llvm] [NFC] Leave a comment in `Local.cpp` about debug info & sample profiling (PR #155296)
Mircea Trofin via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Sep 4 14:02:17 PDT 2025
https://github.com/mtrofin updated https://github.com/llvm/llvm-project/pull/155296
>From 2c17eab265e9a52176552dfbd07d6ffd60973f2f Mon Sep 17 00:00:00 2001
From: Mircea Trofin <mtrofin at google.com>
Date: Mon, 25 Aug 2025 21:04:05 +0000
Subject: [PATCH] [NFC] Leave a comment in `Local.cpp` about debug info &
sample profiling
---
llvm/lib/Transforms/Utils/Local.cpp | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index 2cfd70a1746c8..57dc1b38b8ec3 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/lib/Transforms/Utils/Local.cpp
@@ -3342,8 +3342,11 @@ void llvm::hoistAllInstructionsInto(BasicBlock *DomBlock, Instruction *InsertPt,
// retain their original debug locations (DILocations) and debug intrinsic
// instructions.
//
- // Doing so would degrade the debugging experience and adversely affect the
- // accuracy of profiling information.
+ // Doing so would degrade the debugging experience.
+ //
+ // FIXME: Issue #152767: debug info should also be the same as the
+ // original branch, **if** the user explicitly indicated that (for sampling
+ // PGO)
//
// Currently, when hoisting the instructions, we take the following actions:
// - Remove their debug intrinsic instructions.
More information about the llvm-branch-commits
mailing list