Skip to content

Conversation

@abidh
Copy link
Contributor

@abidh abidh commented Jul 30, 2025

This fixes #147063.

I tried to fix this issue in more general way in #147091 but the reviewer suggested to fix the locations which are causing this issue. So this is a more targeted approach.

The restoreIP is frequently used in the OMPIRBuilder to change the insert position. This function eventually calls SetInsertPoint(BasicBlock *TheBB, BasicBlock::iterator IP). This function updates the insert point and the debug location. But if the IP is pointing to the end of the TheBB, then the debug location is not updated and we could have a mismatch between insert point and the debug location.

The problem can occur in 2 different code patterns.

This code below shows the first scenario.

  1. auto curPos = builder.saveIP();
  2. builder.restoreIP(/* some new pos */);
  3.  // generate some code
  4. builder.restoreIP(curPos);

If curPos points to the end of basic block, we could have a problem. But it is easy one to handle as we have the location before hand and can save the correct debug location before 2 and then restore it after 3. This can be done either manually or using the llvm::InsertPointGuard as shown below.

  // manual approach
  auto curPos = builder.saveIP();
  llvm::DebugLoc DbgLoc = builder.getCurrentDebugLocation();
  builder.restoreIP(/* some new pos */);
  // generate some code
  builder.SetCurrentDebugLocation(DbgLoc);
  builder.restoreIP(curPos);

  {
     // using InsertPointGuard
     llvm::InsertPointGuard IPG(builder);
     builder.restoreIP(/* some new pos */);
     // generate some code
  }

This PR fixes one problematic case using the manual approach.

For the 2nd scenario, look at the code below.

1. void fn(InsertPointTy allocIP, InsertPointTy codegenIP) {
2.   builder.setInsertPoint(allocIP);
3.   // generate some alloca
4.   builder.setInsertPoint(codegenIP);
5. }

The fn can be called from anywhere and we can't assume the debug location of the builder is valid at the start of the function. So if 4 does not update the debug location because the codegenIP points at the end of the block, the rest of the code can end up using the debug location of the allocaIP. Unlike the first case, we don't have a debug location that we can save before hand and restore afterwards.

The solution here is to use the location of the last instruction in that block. I have added a wrapper function over restoreIP that could be called for such cases. This PR uses it to fix one problematic case.

This fixes llvm#147063.

I tried to fix this issue in more general way in
llvm#147091 but the reviewer
suggested to fix the locations which are causing this issue. So this is
a more targeted approach.

The problem is that InsertPoint class does not hold the debug location.
It is obtained from the instruction at the current position. But if
the current position is at the end of the block, we just leave the debug
location as is (see SetInsertPoint).

We have 2 scenarios that we need to handle:

In first situation, we have the location before hand and we can save the
correct debug location. For example, in the following code, even if the
line 3 does not end up setting the debug location, we can save it before
line 1 and then restore it. This can be done either manually or
using the llvm::InsertPointGuard as shown below.
  1. auto curPos = builder.saveIP();
  2. builder.restoreIP(/* some new pos */);
  3. builder.restoreIP(curPos);

    {
      llvm::InsertPointGuard IPG(builder);
      builder.restoreIP(/* some new pos */);
    }

For the 2nd scenario, look at the code below.

1. void fn(InsertPointTy allocIP, InsertPointTy codegenIP) {
2.   builder.setInsertPoint(allocIP);
3.   // generate some alloca
4.   builder.setInsertPoint(codegenIP);
5. }

The fn can be called from anywhere and we can't assume the debug location
of the builder is at the valid location. So if line 4 does not update
the debug location because the codegenIP points at the end of the block,
the rest of the code can end up using the debug location of the allocaIP.

The solution here is to use the locaiton of the last instruction in that
block for such case. I have added a wrapper function over restoreIP
that could be called for such cases.
@llvmbot
Copy link
Member

llvmbot commented Jul 30, 2025

@llvm/pr-subscribers-mlir-openmp
@llvm/pr-subscribers-mlir

@llvm/pr-subscribers-flang-openmp

Author: Abid Qadeer (abidh)

Changes

This fixes #147063.

I tried to fix this issue in more general way in #147091 but the reviewer suggested to fix the locations which are causing this issue. So this is a more targeted approach.

The restoreIP is frequently used in the OMPIRBuilder to change the insert position. This function eventually calls SetInsertPoint(BasicBlock *TheBB, BasicBlock::iterator IP). This function updates the insert point and the debug location. But if the IP is pointing to the end of the TheBB, then the debug location is not updated and we could have a mismatch between insert point and the debug location.

The problem can occur in 2 different code patterns.

This code below shows the first scenario.

  1. auto curPos = builder.saveIP();
  2. builder.restoreIP(/* some new pos */);
  3.  // generate some code
  4. builder.restoreIP(curPos);

If curPos points to the end of basic block, we could have a problem. But it is easy one to handle as we have the location before hand and can save the correct debug location before 2 and then restore it after 3. This can be done either manually or using the llvm::InsertPointGuard as shown below.

  // manual approach
  auto curPos = builder.saveIP();
  llvm::DebugLoc DbgLoc = builder.getCurrentDebugLocation();
  builder.restoreIP(/* some new pos */);
  // generate some code
  builder.SetCurrentDebugLocation(DbgLoc);
  builder.restoreIP(curPos);

  {
     // using InsertPointGuard
     llvm::InsertPointGuard IPG(builder);
     builder.restoreIP(/* some new pos */);
     // generate some code
  }

This PR fixes one problematic case using the manual approach.

For the 2nd scenario, look at the code below.

1. void fn(InsertPointTy allocIP, InsertPointTy codegenIP) {
2.   builder.setInsertPoint(allocIP);
3.   // generate some alloca
4.   builder.setInsertPoint(codegenIP);
5. }

The fn can be called from anywhere and we can't assume the debug location of the builder is valid at the start of the function. So if 4 does not update the debug location because the codegenIP points at the end of the block, the rest of the code can end up using the debug location of the allocaIP. Unlike the first case, we don't have a debug location that we can save before hand and restore afterwards.

