[all-commits] [llvm/llvm-project] a8cda3: [OpenMP][FIX] Ensure __kmpc_kernel_parallel is rea...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Thu Aug 11 07:56:20 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a8cda3290944687b4fd0138e63cd980ea497a438
      https://github.com/llvm/llvm-project/commit/a8cda3290944687b4fd0138e63cd980ea497a438
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2022-08-11 (Thu, 11 Aug 2022)

  Changed paths:
    M openmp/libomptarget/DeviceRTL/src/Kernel.cpp

  Log Message:
  -----------
  [OpenMP][FIX] Ensure __kmpc_kernel_parallel is reachable

The problem is we create the call to __kmpc_kernel_parallel in the
openmp-opt pass but while we optimize the code, the call is not there
yet. Thus, we assume we never reach it from __kmpc_target_deinit. That
allows us to remove the store in there (`ParallelRegionFn = nullptr`),
which leads to bad results later on.

This is a shortstop solution until we come up with something better.

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




More information about the All-commits mailing list