[all-commits] [llvm/llvm-project] a0406c: [flang][OpenMP] Add `hostIsSource` paramemter to `...

Kareem Ergawy via All-commits all-commits at lists.llvm.org
Thu Jan 16 10:10:35 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a0406ce823e8f1c1993b565d08b045c0104c3a5a
      https://github.com/llvm/llvm-project/commit/a0406ce823e8f1c1993b565d08b045c0104c3a5a
  Author: Kareem Ergawy <kareem.ergawy at amd.com>
  Date:   2025-01-16 (Thu, 16 Jan 2025)

  Changed paths:
    M flang/include/flang/Lower/AbstractConverter.h
    M flang/lib/Lower/Bridge.cpp
    M flang/lib/Lower/OpenMP/DataSharingProcessor.cpp
    M flang/lib/Lower/OpenMP/OpenMP.cpp
    A flang/test/Lower/OpenMP/same_var_first_lastprivate.f90

  Log Message:
  -----------
  [flang][OpenMP] Add `hostIsSource` paramemter to `copyHostAssociateVar` (#123162)

This fixes a bug when the same variable is used in `firstprivate` and
`lastprivate` clauses on the same construct. The issue boils down to the
fact that `copyHostAssociateVar` was deciding the direction of the copy
assignment (i.e. the `lhs` and `rhs`) based on whether the
`copyAssignIP`
parameter is set. This is not the best way to do it since it is not
related to whether we doing a copy from host to localized copy or the
other way around. When we set the insertion for `firstprivate` in
delayed privatization, this resulted in switching the direction of the
copy assignment. Instead, this PR adds a new paramter to explicitely
tell
the function the direction of the assignment.

This is a follow up PR for
https://github.com/llvm/llvm-project/pull/122471, only the latest commit
is relevant.



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