[all-commits] [llvm/llvm-project] f7f0fd: [ORC] Add weak symbol support to defineMaterializi...

lhames via All-commits all-commits at lists.llvm.org
Wed Jan 29 12:49:29 PST 2020


  Branch: refs/heads/release/10.x
  Home:   https://github.com/llvm/llvm-project
  Commit: f7f0fd4a21d52d30f9b3257cd537fbc706f0f176
      https://github.com/llvm/llvm-project/commit/f7f0fd4a21d52d30f9b3257cd537fbc706f0f176
  Author: Lang Hames <lhames at gmail.com>
  Date:   2020-01-29 (Wed, 29 Jan 2020)

  Changed paths:
    M llvm/include/llvm/ExecutionEngine/Orc/Core.h
    M llvm/lib/ExecutionEngine/Orc/Core.cpp
    M llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
    M llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp

  Log Message:
  -----------
  [ORC] Add weak symbol support to defineMaterializing, fix for PR40074.

The MaterializationResponsibility::defineMaterializing method allows clients to
add new definitions that are in the process of being materialized to the JIT.
This patch adds support to defineMaterializing for symbols with weak linkage
where the new definitions may be rejected if another materializer concurrently
defines the same symbol. If a weak symbol is rejected it will not be added to
the MaterializationResponsibility's responsibility set. Clients can check for
membership in the responsibility set via the
MaterializationResponsibility::getSymbols() method before resolving any
such weak symbols.

This patch also adds code to RTDyldObjectLinkingLayer to tag COFF comdat symbols
introduced during codegen as weak, on the assumption that these are COFF comdat
constants. This fixes http://llvm.org/PR40074.

(cherry picked from commit 84217ad66115cc31b184374a03c8333e4578996f)




More information about the All-commits mailing list