Skip to content

Conversation

@abidh
Copy link
Contributor

@abidh abidh commented Jul 14, 2025

There is a sanitizer fail in CI after this which I need to investigate. Reverting for now.
Reverts #148284

@llvmbot llvmbot added mlir:llvm mlir flang:openmp clang:openmp OpenMP related changes to Clang labels Jul 14, 2025
@abidh abidh merged commit 45fa0b2 into main Jul 14, 2025
12 of 14 checks passed
@llvmbot
Copy link
Member

llvmbot commented Jul 14, 2025

@llvm/pr-subscribers-mlir-llvm

@llvm/pr-subscribers-flang-openmp

Author: Abid Qadeer (abidh)

Changes

There is a sanitizer fail in CI after this which I need to investigate. Reverting for now.
Reverts llvm/llvm-project#148284


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

2 Files Affected:

  • (modified) llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp (-2)
  • (removed) mlir/test/Target/LLVMIR/omptarget-debug-target-task.mlir (-49)
diff --git a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
index 4f08ea97378c2..170224616ac64 100644
--- a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+++ b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
@@ -7229,11 +7229,9 @@ static Function *emitTargetTaskProxyFunction(
 
   bool HasShareds = SharedArgsOperandNo > 0;
   bool HasOffloadingArrays = NumOffloadingArrays > 0;
-  IRBuilder<>::InsertPointGuard IPG(Builder);
   BasicBlock *EntryBB =
       BasicBlock::Create(Builder.getContext(), "entry", ProxyFn);
   Builder.SetInsertPoint(EntryBB);
-  Builder.SetCurrentDebugLocation(llvm::DebugLoc());
 
   SmallVector<Value *> KernelLaunchArgs;
   KernelLaunchArgs.reserve(StaleCI->arg_size());
diff --git a/mlir/test/Target/LLVMIR/omptarget-debug-target-task.mlir b/mlir/test/Target/LLVMIR/omptarget-debug-target-task.mlir
deleted file mode 100644
index dbd465a97645b..0000000000000
--- a/mlir/test/Target/LLVMIR/omptarget-debug-target-task.mlir
+++ /dev/null
@@ -1,49 +0,0 @@
-// RUN: mlir-translate -mlir-to-llvmir %s | FileCheck %s
-
-module attributes {omp.is_target_device = false} {
-  llvm.func @omp_target_depend_() {
-    %0 = llvm.mlir.constant(39 : index) : i64
-    %1 = llvm.mlir.constant(1 : index) : i64
-    %2 = llvm.mlir.constant(40 : index) : i64
-    %3 = omp.map.bounds lower_bound(%1 : i64) upper_bound(%0 : i64) extent(%2 : i64) stride(%1 : i64) start_idx(%1 : i64)
-    %4 = llvm.mlir.addressof @_QFEa : !llvm.ptr
-    %5 = omp.map.info var_ptr(%4 : !llvm.ptr, !llvm.array<40 x i32>) map_clauses(from) capture(ByRef) bounds(%3) -> !llvm.ptr {name = "a"}
-    omp.target depend(taskdependin -> %4 : !llvm.ptr) map_entries(%5 -> %arg0 : !llvm.ptr) {
-      %6 = llvm.mlir.constant(100 : index) : i32
-      llvm.store %6, %arg0 : i32, !llvm.ptr
-      omp.terminator
-    } loc(#loc13)
-    llvm.return
-  } loc(#loc12)
-
-  llvm.mlir.global internal @_QFEa() {addr_space = 0 : i32} : !llvm.array<40 x i32> {
-    %0 = llvm.mlir.zero : !llvm.array<40 x i32>
-    llvm.return %0 : !llvm.array<40 x i32>
-  }
-}
-
-#loc1 = loc("test.f90":4:18)
-#loc2 = loc("test.f90":8:7)
-
-#di_file = #llvm.di_file<"test.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>
-
-
-#loc12 = loc(fused<#di_subprogram>[#loc1])
-#loc13 = loc(fused<#di_subprogram1>[#loc2])
-
-// CHECK: define internal void @.omp_target_task_proxy_func
-// CHECK-NOT: !dbg
-// CHECK: }

@abidh abidh deleted the revert-148284-task_fn branch July 14, 2025 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants