[all-commits] [llvm/llvm-project] 792aac: [Attributor][NFCI] Add UsedAssumedInformation to m...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Sun Jul 11 17:18:41 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 792aac98973daf573a288ae0cbdc9e2633f599e5
      https://github.com/llvm/llvm-project/commit/792aac98973daf573a288ae0cbdc9e2633f599e5
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2021-07-11 (Sun, 11 Jul 2021)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/Attributor.h
    M llvm/lib/Transforms/IPO/Attributor.cpp
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
    M llvm/lib/Transforms/IPO/OpenMPOpt.cpp

  Log Message:
  -----------
  [Attributor][NFCI] Add UsedAssumedInformation to more interfaces

As with other Attributor interfaces we often want to know if assumed
information was used to answer a query. This is important if only
known information is allowed or if known information can lead to an
early fixpoint. The users have been adjusted but none of them utilizes
the new information yet.


  Commit: 1ab1f04a2be34bea2fb34df0f5ff0bd75bdc7aa0
      https://github.com/llvm/llvm-project/commit/1ab1f04a2be34bea2fb34df0f5ff0bd75bdc7aa0
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2021-07-11 (Sun, 11 Jul 2021)

  Changed paths:
    M openmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.h
    M openmp/libomptarget/deviceRTLs/common/omptarget.h
    M openmp/libomptarget/deviceRTLs/common/src/data_sharing.cu
    M openmp/libomptarget/deviceRTLs/common/src/omp_data.cu
    M openmp/libomptarget/deviceRTLs/common/src/omptarget.cu
    M openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h

  Log Message:
  -----------
  [OpenMP] Simplify variable sharing and increase shared memory size

In order to avoid malloc/free, up to NUM_SHARED_VARIABLES_IN_SHARED_MEM
(=64) variables are communicated in dedicated shared memory instead. The
simplification does avoid the need for an "init" and requires "deinit"
only if we ever communicate more than NUM_SHARED_VARIABLES_IN_SHARED_MEM
variables.

Differential Revision: https://reviews.llvm.org/D105767


  Commit: a7b7b5dfe5a931a76cbe8410e5a9f55beea73c8e
      https://github.com/llvm/llvm-project/commit/a7b7b5dfe5a931a76cbe8410e5a9f55beea73c8e
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2021-07-11 (Sun, 11 Jul 2021)

  Changed paths:
    M openmp/libomptarget/deviceRTLs/common/omptargeti.h
    M openmp/libomptarget/deviceRTLs/common/src/data_sharing.cu
    M openmp/libomptarget/deviceRTLs/common/src/libcall.cu
    M openmp/libomptarget/deviceRTLs/common/src/loop.cu
    M openmp/libomptarget/deviceRTLs/common/src/omptarget.cu
    M openmp/libomptarget/deviceRTLs/common/src/parallel.cu
    M openmp/libomptarget/deviceRTLs/common/src/reduction.cu
    M openmp/libomptarget/deviceRTLs/common/src/support.cu
    M openmp/libomptarget/deviceRTLs/common/src/sync.cu
    M openmp/libomptarget/deviceRTLs/common/src/task.cu
    M openmp/libomptarget/deviceRTLs/common/support.h
    M openmp/libomptarget/deviceRTLs/interface.h

  Log Message:
  -----------
  [OpenMP] Create and use `__kmpc_is_generic_main_thread`

In order to fold calls based on high-level knowledge and control flow
tracking it helps to expose the information as a runtime call. The
logic: `!SPMD && getTID() == getMasterTID()` was used in various places
and is now encapsulated in `__kmpc_is_generic_main_thread`. As part of
this rewrite we replaced eager computation of arguments with on-demand
computation, especially helpful if the calls can be folded and arguments
don't need to be computed consequently.

Differential Revision: https://reviews.llvm.org/D105768


Compare: https://github.com/llvm/llvm-project/compare/6144085c29b3...a7b7b5dfe5a9


More information about the All-commits mailing list