[PATCH] D154591: [OpenMP][OMPIRBuilder] Rename IsEmbedded and IsTargetCodegen flags
Sergio Afonso via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 6 03:30:32 PDT 2023
skatrak created this revision.
skatrak added reviewers: jsjodin, jdoerfert, kiranchandramohan.
Herald added subscribers: gysit, Dinistro, bviyer, sunshaoce, Moerafaat, zero9178, bzcheeseman, mattd, gchakrabarti, awarzynski, sdasgup3, asavonic, wenzhicui, wrengr, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, kerbowa, liufengdb, aartbik, mgester, arpith-jacob, csigg, antiagainst, shauheen, rriddle, mehdi_amini, mstorsjo, guansong, kbarton, hiraditya, yaxunl, jvesely, nemanjai.
Herald added a reviewer: sscalpone.
Herald added a reviewer: ftynse.
Herald added a reviewer: awarzynski.
Herald added projects: Flang, All.
skatrak requested review of this revision.
Herald added subscribers: llvm-commits, cfe-commits, jplehr, sstefan1, stephenneuendorffer, nicolasvasilache, MaskRay, jholewinski.
Herald added a reviewer: nicolasvasilache.
Herald added projects: clang, MLIR, LLVM.
This patch renames the `OpenMPIRBuilderConfig` flags to reduce confusion over
their meaning. `IsTargetCodegen` becomes `IsGPU`, whereas `IsEmbedded` becomes
`IsTargetDevice`. The `-fopenmp-is-device` compiler option is also renamed to
`-fopenmp-is-target-device` and the `omp.is_device` MLIR attribute is renamed
to `omp.is_target_device`. Getters and setters of all these renamed properties
are also updated accordingly. Many unit tests have been updated to use the new
names, but an alias for the `-fopenmp-is-device` option is created so that
external programs do not stop working after the name change.
`IsGPU` is set when the target triple is AMDGCN or NVIDIA PTX, and it is also
valid if `IsTargetDevice` is specified as well. `IsTargetDevice` is set by the
`-fopenmp-is-target-device` compiler frontend option, which is only added to
the OpenMP device invocation for offloading-enabled programs.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D154591
Files:
clang/docs/OffloadingDesign.rst
clang/include/clang/Basic/LangOptions.def
clang/include/clang/Driver/Options.td
clang/lib/AST/ASTContext.cpp
clang/lib/AST/Decl.cpp
clang/lib/AST/ItaniumMangle.cpp
clang/lib/AST/OpenMPClause.cpp
clang/lib/Basic/Targets/NVPTX.cpp
clang/lib/CodeGen/CGBuiltin.cpp
clang/lib/CodeGen/CGExpr.cpp
clang/lib/CodeGen/CGOpenMPRuntime.cpp
clang/lib/CodeGen/CGOpenMPRuntime.h
clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
clang/lib/CodeGen/CGOpenMPRuntimeGPU.h
clang/lib/CodeGen/CGStmtOpenMP.cpp
clang/lib/CodeGen/CGVTables.cpp
clang/lib/CodeGen/CodeGenModule.cpp
clang/lib/CodeGen/Targets/NVPTX.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Driver/ToolChains/Flang.cpp
clang/lib/Frontend/CompilerInstance.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/lib/Frontend/InitPreprocessor.cpp
clang/lib/Lex/LiteralSupport.cpp
clang/lib/Sema/Sema.cpp
clang/lib/Sema/SemaDecl.cpp
clang/lib/Sema/SemaDeclCXX.cpp
clang/lib/Sema/SemaExpr.cpp
clang/lib/Sema/SemaOpenMP.cpp
clang/lib/Sema/SemaType.cpp
clang/test/CodeGen/PowerPC/ppc64le-varargs-f128.c
clang/test/CodeGen/ibm128-unsupported.c
clang/test/Driver/openmp-offload-gpu.c
clang/test/Driver/openmp-offload.c
clang/test/Headers/__clang_hip_libdevice_declares.cpp
clang/test/Headers/amdgcn-openmp-device-math-complex.c
clang/test/Headers/amdgcn-openmp-device-math-complex.cpp
clang/test/Headers/amdgcn_openmp_device_math.c
clang/test/Headers/amdgcn_openmp_device_math_c.c
clang/test/Headers/amdgcn_openmp_device_math_constexpr.cpp
clang/test/Headers/nvptx_device_cmath_functions.c
clang/test/Headers/nvptx_device_cmath_functions.cpp
clang/test/Headers/nvptx_device_cmath_functions_cxx17.cpp
clang/test/Headers/nvptx_device_math_complex.c
clang/test/Headers/nvptx_device_math_complex.cpp
clang/test/Headers/nvptx_device_math_functions.c
clang/test/Headers/nvptx_device_math_functions.cpp
clang/test/Headers/nvptx_device_math_functions_cxx17.cpp
clang/test/Headers/nvptx_device_math_macro.cpp
clang/test/Headers/nvptx_device_math_modf.cpp
clang/test/Headers/nvptx_device_math_sin.c
clang/test/Headers/nvptx_device_math_sin.cpp
clang/test/Headers/nvptx_device_math_sin_cos.cpp
clang/test/Headers/nvptx_device_math_sincos.cpp
clang/test/Headers/openmp-device-functions-bool.c
clang/test/Headers/openmp_device_math_isnan.cpp
clang/test/Headers/openmp_new_nothrow.cpp
clang/test/Headers/target_include_new.cpp
clang/test/OpenMP/amdgcn-attributes.cpp
clang/test/OpenMP/amdgcn_device_function_call.cpp
clang/test/OpenMP/amdgcn_ldbl_check.cpp
clang/test/OpenMP/amdgcn_target_codegen.cpp
clang/test/OpenMP/amdgcn_target_global_constructor.cpp
clang/test/OpenMP/amdgcn_target_init_temp_alloca.cpp
clang/test/OpenMP/amdgpu_target_with_aligned_attribute.c
clang/test/OpenMP/assumes_include_nvptx.cpp
clang/test/OpenMP/aux-triple-macros.cpp
clang/test/OpenMP/declare_target_codegen.cpp
clang/test/OpenMP/declare_target_codegen_globalization.cpp
clang/test/OpenMP/declare_target_constexpr_codegen.cpp
clang/test/OpenMP/declare_target_link_codegen.cpp
clang/test/OpenMP/declare_target_messages.cpp
clang/test/OpenMP/declare_target_only_one_side_compilation.cpp
clang/test/OpenMP/declare_variant_device_kind_codegen.cpp
clang/test/OpenMP/declare_variant_mixed_codegen.c
clang/test/OpenMP/distribute_codegen.cpp
clang/test/OpenMP/distribute_simd_codegen.cpp
clang/test/OpenMP/metadirective_device_arch_codegen.cpp
clang/test/OpenMP/metadirective_device_isa_codegen_amdgcn.cpp
clang/test/OpenMP/multiple_regions_per_line.cpp
clang/test/OpenMP/nvptx_NRVO_variable.cpp
clang/test/OpenMP/nvptx_SPMD_codegen.cpp
clang/test/OpenMP/nvptx_allocate_codegen.cpp
clang/test/OpenMP/nvptx_allocate_messages.cpp
clang/test/OpenMP/nvptx_asm_delayed_diags.c
clang/test/OpenMP/nvptx_data_sharing.cpp
clang/test/OpenMP/nvptx_declare_target_var_ctor_dtor_codegen.cpp
clang/test/OpenMP/nvptx_declare_variant_device_kind_codegen.cpp
clang/test/OpenMP/nvptx_declare_variant_implementation_vendor_codegen.cpp
clang/test/OpenMP/nvptx_declare_variant_name_mangling.cpp
clang/test/OpenMP/nvptx_distribute_parallel_generic_mode_codegen.cpp
clang/test/OpenMP/nvptx_lambda_capturing.cpp
clang/test/OpenMP/nvptx_multi_target_parallel_codegen.cpp
clang/test/OpenMP/nvptx_nested_parallel_codegen.cpp
clang/test/OpenMP/nvptx_parallel_codegen.cpp
clang/test/OpenMP/nvptx_parallel_for_codegen.cpp
clang/test/OpenMP/nvptx_param_translate.c
clang/test/OpenMP/nvptx_prohibit_thread_local.cpp
clang/test/OpenMP/nvptx_target_codegen.cpp
clang/test/OpenMP/nvptx_target_cuda_mode_messages.cpp
clang/test/OpenMP/nvptx_target_exceptions_messages.cpp
clang/test/OpenMP/nvptx_target_firstprivate_codegen.cpp
clang/test/OpenMP/nvptx_target_parallel_codegen.cpp
clang/test/OpenMP/nvptx_target_parallel_num_threads_codegen.cpp
clang/test/OpenMP/nvptx_target_parallel_proc_bind_codegen.cpp
clang/test/OpenMP/nvptx_target_parallel_reduction_codegen.cpp
clang/test/OpenMP/nvptx_target_parallel_reduction_codegen_tbaa_PR46146.cpp
clang/test/OpenMP/nvptx_target_printf_codegen.c
clang/test/OpenMP/nvptx_target_pure_deleted_codegen.cpp
clang/test/OpenMP/nvptx_target_requires_unified_shared_memory.cpp
clang/test/OpenMP/nvptx_target_simd_codegen.cpp
clang/test/OpenMP/nvptx_target_teams_codegen.cpp
clang/test/OpenMP/nvptx_target_teams_distribute_codegen.cpp
clang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_codegen.cpp
clang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_generic_mode_codegen.cpp
clang/test/OpenMP/nvptx_target_teams_distribute_parallel_for_simd_codegen.cpp
clang/test/OpenMP/nvptx_target_teams_distribute_simd_codegen.cpp
clang/test/OpenMP/nvptx_teams_codegen.cpp
clang/test/OpenMP/nvptx_teams_reduction_codegen.cpp
clang/test/OpenMP/nvptx_unsupported_type_codegen.cpp
clang/test/OpenMP/nvptx_unsupported_type_messages.cpp
clang/test/OpenMP/nvptx_va_arg_delayed_diags.c
clang/test/OpenMP/openmp-read-only-feature.c
clang/test/OpenMP/openmp_offload_codegen.cpp
clang/test/OpenMP/reduction_implicit_map.cpp
clang/test/OpenMP/remarks_parallel_in_multiple_target_state_machines.c
clang/test/OpenMP/remarks_parallel_in_target_state_machine.c
clang/test/OpenMP/requires_codegen.cpp
clang/test/OpenMP/target_attribute_convergent.cpp
clang/test/OpenMP/target_codegen.cpp
clang/test/OpenMP/target_codegen_ref_assertion_vh.cpp
clang/test/OpenMP/target_codegen_registration.cpp
clang/test/OpenMP/target_codegen_registration_naming.cpp
clang/test/OpenMP/target_depend_codegen.cpp
clang/test/OpenMP/target_enter_data_codegen.cpp
clang/test/OpenMP/target_firstprivate_codegen.cpp
clang/test/OpenMP/target_globals_codegen.cpp
clang/test/OpenMP/target_messages.cpp
clang/test/OpenMP/target_ompx_dyn_cgroup_mem_codegen.cpp
clang/test/OpenMP/target_parallel_codegen.cpp
clang/test/OpenMP/target_parallel_codegen_registration.cpp
clang/test/OpenMP/target_parallel_codegen_registration_naming.cpp
clang/test/OpenMP/target_parallel_debug_codegen.cpp
clang/test/OpenMP/target_parallel_depend_codegen.cpp
clang/test/OpenMP/target_parallel_for_codegen.cpp
clang/test/OpenMP/target_parallel_for_codegen_registration.cpp
clang/test/OpenMP/target_parallel_for_codegen_registration_naming.cpp
clang/test/OpenMP/target_parallel_for_debug_codegen.cpp
clang/test/OpenMP/target_parallel_for_depend_codegen.cpp
clang/test/OpenMP/target_parallel_for_simd_codegen.cpp
clang/test/OpenMP/target_parallel_for_simd_codegen_registration.cpp
clang/test/OpenMP/target_parallel_for_simd_codegen_registration_naming.cpp
clang/test/OpenMP/target_parallel_for_simd_depend_codegen.cpp
clang/test/OpenMP/target_parallel_if_codegen.cpp
clang/test/OpenMP/target_parallel_no_exceptions.cpp
clang/test/OpenMP/target_parallel_num_threads_codegen.cpp
clang/test/OpenMP/target_private_codegen.cpp
clang/test/OpenMP/target_reduction_codegen.cpp
clang/test/OpenMP/target_simd_codegen.cpp
clang/test/OpenMP/target_simd_codegen_registration.cpp
clang/test/OpenMP/target_simd_codegen_registration_naming.cpp
clang/test/OpenMP/target_simd_depend_codegen.cpp
clang/test/OpenMP/target_task_affinity_codegen.cpp
clang/test/OpenMP/target_team_variable_codegen.cpp
clang/test/OpenMP/target_teams_codegen.cpp
clang/test/OpenMP/target_teams_codegen_registration.cpp
clang/test/OpenMP/target_teams_codegen_registration_naming.cpp
clang/test/OpenMP/target_teams_depend_codegen.cpp
clang/test/OpenMP/target_teams_distribute_codegen.cpp
clang/test/OpenMP/target_teams_distribute_codegen_registration.cpp
clang/test/OpenMP/target_teams_distribute_codegen_registration_naming.cpp
clang/test/OpenMP/target_teams_distribute_depend_codegen.cpp
clang/test/OpenMP/target_teams_distribute_parallel_for_codegen.cpp
clang/test/OpenMP/target_teams_distribute_parallel_for_depend_codegen.cpp
clang/test/OpenMP/target_teams_distribute_parallel_for_firstprivate_codegen.cpp
clang/test/OpenMP/target_teams_distribute_parallel_for_private_codegen.cpp
clang/test/OpenMP/target_teams_distribute_parallel_for_simd_codegen.cpp
clang/test/OpenMP/target_teams_distribute_parallel_for_simd_codegen_registration.cpp
clang/test/OpenMP/target_teams_distribute_parallel_for_simd_codegen_registration_naming.cpp
clang/test/OpenMP/target_teams_distribute_parallel_for_simd_depend_codegen.cpp
clang/test/OpenMP/target_teams_distribute_parallel_for_simd_firstprivate_codegen.cpp
clang/test/OpenMP/target_teams_distribute_parallel_for_simd_private_codegen.cpp
clang/test/OpenMP/target_teams_distribute_simd_codegen.cpp
clang/test/OpenMP/target_teams_distribute_simd_codegen_registration.cpp
clang/test/OpenMP/target_teams_distribute_simd_codegen_registration_naming.cpp
clang/test/OpenMP/target_teams_distribute_simd_depend_codegen.cpp
clang/test/OpenMP/target_teams_map_codegen.cpp
clang/test/OpenMP/target_teams_num_teams_codegen.cpp
clang/test/OpenMP/target_teams_thread_limit_codegen.cpp
clang/test/OpenMP/target_update_codegen.cpp
clang/test/OpenMP/target_visibility.cpp
clang/test/OpenMP/target_vla_messages.cpp
clang/test/OpenMP/teams_codegen.cpp
clang/test/Sema/aarch64-sve-alias-attribute.c
clang/test/Sema/check-aux-builtins.c
flang/include/flang/Frontend/LangOptions.def
flang/include/flang/Tools/CrossToolHelpers.h
flang/lib/Frontend/CompilerInvocation.cpp
flang/test/Driver/driver-help.f90
flang/test/Driver/omp-driver-offload.f90
flang/test/Fir/omp-declare-target-data.fir
flang/test/Lower/OpenMP/omp-declare-target-data.f90
flang/test/Lower/OpenMP/omp-host-ir-flag.f90
flang/test/Lower/OpenMP/omp-is-device.f90
flang/test/Lower/OpenMP/rtl-flags.f90
flang/tools/bbc/bbc.cpp
llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
mlir/include/mlir/Dialect/OpenMP/OpenMPOpsInterfaces.td
mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
mlir/test/Target/LLVMIR/omptarget-region-device-llvm.mlir
mlir/test/Target/LLVMIR/omptarget-region-llvm.mlir
mlir/test/Target/LLVMIR/omptarget-region-parallel-llvm.mlir
More information about the cfe-commits
mailing list