[all-commits] [llvm/llvm-project] 7604c5: [OpenMP][IRBuilder] `omp task` support

Shraiysh via All-commits all-commits at lists.llvm.org
Mon May 23 21:52:29 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7604c59bd2336ebb34f28de3e6c883abbdd3f7c7
      https://github.com/llvm/llvm-project/commit/7604c59bd2336ebb34f28de3e6c883abbdd3f7c7
  Author: Shraiysh Vaishay <Shraiysh.Vaishay at amd.com>
  Date:   2022-05-24 (Tue, 24 May 2022)

  Changed paths:
    M llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
    M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
    M llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp

  Log Message:
  -----------
  [OpenMP][IRBuilder] `omp task` support

This patch adds basic support for `omp task` to the OpenMPIRBuilder.

The outlined function after code extraction is called from a wrapper function with appropriate arguments. This wrapper function is passed to the runtime calls for task allocation.

This approach is different from the Clang approach - clang directly emits the runtime call to the outlined function. The outlining utility (OutlineInfo) simply outlines the code and generates a function call to the outlined function. After the function has been generated by the outlining utility, there is no easy way to alter the function arguments without meddling with the outlining itself. Hence the wrapper function approach is taken.

Reviewed By: Meinersbur

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




More information about the All-commits mailing list