[llvm] cea2c86 - [OMPIRBuilder][Debug] Remove unnecessary code. (#156468)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 2 13:09:41 PDT 2025


Author: Abid Qadeer
Date: 2025-09-02T21:09:36+01:00
New Revision: cea2c8625e801bdabca5e73d050300dc4060df00

URL: https://github.com/llvm/llvm-project/commit/cea2c8625e801bdabca5e73d050300dc4060df00
DIFF: https://github.com/llvm/llvm-project/commit/cea2c8625e801bdabca5e73d050300dc4060df00.diff

LOG: [OMPIRBuilder][Debug] Remove unnecessary code. (#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.

Added: 
    

Modified: 
    llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
index e740c2819fec9..03ea58318d4a9 100644
--- a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+++ b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
@@ -7382,9 +7382,8 @@ 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);
-
+    assert(!isa<llvm::DbgVariableIntrinsic>(&I) &&
+           "Unexpected debug intrinsic");
     for (DbgVariableRecord &DVR : filterDbgVars(I.getDbgRecordRange()))
       UpdateDebugRecord(&DVR);
   }


        


More information about the llvm-commits mailing list