[all-commits] [llvm/llvm-project] f276d8: [OMPIRBuilder] Don't leak a foreign debug loc into...

Abid Qadeer via All-commits all-commits at lists.llvm.org
Fri Sep 11 02:36:59 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f276d8f00313f593ab9d8f3a1d242b6754f0a436
      https://github.com/llvm/llvm-project/commit/f276d8f00313f593ab9d8f3a1d242b6754f0a436
  Author: Abid Qadeer <haqadeer at amd.com>
  Date:   2026-09-11 (Fri, 11 Sep 2026)

  Changed paths:
    M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
    A mlir/test/Target/LLVMIR/openmp-task-depend-loc.mlir

  Log Message:
  -----------
  [OMPIRBuilder] Don't leak a foreign debug loc into the taskwait call (#222586)

A kmp_depend_info array is hoisted to the entry block of the enclosing
function. Pointing the builder into that block also adopts the location
of what is already there, which belongs to whichever construct put it
there rather than to the construct being emitted. restoreIP does not put
the location back either, since it adopts the location of the
instruction it lands on, so in createTaskwait the leak outlives the
excursion and reaches the __kmpc_omp_taskwait_deps_51 call.

Use InsertPointGuard, which restores the location along with the
insertion point.

Fixes https://github.com/llvm/llvm-project/issues/222044

Co-authored-by: Cursor <cursoragent at cursor.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list