[all-commits] [llvm/llvm-project] 03d7e6: [OpenMP] Internalize functions in OpenMPOpt to imp...

Joseph Huber via All-commits all-commits at lists.llvm.org
Tue Jun 22 09:38:39 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 03d7e61c87eb94083d22ff55cf30c0a378ab6824
      https://github.com/llvm/llvm-project/commit/03d7e61c87eb94083d22ff55cf30c0a378ab6824
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2021-06-22 (Tue, 22 Jun 2021)

  Changed paths:
    M clang/test/OpenMP/remarks_parallel_in_multiple_target_state_machines.c
    M clang/test/OpenMP/remarks_parallel_in_target_state_machine.c
    M llvm/include/llvm/Transforms/IPO/Attributor.h
    M llvm/lib/Transforms/IPO/Attributor.cpp
    M llvm/lib/Transforms/IPO/OpenMPOpt.cpp
    M llvm/test/Transforms/OpenMP/replace_globalization.ll
    M llvm/test/Transforms/OpenMP/single_threaded_execution.ll

  Log Message:
  -----------
  [OpenMP] Internalize functions in OpenMPOpt to improve IPO passes

Summary:
Currently the attributor needs to give up if a function has external linkage.
This means that the optimization introduced in D97818 will only apply to static
functions. This change uses the Attributor to internalize OpenMP device
routines by making a copy of each function with private linkage and replacing
the uses in the module with it. This allows for the optimization to be applied
to any regular function.

Reviewed By: jdoerfert

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




More information about the All-commits mailing list