[PATCH] D80222: Replace Clang's createRuntimeFunction with the definitions in OMPKinds.def

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 21 11:54:03 PDT 2020


jhuber6 updated this revision to Diff 265557.
jhuber6 added a comment.

Making suggested changes. I added a quick implementation of size_t by getting the target triple data from the Module we have access to in the initializeTypes function, I'm not sure if this works in all situations. After changing the implementation some of the tests are invalidated and will need to be changed. push_num_teams was changed to void so now the tests that assign a register to the return value will fail. Additionally this applies the function attributes so some of the tests will check for not having function attributes. There are still tests that cause it to segfault, I think it might be related to OpenMP 5.0 because it's listed in the arguments. I just wanted to get this up for some feedback before rewriting the tests. Here's the tests that failed, the ones involving teams were mostly related to changing push_num_teams to void, the others are seg faults.

  Clang :: Driver/cuda-simple.cu
  Clang :: OpenMP/barrier_codegen.cpp
  Clang :: OpenMP/distribute_parallel_for_reduction_task_codegen.cpp                                                                                
  Clang :: OpenMP/for_reduction_task_codegen.cpp
  Clang :: OpenMP/openmp_win_codegen.cpp
  Clang :: OpenMP/parallel_for_reduction_task_codegen.cpp
  Clang :: OpenMP/parallel_master_reduction_task_codegen.cpp
  Clang :: OpenMP/parallel_reduction_task_codegen.cpp
  Clang :: OpenMP/parallel_sections_reduction_task_codegen.cpp
  Clang :: OpenMP/sections_reduction_task_codegen.cpp
  Clang :: OpenMP/target_parallel_for_reduction_task_codegen.cpp
  Clang :: OpenMP/target_parallel_reduction_task_codegen.cpp
  Clang :: OpenMP/target_teams_distribute_parallel_for_reduction_task_codegen.cpp
  Clang :: OpenMP/teams_codegen.cpp
  Clang :: OpenMP/teams_distribute_parallel_for_reduction_task_codegen.cpp


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80222/new/

https://reviews.llvm.org/D80222

Files:
  clang/lib/CodeGen/CGOpenMPRuntime.cpp
  clang/lib/CodeGen/CGOpenMPRuntime.h
  clang/test/OpenMP/nvptx_teams_codegen.cpp
  clang/test/OpenMP/target_teams_distribute_parallel_for_codegen.cpp
  clang/test/OpenMP/target_teams_distribute_parallel_for_simd_codegen.cpp
  clang/test/OpenMP/target_teams_num_teams_codegen.cpp
  clang/test/OpenMP/target_teams_thread_limit_codegen.cpp
  clang/test/OpenMP/teams_codegen.cpp
  clang/test/OpenMP/teams_distribute_codegen.cpp
  clang/test/OpenMP/teams_distribute_parallel_for_codegen.cpp
  clang/test/OpenMP/teams_distribute_parallel_for_simd_codegen.cpp
  clang/test/OpenMP/teams_distribute_simd_codegen.cpp
  llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
  llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
  llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
  llvm/test/Transforms/OpenMP/add_attributes.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80222.265557.patch
Type: text/x-patch
Size: 125422 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200521/ccd680f6/attachment-0001.bin>


More information about the cfe-commits mailing list