[all-commits] [llvm/llvm-project] 542d9c: [libomptarget] Load images in order of registration

manorom via All-commits all-commits at lists.llvm.org
Wed Feb 24 09:16:03 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 542d9c21541d64da7e1c63a67563aa93ebc93446
      https://github.com/llvm/llvm-project/commit/542d9c21541d64da7e1c63a67563aa93ebc93446
  Author: Manoel Roemmer <manoel.roemmer at rwth-aachen.de>
  Date:   2021-02-24 (Wed, 24 Feb 2021)

  Changed paths:
    M openmp/libomptarget/include/omptargetplugin.h
    M openmp/libomptarget/plugins/exports
    M openmp/libomptarget/plugins/ve/src/rtl.cpp
    M openmp/libomptarget/src/device.h
    M openmp/libomptarget/src/omptarget.cpp
    M openmp/libomptarget/src/rtl.cpp
    M openmp/libomptarget/src/rtl.h

  Log Message:
  -----------
  [libomptarget] Load images in order of registration

This makes sure that images are loaded in the order in which they are registered with libomptarget.

If a target can load multiple images and these images depend on each other (for example if one image contains the programs target regions and one image contains library code), then the order in which images are loaded can be important for symbol resolution (for example, in the VE plugin).
In this case: because the same code exist in the host binaries, the order in which the host linker loads them (which is also the order in which images are registered with libomptarget) is the order in which the images have to be loaded onto the device.

Reviewed By: JonChesterfield

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




More information about the All-commits mailing list