[all-commits] [llvm/llvm-project] 40340c: [MLIR][OpenMP][OMPIRBuilder] Use target triple to ...

Sergio Afonso via All-commits all-commits at lists.llvm.org
Thu Jul 20 07:08:29 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 40340cf91ab9c61ec8c77c0a5063d4e5894e9d07
      https://github.com/llvm/llvm-project/commit/40340cf91ab9c61ec8c77c0a5063d4e5894e9d07
  Author: Sergio Afonso <safonsof at amd.com>
  Date:   2023-07-20 (Thu, 20 Jul 2023)

  Changed paths:
    M flang/include/flang/Frontend/LangOptions.def
    M flang/include/flang/Tools/CrossToolHelpers.h
    M flang/lib/Frontend/CompilerInvocation.cpp
    M flang/test/Lower/OpenMP/host-ir-flag.f90
    A flang/test/Lower/OpenMP/omp-is-gpu.f90
    M flang/test/Lower/OpenMP/rtl-flags.f90
    M flang/test/Lower/OpenMP/target_cpu_features.f90
    M flang/tools/bbc/bbc.cpp
    M llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
    M mlir/include/mlir/Dialect/OpenMP/OpenMPOpsInterfaces.td
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp

  Log Message:
  -----------
  [MLIR][OpenMP][OMPIRBuilder] Use target triple to initialize `IsGPU` flag

This patch modifies the construction of the `OpenMPIRBuilder` in MLIR to
initialize the `IsGPU` flag using target triple information passed down from
the Flang frontend. If not present, it will default to `false`.

This replicates the behavior currently implemented in Clang, where the
`CodeGenModule::createOpenMPRuntime()` method creates a different
`CGOpenMPRuntime` instance depending on the target triple, which in turn has an
effect on the `IsGPU` flag of the `OpenMPIRBuilderConfig` object.

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




More information about the All-commits mailing list