[all-commits] [llvm/llvm-project] 27177b: [OpenMP] Lower printf to __llvm_omp_vprintf

Jon Chesterfield via All-commits all-commits at lists.llvm.org
Wed Nov 10 07:31:19 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 27177b82d4ca4451f288168fc1e06c0736afbdaf
      https://github.com/llvm/llvm-project/commit/27177b82d4ca4451f288168fc1e06c0736afbdaf
  Author: Jon Chesterfield <jonathanchesterfield at gmail.com>
  Date:   2021-11-10 (Wed, 10 Nov 2021)

  Changed paths:
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/lib/CodeGen/CGGPUBuiltin.cpp
    M clang/lib/CodeGen/CodeGenFunction.h
    M clang/test/OpenMP/nvptx_target_printf_codegen.c
    M openmp/libomptarget/DeviceRTL/include/Debug.h
    M openmp/libomptarget/DeviceRTL/src/Debug.cpp
    M openmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.hip
    M openmp/libomptarget/deviceRTLs/nvptx/src/target_impl.cu
    M openmp/libomptarget/test/mapping/data_member_ref.cpp
    M openmp/libomptarget/test/mapping/declare_mapper_nested_default_mappers.cpp
    M openmp/libomptarget/test/mapping/declare_mapper_nested_mappers.cpp
    M openmp/libomptarget/test/mapping/lambda_by_value.cpp
    M openmp/libomptarget/test/mapping/ompx_hold/struct.c
    M openmp/libomptarget/test/mapping/ptr_and_obj_motion.c
    M openmp/libomptarget/test/mapping/reduction_implicit_map.cpp
    M openmp/libomptarget/test/offloading/bug49021.cpp
    M openmp/libomptarget/test/offloading/bug50022.cpp
    M openmp/libomptarget/test/offloading/host_as_target.c
    M openmp/libomptarget/test/unified_shared_memory/api.c
    M openmp/libomptarget/test/unified_shared_memory/close_enter_exit.c
    M openmp/libomptarget/test/unified_shared_memory/close_modifier.c
    M openmp/libomptarget/test/unified_shared_memory/shared_update.c

  Log Message:
  -----------
  [OpenMP] Lower printf to __llvm_omp_vprintf

Extension of D112504. Lower amdgpu printf to `__llvm_omp_vprintf`
which takes the same const char*, void* arguments as cuda vprintf and also
passes the size of the void* alloca which will be needed by a non-stub
implementation of `__llvm_omp_vprintf` for amdgpu.

This removes the amdgpu link error on any printf in a target region in favour
of silently compiling code that doesn't print anything to stdout.

Reviewed By: jdoerfert

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




More information about the All-commits mailing list