The solution here is to use the location of the last instruction in that block. I have added a wrapper function over restoreIP that could be called for such cases. This PR uses it to fix one problematic case.


Full diff: https://github.com/llvm/llvm-project/pull/151306.diff

3 Files Affected:

  • (modified) llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp (+15-3)
  • (modified) mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp (+2)
  • (added) mlir/test/Target/LLVMIR/omptarget-debug-147063.mlir (+45)
diff --git a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
index 3aa4f7ae04c33..6e266912dc59c 100644
--- a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+++ b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
@@ -92,6 +92,18 @@ static bool isConflictIP(IRBuilder<>::InsertPoint IP1,
   return IP1.getBlock() == IP2.getBlock() && IP1.getPoint() == IP2.getPoint();
 }
 
+/// This is wrapper over IRBuilderBase::restoreIP that also restores the current
+/// debug location to the last instruction in the specified basic block if the
+/// insert point points to the end of the block.
+static void restoreIPandDebugLoc(llvm::IRBuilderBase &Builder,
+                                 llvm::IRBuilderBase::InsertPoint IP) {
+  Builder.restoreIP(IP);
+  llvm::BasicBlock *BB = Builder.GetInsertBlock();
+  llvm::BasicBlock::iterator I = Builder.GetInsertPoint();
+  if (!BB->empty() && I == BB->end())
+    Builder.SetCurrentDebugLocation(BB->back().getStableDebugLoc());
+}
+
 static bool isValidWorkshareLoopScheduleType(OMPScheduleType SchedType) {
   // Valid ordered/unordered and base algorithm combinations.
   switch (SchedType & ~OMPScheduleType::MonotonicityMask) {
@@ -8586,7 +8598,7 @@ Error OpenMPIRBuilder::emitOffloadingArrays(
     ArrayType *SizeArrayType = ArrayType::get(Int64Ty, Info.NumberOfPtrs);
     Info.RTArgs.SizesArray = Builder.CreateAlloca(
         SizeArrayType, /* ArraySize = */ nullptr, ".offload_sizes");
-    Builder.restoreIP(CodeGenIP);
+    restoreIPandDebugLoc(Builder, CodeGenIP);
   } else {
     auto *SizesArrayInit = ConstantArray::get(
         ArrayType::get(Int64Ty, ConstSizes.size()), ConstSizes);
@@ -8605,7 +8617,7 @@ Error OpenMPIRBuilder::emitOffloadingArrays(
       AllocaInst *Buffer = Builder.CreateAlloca(
           SizeArrayType, /* ArraySize = */ nullptr, ".offload_sizes");
       Buffer->setAlignment(OffloadSizeAlign);
-      Builder.restoreIP(CodeGenIP);
+      restoreIPandDebugLoc(Builder, CodeGenIP);
       Builder.CreateMemCpy(
           Buffer, M.getDataLayout().getPrefTypeAlign(Buffer->getType()),
           SizesArrayGbl, OffloadSizeAlign,
@@ -8615,7 +8627,7 @@ Error OpenMPIRBuilder::emitOffloadingArrays(
 
       Info.RTArgs.SizesArray = Buffer;
     }
-    Builder.restoreIP(CodeGenIP);
+    restoreIPandDebugLoc(Builder, CodeGenIP);
   }
 
   // The map types are always constant so we don't need to generate code to
diff --git a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
index 49e1e55c686a6..c74632f69569a 100644
--- a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
@@ -4326,9 +4326,11 @@ createAlteredByCaptureMap(MapInfoData &mapData,
 
         if (!isPtrTy) {
           auto curInsert = builder.saveIP();
+          llvm::DebugLoc DbgLoc = builder.getCurrentDebugLocation();
           builder.restoreIP(findAllocaInsertPoint(builder, moduleTranslation));
           auto *memTempAlloc =
               builder.CreateAlloca(builder.getPtrTy(), nullptr, ".casted");
+          builder.SetCurrentDebugLocation(DbgLoc);
           builder.restoreIP(curInsert);
 
           builder.CreateStore(newV, memTempAlloc);
diff --git a/mlir/test/Target/LLVMIR/omptarget-debug-147063.mlir b/mlir/test/Target/LLVMIR/omptarget-debug-147063.mlir
new file mode 100644
index 0000000000000..12d389adbb388
--- /dev/null
+++ b/mlir/test/Target/LLVMIR/omptarget-debug-147063.mlir
@@ -0,0 +1,45 @@
+// RUN: mlir-translate -mlir-to-llvmir %s
+
+module attributes {llvm.target_triple = "x86_64-unknown-linux-gnu", omp.is_gpu = false, omp.is_target_device = false, omp.target_triples = ["amdgcn-amd-amdhsa"]} {
+  omp.private {type = private} @_QFFfnEv_private_i32 : i32 loc(#loc1)
+  llvm.func internal @_QFPfn() {
+    %0 = llvm.mlir.constant(1 : i64) : i64 loc(#loc1)
+    %1 = llvm.alloca %0 x i32 {bindc_name = "v"} : (i64) -> !llvm.ptr loc(#loc1)
+    %2 = llvm.mlir.constant(1 : i32) : i32
+    omp.parallel private(@_QFFfnEv_private_i32 %1 -> %arg0 : !llvm.ptr) {
+      llvm.store %2, %arg0 : i32, !llvm.ptr loc(#loc2)
+      %4 = omp.map.info var_ptr(%arg0 : !llvm.ptr, i32) map_clauses(implicit, exit_release_or_enter_alloc) capture(ByCopy) -> !llvm.ptr {name = "v"} loc(#loc2)
+      omp.target map_entries(%4 -> %arg1 : !llvm.ptr) {
+        %5 = llvm.mlir.constant(1 : i32) : i32
+        %6 = llvm.load %arg1 : !llvm.ptr -> i32 loc(#loc3)
+        %7 = llvm.add %6, %5 : i32 loc(#loc3)
+        llvm.store %7, %arg1 : i32, !llvm.ptr loc(#loc3)
+        omp.terminator loc(#loc3)
+      } loc(#loc7)
+      omp.terminator
+    } loc(#loc4)
+    llvm.return
+  } loc(#loc6)
+}
+
+#di_file = #llvm.di_file<"target.f90" in "">
+#di_null_type = #llvm.di_null_type
+#di_compile_unit = #llvm.di_compile_unit<id = distinct[0]<>,
+ sourceLanguage = DW_LANG_Fortran95, file = #di_file, producer = "flang",
+ isOptimized = false, emissionKind = LineTablesOnly>
+#di_subroutine_type = #llvm.di_subroutine_type<
+  callingConvention = DW_CC_program, types = #di_null_type>
+#di_subprogram = #llvm.di_subprogram<id = distinct[1]<>,
+  compileUnit = #di_compile_unit, scope = #di_file, name = "main",
+  file = #di_file, subprogramFlags = "Definition|MainSubprogram",
+  type = #di_subroutine_type>
+#di_subprogram1 = #llvm.di_subprogram<compileUnit = #di_compile_unit,
+  name = "target", file = #di_file, subprogramFlags = "Definition",
+  type = #di_subroutine_type>
+
+#loc1 = loc("test.f90":7:15)
+#loc2 = loc("test.f90":1:7)
+#loc3 = loc("test.f90":3:7)
+#loc4 = loc("test.f90":16:7)
+#loc6 = loc(fused<#di_subprogram>[#loc1])
+#loc7 = loc(fused<#di_subprogram1>[#loc3])

@llvmbot
Copy link
Member

llvmbot commented Jul 30, 2025

@llvm/pr-subscribers-mlir-llvm

Author: Abid Qadeer (abidh)

Changes

This fixes #147063.

I tried to fix this issue in more general way in #147091 but the reviewer suggested to fix the locations which are causing this issue. So this is a more targeted approach.

The restoreIP is frequently used in the OMPIRBuilder to change the insert position. This function eventually calls SetInsertPoint(BasicBlock *TheBB, BasicBlock::iterator IP). This function updates the insert point and the debug location. But if the IP is pointing to the end of the TheBB, then the debug location is not updated and we could have a mismatch between insert point and the debug location.

The problem can occur in 2 different code patterns.

This code below shows the first scenario.

  1. auto curPos = builder.saveIP();
  2. builder.restoreIP(/* some new pos */);
  3.  // generate some code
  4. builder.restoreIP(curPos);

If curPos points to the end of basic block, we could have a problem. But it is easy one to handle as we have the location before hand and can save the correct debug location before 2 and then restore it after 3. This can be done either manually or using the llvm::InsertPointGuard as shown below.

  // manual approach
  auto curPos = builder.saveIP();
  llvm::DebugLoc DbgLoc = builder.getCurrentDebugLocation();
  builder.restoreIP(/* some new pos */);
  // generate some code
  builder.SetCurrentDebugLocation(DbgLoc);
  builder.restoreIP(curPos);

  {
     // using InsertPointGuard
     llvm::InsertPointGuard IPG(builder);
     builder.restoreIP(/* some new pos */);
     // generate some code
  }

This PR fixes one problematic case using the manual approach.

For the 2nd scenario, look at the code below.

1. void fn(InsertPointTy allocIP, InsertPointTy codegenIP) {
2.   builder.setInsertPoint(allocIP);
3.   // generate some alloca
4.   builder.setInsertPoint(codegenIP);
5. }

The fn can be called from anywhere and we can't assume the debug location of the builder is valid at the start of the function. So if 4 does not update the debug location because the codegenIP points at the end of the block, the rest of the code can end up using the debug location of the allocaIP. Unlike the first case, we don't have a debug location that we can save before hand and restore afterwards.

The solution here is to use the location of the last instruction in that block. I have added a wrapper function over restoreIP that could be called for such cases. This PR uses it to fix one problematic case.


Full diff: https://github.com/llvm/llvm-project/pull/151306.diff

3 Files Affected:

  • (modified) llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp (+15-3)
  • (modified) mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp (+2)
  • (added) mlir/test/Target/LLVMIR/omptarget-debug-147063.mlir (+45)
diff --git a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
index 3aa4f7ae04c33..6e266912dc59c 100644
--- a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+++ b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
@@ -92,6 +92,18 @@ static bool isConflictIP(IRBuilder<>::InsertPoint IP1,
   return IP1.getBlock() == IP2.getBlock() && IP1.getPoint() == IP2.getPoint();
 }
 
+/// This is wrapper over IRBuilderBase::restoreIP that also restores the current
+/// debug location to the last instruction in the specified basic block if the
+/// insert point points to the end of the block.
+static void restoreIPandDebugLoc(llvm::IRBuilderBase &Builder,
+                                 llvm::IRBuilderBase::InsertPoint IP) {
+  Builder.restoreIP(IP);
+  llvm::BasicBlock *BB = Builder.GetInsertBlock();
+  llvm::BasicBlock::iterator I = Builder.GetInsertPoint();
+  if (!BB->empty() && I == BB->end())
+    Builder.SetCurrentDebugLocation(BB->back().getStableDebugLoc());
+}
+
 static bool isValidWorkshareLoopScheduleType(OMPScheduleType SchedType) {
   // Valid ordered/unordered and base algorithm combinations.
   switch (SchedType & ~OMPScheduleType::MonotonicityMask) {
@@ -8586,7 +8598,7 @@ Error OpenMPIRBuilder::emitOffloadingArrays(
     ArrayType *SizeArrayType = ArrayType::get(Int64Ty, Info.NumberOfPtrs);
     Info.RTArgs.SizesArray = Builder.CreateAlloca(
         SizeArrayType, /* ArraySize = */ nullptr, ".offload_sizes");
-    Builder.restoreIP(CodeGenIP);
+    restoreIPandDebugLoc(Builder, CodeGenIP);
   } else {
     auto *SizesArrayInit = ConstantArray::get(
         ArrayType::get(Int64Ty, ConstSizes.size()), ConstSizes);
@@ -8605,7 +8617,7 @@ Error OpenMPIRBuilder::emitOffloadingArrays(
       AllocaInst *Buffer = Builder.CreateAlloca(
           SizeArrayType, /* ArraySize = */ nullptr, ".offload_sizes");
       Buffer->setAlignment(OffloadSizeAlign);
-      Builder.restoreIP(CodeGenIP);
+      restoreIPandDebugLoc(Builder, CodeGenIP);
       Builder.CreateMemCpy(
           Buffer, M.getDataLayout().getPrefTypeAlign(Buffer->getType()),
           SizesArrayGbl, OffloadSizeAlign,
@@ -8615,7 +8627,7 @@ Error OpenMPIRBuilder::emitOffloadingArrays(
 
       Info.RTArgs.SizesArray = Buffer;
     }
-    Builder.restoreIP(CodeGenIP);
+    restoreIPandDebugLoc(Builder, CodeGenIP);
   }
 
   // The map types are always constant so we don't need to generate code to
diff --git a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
index 49e1e55c686a6..c74632f69569a 100644
--- a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
@@ -4326,9 +4326,11 @@ createAlteredByCaptureMap(MapInfoData &mapData,
 
         if (!isPtrTy) {
           auto curInsert = builder.saveIP();
+          llvm::DebugLoc DbgLoc = builder.getCurrentDebugLocation();
           builder.restoreIP(findAllocaInsertPoint(builder, moduleTranslation));
           auto *memTempAlloc =
               builder.CreateAlloca(builder.getPtrTy(), nullptr, ".casted");
+          builder.SetCurrentDebugLocation(DbgLoc);
           builder.restoreIP(curInsert);
 
           builder.CreateStore(newV, memTempAlloc);
diff --git a/mlir/test/Target/LLVMIR/omptarget-debug-147063.mlir b/mlir/test/Target/LLVMIR/omptarget-debug-147063.mlir
new file mode 100644
index 0000000000000..12d389adbb388
--- /dev/null
+++ b/mlir/test/Target/LLVMIR/omptarget-debug-147063.mlir
@@ -0,0 +1,45 @@
+// RUN: mlir-translate -mlir-to-llvmir %s
+
+module attributes {llvm.target_triple = "x86_64-unknown-linux-gnu", omp.is_gpu = false, omp.is_target_device = false, omp.target_triples = ["amdgcn-amd-amdhsa"]} {
+  omp.private {type = private} @_QFFfnEv_private_i32 : i32 loc(#loc1)
+  llvm.func internal @_QFPfn() {
+    %0 = llvm.mlir.constant(1 : i64) : i64 loc(#loc1)
+    %1 = llvm.alloca %0 x i32 {bindc_name = "v"} : (i64) -> !llvm.ptr loc(#loc1)
+    %2 = llvm.mlir.constant(1 : i32) : i32
+    omp.parallel private(@_QFFfnEv_private_i32 %1 -> %arg0 : !llvm.ptr) {
+      llvm.store %2, %arg0 : i32, !llvm.ptr loc(#loc2)
+      %4 = omp.map.info var_ptr(%arg0 : !llvm.ptr, i32) map_clauses(implicit, exit_release_or_enter_alloc) capture(ByCopy) -> !llvm.ptr {name = "v"} loc(#loc2)
+      omp.target map_entries(%4 -> %arg1 : !llvm.ptr) {
+        %5 = llvm.mlir.constant(1 : i32) : i32
+        %6 = llvm.load %arg1 : !llvm.ptr -> i32 loc(#loc3)
+        %7 = llvm.add %6, %5 : i32 loc(#loc3)
+        llvm.store %7, %arg1 : i32, !llvm.ptr loc(#loc3)
+        omp.terminator loc(#loc3)
+      } loc(#loc7)
+      omp.terminator
+    } loc(#loc4)
+    llvm.return
+  } loc(#loc6)
+}
+
+#di_file = #llvm.di_file<"target.f90" in "">
+#di_null_type = #llvm.di_null_type
+#di_compile_unit = #llvm.di_compile_unit<id = distinct[0]<>,
+ sourceLanguage = DW_LANG_Fortran95, file = #di_file, producer = "flang",
+ isOptimized = false, emissionKind = LineTablesOnly>
+#di_subroutine_type = #llvm.di_subroutine_type<
+  callingConvention = DW_CC_program, types = #di_null_type>
+#di_subprogram = #llvm.di_subprogram<id = distinct[1]<>,
+  compileUnit = #di_compile_unit, scope = #di_file, name = "main",
+  file = #di_file, subprogramFlags = "Definition|MainSubprogram",
+  type = #di_subroutine_type>
+#di_subprogram1 = #llvm.di_subprogram<compileUnit = #di_compile_unit,
+  name = "target", file = #di_file, subprogramFlags = "Definition",
+  type = #di_subroutine_type>
+
+#loc1 = loc("test.f90":7:15)
+#loc2 = loc("test.f90":1:7)
+#loc3 = loc("test.f90":3:7)
+#loc4 = loc("test.f90":16:7)
+#loc6 = loc(fused<#di_subprogram>[#loc1])
+#loc7 = loc(fused<#di_subprogram1>[#loc3])

@abidh
Copy link
Contributor Author

abidh commented Aug 11, 2025

Polite ping.

Copy link
Member

@TIFitis TIFitis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@abidh abidh merged commit 049953f into llvm:main Aug 11, 2025
15 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 11, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux-fuzzer running on sanitizer-buildbot6 while building llvm,mlir at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/32/builds/23041

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
[4/79] Linking CXX shared module unittests/Passes/Plugins/TestPlugin.so
[5/79] Linking CXX shared module unittests/Analysis/InlineOrderPlugin.so
[6/79] Generating VCSVersion.inc
[7/77] Linking CXX shared module unittests/CodeGen/CGPluginTest/CGTestPlugin.so
[8/77] Linking CXX shared module unittests/Support/DynamicLibrary/SecondLib.so
[9/77] Linking CXX shared module unittests/Passes/Plugins/DoublerPlugin.so
[10/77] Linking CXX shared module unittests/Analysis/InlineAdvisorPlugin.so
[11/77] Linking CXX shared module unittests/Support/DynamicLibrary/PipSqueak.so
[12/77] Linking CXX executable bin/llvm-config
[13/77] Building CXX object lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPIRBuilder.cpp.o
FAILED: lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPIRBuilder.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes CCACHE_SLOPPINESS=pch_defines,time_macros /usr/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm_build0/lib/Frontend/OpenMP -I/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/llvm/lib/Frontend/OpenMP -I/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm_build0/include -I/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPIRBuilder.cpp.o -MF lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPIRBuilder.cpp.o.d -o lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPIRBuilder.cpp.o -c /home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:9008:5: error: use of undeclared identifier 'restoreIPandDebugLoc'
 9008 |     restoreIPandDebugLoc(Builder, CodeGenIP);
      |     ^
/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:9027:7: error: use of undeclared identifier 'restoreIPandDebugLoc'
 9027 |       restoreIPandDebugLoc(Builder, CodeGenIP);
      |       ^
/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:9037:5: error: use of undeclared identifier 'restoreIPandDebugLoc'
 9037 |     restoreIPandDebugLoc(Builder, CodeGenIP);
      |     ^
3 errors generated.
ninja: build stopped: subcommand failed.
Step 7 (stage1 build all) failure: stage1 build all (failure)
...
[4/79] Linking CXX shared module unittests/Passes/Plugins/TestPlugin.so
[5/79] Linking CXX shared module unittests/Analysis/InlineOrderPlugin.so
[6/79] Generating VCSVersion.inc
[7/77] Linking CXX shared module unittests/CodeGen/CGPluginTest/CGTestPlugin.so
[8/77] Linking CXX shared module unittests/Support/DynamicLibrary/SecondLib.so
[9/77] Linking CXX shared module unittests/Passes/Plugins/DoublerPlugin.so
[10/77] Linking CXX shared module unittests/Analysis/InlineAdvisorPlugin.so
[11/77] Linking CXX shared module unittests/Support/DynamicLibrary/PipSqueak.so
[12/77] Linking CXX executable bin/llvm-config
[13/77] Building CXX object lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPIRBuilder.cpp.o
FAILED: lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPIRBuilder.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes CCACHE_SLOPPINESS=pch_defines,time_macros /usr/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm_build0/lib/Frontend/OpenMP -I/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/llvm/lib/Frontend/OpenMP -I/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm_build0/include -I/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPIRBuilder.cpp.o -MF lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPIRBuilder.cpp.o.d -o lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPIRBuilder.cpp.o -c /home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:9008:5: error: use of undeclared identifier 'restoreIPandDebugLoc'
 9008 |     restoreIPandDebugLoc(Builder, CodeGenIP);
      |     ^
/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:9027:7: error: use of undeclared identifier 'restoreIPandDebugLoc'
 9027 |       restoreIPandDebugLoc(Builder, CodeGenIP);
      |       ^
/home/b/sanitizer-x86_64-linux-fuzzer/build/llvm-project/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:9037:5: error: use of undeclared identifier 'restoreIPandDebugLoc'
 9037 |     restoreIPandDebugLoc(Builder, CodeGenIP);
      |     ^
3 errors generated.
ninja: build stopped: subcommand failed.
program finished with exit code 1
elapsedTime=40.381514

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 11, 2025

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-win-fast running on as-builder-3 while building llvm,mlir at step 6 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/2/builds/31009

Here is the relevant piece of the build log for the reference
Step 6 (build-unified-tree) failure: build (failure)
...
[2107/4266] Building CXX object lib\DebugInfo\PDB\CMakeFiles\LLVMDebugInfoPDB.dir\Native\NativeTypeArray.cpp.obj
[2108/4266] Building CXX object lib\DebugInfo\PDB\CMakeFiles\LLVMDebugInfoPDB.dir\Native\NativeTypeUDT.cpp.obj
[2109/4266] Building CXX object lib\ExecutionEngine\Orc\CMakeFiles\LLVMOrcJIT.dir\COFF.cpp.obj
[2110/4266] Building CXX object lib\ExecutionEngine\JITLink\CMakeFiles\LLVMJITLink.dir\XCOFF.cpp.obj
[2111/4266] Building CXX object lib\ExecutionEngine\Orc\CMakeFiles\LLVMOrcJIT.dir\AbsoluteSymbols.cpp.obj
[2112/4266] Building CXX object lib\ExecutionEngine\Orc\CMakeFiles\LLVMOrcJIT.dir\EPCDynamicLibrarySearchGenerator.cpp.obj
[2113/4266] Building CXX object lib\ExecutionEngine\Interpreter\CMakeFiles\LLVMInterpreter.dir\Interpreter.cpp.obj
[2114/4266] Building CXX object lib\ExecutionEngine\MCJIT\CMakeFiles\LLVMMCJIT.dir\MCJIT.cpp.obj
[2115/4266] Building CXX object lib\ExecutionEngine\Orc\CMakeFiles\LLVMOrcJIT.dir\Core.cpp.obj
[2116/4266] Building CXX object lib\Frontend\OpenMP\CMakeFiles\LLVMFrontendOpenMP.dir\OMPIRBuilder.cpp.obj
FAILED: lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPIRBuilder.cpp.obj 
C:\ninja\ccache.exe C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\Tools\MSVC\1438~1.331\bin\Hostx64\x64\cl.exe  /nologo /TP -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\build\lib\Frontend\OpenMP -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\lib\Frontend\OpenMP -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\build\include -IC:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\include /DWIN32 /D_WINDOWS   /Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 -wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 -wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 -wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 -wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -wd4251 -wd4275 -w14062 -we4238 /Gw /O2 /Ob2 /DNDEBUG -MD  /EHs-c- /GR- -std:c++17 /showIncludes /Folib\Frontend\OpenMP\CMakeFiles\LLVMFrontendOpenMP.dir\OMPIRBuilder.cpp.obj /Fdlib\Frontend\OpenMP\CMakeFiles\LLVMFrontendOpenMP.dir\LLVMFrontendOpenMP.pdb /FS -c C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\lib\Frontend\OpenMP\OMPIRBuilder.cpp
C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\lib\Frontend\OpenMP\OMPIRBuilder.cpp(9008): error C3861: 'restoreIPandDebugLoc': identifier not found
C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\lib\Frontend\OpenMP\OMPIRBuilder.cpp(9027): error C3861: 'restoreIPandDebugLoc': identifier not found
C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\llvm\lib\Frontend\OpenMP\OMPIRBuilder.cpp(9037): error C3861: 'restoreIPandDebugLoc': identifier not found
[2117/4266] Building CXX object lib\ExecutionEngine\Orc\CMakeFiles\LLVMOrcJIT.dir\EPCDebugObjectRegistrar.cpp.obj
[2118/4266] Building CXX object lib\ExecutionEngine\Orc\CMakeFiles\LLVMOrcJIT.dir\DebugUtils.cpp.obj
[2119/4266] Building CXX object lib\ExecutionEngine\Orc\CMakeFiles\LLVMOrcJIT.dir\EPCGenericDylibManager.cpp.obj
[2120/4266] Building CXX object lib\ExecutionEngine\Orc\CMakeFiles\LLVMOrcJIT.dir\GetDylibInterface.cpp.obj
[2121/4266] Building CXX object lib\ExecutionEngine\Orc\CMakeFiles\LLVMOrcJIT.dir\EHFrameRegistrationPlugin.cpp.obj
[2122/4266] Building CXX object lib\ExecutionEngine\Orc\CMakeFiles\LLVMOrcJIT.dir\COFFVCRuntimeSupport.cpp.obj
[2123/4266] Building CXX object lib\ExecutionEngine\Orc\CMakeFiles\LLVMOrcJIT.dir\CompileUtils.cpp.obj
[2124/4266] Building CXX object lib\ExecutionEngine\Orc\CMakeFiles\LLVMOrcJIT.dir\CompileOnDemandLayer.cpp.obj
[2125/4266] Building CXX object lib\ExecutionEngine\Orc\CMakeFiles\LLVMOrcJIT.dir\EPCGenericJITLinkMemoryManager.cpp.obj
[2126/4266] Building CXX object lib\ExecutionEngine\Orc\CMakeFiles\LLVMOrcJIT.dir\COFFPlatform.cpp.obj
[2127/4266] Building CXX object lib\ExecutionEngine\JITLink\CMakeFiles\LLVMJITLink.dir\MachO.cpp.obj
[2128/4266] Building CXX object lib\ExecutionEngine\JITLink\CMakeFiles\LLVMJITLink.dir\JITLinkGeneric.cpp.obj
[2129/4266] Building CXX object lib\ExecutionEngine\JITLink\CMakeFiles\LLVMJITLink.dir\CompactUnwindSupport.cpp.obj
[2130/4266] Building CXX object lib\ExecutionEngine\JITLink\CMakeFiles\LLVMJITLink.dir\DWARFRecordSectionSplitter.cpp.obj
[2131/4266] Building CXX object lib\ExecutionEngine\JITLink\CMakeFiles\LLVMJITLink.dir\JITLinkMemoryManager.cpp.obj
[2132/4266] Building CXX object lib\ExecutionEngine\JITLink\CMakeFiles\LLVMJITLink.dir\riscv.cpp.obj
[2133/4266] Building CXX object lib\ExecutionEngine\JITLink\CMakeFiles\LLVMJITLink.dir\ppc64.cpp.obj
[2134/4266] Building CXX object lib\ExecutionEngine\JITLink\CMakeFiles\LLVMJITLink.dir\COFFLinkGraphBuilder.cpp.obj
[2135/4266] Building CXX object lib\ExecutionEngine\JITLink\CMakeFiles\LLVMJITLink.dir\x86.cpp.obj
[2136/4266] Building CXX object lib\ExecutionEngine\JITLink\CMakeFiles\LLVMJITLink.dir\ELF.cpp.obj
[2137/4266] Building CXX object lib\ExecutionEngine\JITLink\CMakeFiles\LLVMJITLink.dir\COFF.cpp.obj
[2138/4266] Building CXX object lib\ExecutionEngine\JITLink\CMakeFiles\LLVMJITLink.dir\COFF_x86_64.cpp.obj
[2139/4266] Building CXX object lib\ExecutionEngine\JITLink\CMakeFiles\LLVMJITLink.dir\aarch32.cpp.obj
[2140/4266] Building CXX object lib\ExecutionEngine\JITLink\CMakeFiles\LLVMJITLink.dir\MachO_x86_64.cpp.obj
[2141/4266] Building CXX object lib\ExecutionEngine\JITLink\CMakeFiles\LLVMJITLink.dir\JITLink.cpp.obj
[2142/4266] Building CXX object lib\ExecutionEngine\JITLink\CMakeFiles\LLVMJITLink.dir\x86_64.cpp.obj
[2143/4266] Building CXX object lib\ExecutionEngine\JITLink\CMakeFiles\LLVMJITLink.dir\EHFrameSupport.cpp.obj
[2144/4266] Building CXX object lib\ExecutionEngine\JITLink\CMakeFiles\LLVMJITLink.dir\loongarch.cpp.obj
[2145/4266] Building CXX object lib\ExecutionEngine\JITLink\CMakeFiles\LLVMJITLink.dir\XCOFFLinkGraphBuilder.cpp.obj
[2146/4266] Building CXX object lib\ExecutionEngine\JITLink\CMakeFiles\LLVMJITLink.dir\MachOLinkGraphBuilder.cpp.obj
[2147/4266] Building CXX object lib\ExecutionEngine\JITLink\CMakeFiles\LLVMJITLink.dir\ELF_x86.cpp.obj
[2148/4266] Building CXX object lib\ExecutionEngine\JITLink\CMakeFiles\LLVMJITLink.dir\COFFDirectiveParser.cpp.obj
[2149/4266] Building CXX object lib\ExecutionEngine\JITLink\CMakeFiles\LLVMJITLink.dir\ELF_x86_64.cpp.obj
[2150/4266] Building CXX object lib\ExecutionEngine\JITLink\CMakeFiles\LLVMJITLink.dir\ELF_aarch32.cpp.obj

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 11, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-aarch64-linux-fuzzer running on sanitizer-buildbot12 while building llvm,mlir at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/159/builds/28424

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
[4/79] Linking CXX shared module unittests/Analysis/InlineAdvisorPlugin.so
[5/79] Generating VCSVersion.inc
[6/77] Linking CXX shared module unittests/Support/DynamicLibrary/PipSqueak.so
[7/77] Linking CXX shared module unittests/Analysis/InlineOrderPlugin.so
[8/77] Linking CXX shared module unittests/Passes/Plugins/TestPlugin.so
[9/77] Linking CXX shared module unittests/CodeGen/CGPluginTest/CGTestPlugin.so
[10/77] Linking CXX shared module unittests/Support/DynamicLibrary/SecondLib.so
[11/77] Linking CXX shared module unittests/Passes/Plugins/DoublerPlugin.so
[12/77] Linking CXX executable bin/llvm-config
[13/77] Building CXX object lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPIRBuilder.cpp.o
FAILED: lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPIRBuilder.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes CCACHE_SLOPPINESS=pch_defines,time_macros /usr/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/b/sanitizer-aarch64-linux-fuzzer/build/llvm_build0/lib/Frontend/OpenMP -I/home/b/sanitizer-aarch64-linux-fuzzer/build/llvm-project/llvm/lib/Frontend/OpenMP -I/home/b/sanitizer-aarch64-linux-fuzzer/build/llvm_build0/include -I/home/b/sanitizer-aarch64-linux-fuzzer/build/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPIRBuilder.cpp.o -MF lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPIRBuilder.cpp.o.d -o lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPIRBuilder.cpp.o -c /home/b/sanitizer-aarch64-linux-fuzzer/build/llvm-project/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
/home/b/sanitizer-aarch64-linux-fuzzer/build/llvm-project/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:9008:5: error: use of undeclared identifier 'restoreIPandDebugLoc'
 9008 |     restoreIPandDebugLoc(Builder, CodeGenIP);
      |     ^
/home/b/sanitizer-aarch64-linux-fuzzer/build/llvm-project/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:9027:7: error: use of undeclared identifier 'restoreIPandDebugLoc'
 9027 |       restoreIPandDebugLoc(Builder, CodeGenIP);
      |       ^
/home/b/sanitizer-aarch64-linux-fuzzer/build/llvm-project/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:9037:5: error: use of undeclared identifier 'restoreIPandDebugLoc'
 9037 |     restoreIPandDebugLoc(Builder, CodeGenIP);
      |     ^
3 errors generated.
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Aug 11, 2025

LLVM Buildbot has detected a new failure on builder fuchsia-x86_64-linux running on fuchsia-debian-64-us-central1-a-1 while building llvm,mlir at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/11/builds/21536

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/fuchsia-linux.py ...' (failure)
...
[1037/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/LowerIFunc.cpp.o
[1038/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/LowerAtomic.cpp.o
[1039/5163] Building CXX object lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/CodeViewDebug.cpp.o
[1040/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/BasicBlockUtils.cpp.o
[1041/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/LowerInvoke.cpp.o
[1042/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/LowerVectorIntrinsics.cpp.o
[1043/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/Instrumentation.cpp.o
[1044/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/InjectTLIMappings.cpp.o
[1045/5163] Building CXX object lib/CodeGen/GlobalISel/CMakeFiles/LLVMGlobalISel.dir/LegalizerHelper.cpp.o
[1046/5163] Building CXX object lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPIRBuilder.cpp.o
FAILED: lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPIRBuilder.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes CCACHE_SLOPPINESS=pch_defines,time_macros /usr/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-1qxbxo49/lib/Frontend/OpenMP -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/lib/Frontend/OpenMP -I/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-1qxbxo49/include -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -ffat-lto-objects -ffile-prefix-map=/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-1qxbxo49=../../llvm-project -ffile-prefix-map=/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/= -no-canonical-prefixes -O3 -DNDEBUG -fvisibility=default  -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -std=c++17 -MD -MT lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPIRBuilder.cpp.o -MF lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPIRBuilder.cpp.o.d -o lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPIRBuilder.cpp.o -c /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:9008:5: error: use of undeclared identifier 'restoreIPandDebugLoc'
 9008 |     restoreIPandDebugLoc(Builder, CodeGenIP);
      |     ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:9027:7: error: use of undeclared identifier 'restoreIPandDebugLoc'
 9027 |       restoreIPandDebugLoc(Builder, CodeGenIP);
      |       ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:9037:5: error: use of undeclared identifier 'restoreIPandDebugLoc'
 9037 |     restoreIPandDebugLoc(Builder, CodeGenIP);
      |     ^
3 errors generated.
[1047/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/CloneFunction.cpp.o
[1048/5163] Building CXX object lib/CodeGen/GlobalISel/CMakeFiles/LLVMGlobalISel.dir/CombinerHelper.cpp.o
[1049/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/NameAnonGlobals.cpp.o
[1050/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/Mem2Reg.cpp.o
[1051/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/IRNormalizer.cpp.o
[1052/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/LowerGlobalDtors.cpp.o
[1053/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/MatrixUtils.cpp.o
[1054/5163] Building CXX object lib/CodeGen/GlobalISel/CMakeFiles/LLVMGlobalISel.dir/IRTranslator.cpp.o
[1055/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/MetaRenamer.cpp.o
[1056/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/Utils.cpp.o
[1057/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/MisExpect.cpp.o
[1058/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/LibCallsShrinkWrap.cpp.o
[1059/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/LowerSwitch.cpp.o
[1060/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/CodeExtractor.cpp.o
[1061/5163] Building CXX object lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/DwarfDebug.cpp.o
[1062/5163] Building CXX object lib/CodeGen/SelectionDAG/CMakeFiles/LLVMSelectionDAG.dir/SelectionDAGBuilder.cpp.o
[1063/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/Debugify.cpp.o
[1064/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/ProfileVerify.cpp.o
[1065/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/SampleProfileInference.cpp.o
[1066/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/StripGCRelocates.cpp.o
[1067/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/SanitizerStats.cpp.o
[1068/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/UnifyFunctionExitNodes.cpp.o
[1069/5163] Building CXX object lib/DWARFLinker/Parallel/CMakeFiles/LLVMDWARFLinkerParallel.dir/DWARFLinkerImpl.cpp.o
[1070/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/SizeOpts.cpp.o
[1071/5163] Building CXX object lib/DWARFLinker/Classic/CMakeFiles/LLVMDWARFLinkerClassic.dir/DWARFLinker.cpp.o
[1072/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/LowerMemIntrinsics.cpp.o
[1073/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/StripNonLineTableDebugInfo.cpp.o
Step 6 (build) failure: build (failure)
...
[1037/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/LowerIFunc.cpp.o
[1038/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/LowerAtomic.cpp.o
[1039/5163] Building CXX object lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/CodeViewDebug.cpp.o
[1040/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/BasicBlockUtils.cpp.o
[1041/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/LowerInvoke.cpp.o
[1042/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/LowerVectorIntrinsics.cpp.o
[1043/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/Instrumentation.cpp.o
[1044/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/InjectTLIMappings.cpp.o
[1045/5163] Building CXX object lib/CodeGen/GlobalISel/CMakeFiles/LLVMGlobalISel.dir/LegalizerHelper.cpp.o
[1046/5163] Building CXX object lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPIRBuilder.cpp.o
FAILED: lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPIRBuilder.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes CCACHE_SLOPPINESS=pch_defines,time_macros /usr/bin/ccache /usr/bin/clang++ -DGTEST_HAS_RTTI=0 -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-1qxbxo49/lib/Frontend/OpenMP -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/lib/Frontend/OpenMP -I/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-1qxbxo49/include -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -ffat-lto-objects -ffile-prefix-map=/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-1qxbxo49=../../llvm-project -ffile-prefix-map=/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/= -no-canonical-prefixes -O3 -DNDEBUG -fvisibility=default  -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -std=c++17 -MD -MT lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPIRBuilder.cpp.o -MF lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPIRBuilder.cpp.o.d -o lib/Frontend/OpenMP/CMakeFiles/LLVMFrontendOpenMP.dir/OMPIRBuilder.cpp.o -c /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:9008:5: error: use of undeclared identifier 'restoreIPandDebugLoc'
 9008 |     restoreIPandDebugLoc(Builder, CodeGenIP);
      |     ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:9027:7: error: use of undeclared identifier 'restoreIPandDebugLoc'
 9027 |       restoreIPandDebugLoc(Builder, CodeGenIP);
      |       ^
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:9037:5: error: use of undeclared identifier 'restoreIPandDebugLoc'
 9037 |     restoreIPandDebugLoc(Builder, CodeGenIP);
      |     ^
3 errors generated.
[1047/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/CloneFunction.cpp.o
[1048/5163] Building CXX object lib/CodeGen/GlobalISel/CMakeFiles/LLVMGlobalISel.dir/CombinerHelper.cpp.o
[1049/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/NameAnonGlobals.cpp.o
[1050/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/Mem2Reg.cpp.o
[1051/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/IRNormalizer.cpp.o
[1052/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/LowerGlobalDtors.cpp.o
[1053/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/MatrixUtils.cpp.o
[1054/5163] Building CXX object lib/CodeGen/GlobalISel/CMakeFiles/LLVMGlobalISel.dir/IRTranslator.cpp.o
[1055/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/MetaRenamer.cpp.o
[1056/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/Utils.cpp.o
[1057/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/MisExpect.cpp.o
[1058/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/LibCallsShrinkWrap.cpp.o
[1059/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/LowerSwitch.cpp.o
[1060/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/CodeExtractor.cpp.o
[1061/5163] Building CXX object lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/DwarfDebug.cpp.o
[1062/5163] Building CXX object lib/CodeGen/SelectionDAG/CMakeFiles/LLVMSelectionDAG.dir/SelectionDAGBuilder.cpp.o
[1063/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/Debugify.cpp.o
[1064/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/ProfileVerify.cpp.o
[1065/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/SampleProfileInference.cpp.o
[1066/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/StripGCRelocates.cpp.o
[1067/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/SanitizerStats.cpp.o
[1068/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/UnifyFunctionExitNodes.cpp.o
[1069/5163] Building CXX object lib/DWARFLinker/Parallel/CMakeFiles/LLVMDWARFLinkerParallel.dir/DWARFLinkerImpl.cpp.o
[1070/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/SizeOpts.cpp.o
[1071/5163] Building CXX object lib/DWARFLinker/Classic/CMakeFiles/LLVMDWARFLinkerClassic.dir/DWARFLinker.cpp.o
[1072/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/LowerMemIntrinsics.cpp.o
[1073/5163] Building CXX object lib/Transforms/Utils/CMakeFiles/LLVMTransformUtils.dir/StripNonLineTableDebugInfo.cpp.o

@abidh
Copy link
Contributor Author

abidh commented Aug 11, 2025

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux-fuzzer running on sanitizer-buildbot6 while building llvm,mlir at step 2 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/32/builds/23041

Here is the relevant piece of the build log for the reference

This failure is happening because a newly added function is under #ifndef NDEBUG. I am going to open a PR soon to fix this.

@abidh
Copy link
Contributor Author

abidh commented Aug 11, 2025

Opened #153061 to fix the build failure.

@abidh
Copy link
Contributor Author

abidh commented Aug 11, 2025

The bots seems to be back to green now after #153061.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[flang][OpenMP][debug] Invalid debug locations cause verification failures.

4 participants