[all-commits] [llvm/llvm-project] a195e2: [MLIR][OpenMP] Handle privatization for global val...

Kareem Ergawy via All-commits all-commits at lists.llvm.org
Mon Aug 26 08:08:47 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a195e2d461dde7c73c6dd24da097affb1a7b6f78
      https://github.com/llvm/llvm-project/commit/a195e2d461dde7c73c6dd24da097affb1a7b6f78
  Author: Kareem Ergawy <kareem.ergawy at amd.com>
  Date:   2024-08-26 (Mon, 26 Aug 2024)

  Changed paths:
    M flang/test/Lower/OpenMP/delayed-privatization-allocatable-firstprivate.f90
    M llvm/include/llvm/Transforms/Utils/CodeExtractor.h
    M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
    M llvm/lib/Transforms/Utils/CodeExtractor.cpp
    M mlir/test/Target/LLVMIR/openmp-firstprivate.mlir

  Log Message:
  -----------
  [MLIR][OpenMP] Handle privatization for global values in MLIR->LLVM translation (#104407)

Potential fix for https://github.com/llvm/llvm-project/issues/102939 and
https://github.com/llvm/llvm-project/issues/102949.

The issues occurs because the CodeExtractor component only collect
inputs (to the parallel regions) that are defined in the same function
in which the parallel regions is present. Howerver, this is problematic
because if we are privatizing a global value (e.g. a `target` variable
which is emitted as a global), then we miss finding that input and we do
not privatize the variable.

This commit attempts to fix the issue by adding a flag to the
CodeExtractor so that we can collect global inputs.



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