[llvm] [OMPIRBuilder][Debug] Remove unnecessary code. (PR #156468)
Abid Qadeer via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 2 07:50:59 PDT 2025
https://github.com/abidh created https://github.com/llvm/llvm-project/pull/156468
In the code that fix ups the debug information, we handles both the debug intrinsics and debug records. The debug intrinsics are being phased out and I recently changed mlir translation to not generate them. This means that we should not get debug intrinsics anymore and code can be simplified by removing their handling.
>From 301294238d88b5d51eb0f9ee4c33175cfd947a9d Mon Sep 17 00:00:00 2001
From: Abid Qadeer <haqadeer at amd.com>
Date: Tue, 2 Sep 2025 15:42:55 +0100
Subject: [PATCH] [OMPIRBuilder][Debug] Remove unnecessary code.
In the code that fixups the debug information, we handles both the
debug intrinsics and debug records. With recent changes in mlir
translation, we should not get debug intrinsics anymore. This
means we can simplify the code by removing the handling for debug
intrinsics and only focusing on debug records.
---
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp | 3 ---
1 file changed, 3 deletions(-)
diff --git a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
index e740c2819fec9..bd8f3835edd0d 100644
--- a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+++ b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
@@ -7382,9 +7382,6 @@ static void FixupDebugInfoForOutlinedFunction(
// The location and scope of variable intrinsics and records still point to
// the parent function of the target region. Update them.
for (Instruction &I : instructions(Func)) {
- if (auto *DDI = dyn_cast<llvm::DbgVariableIntrinsic>(&I))
- UpdateDebugRecord(DDI);
-
for (DbgVariableRecord &DVR : filterDbgVars(I.getDbgRecordRange()))
UpdateDebugRecord(&DVR);
}
More information about the llvm-commits
mailing list