diff options
author | Lang Hames <lhames@gmail.com> | 2020-01-21 16:28:30 -0800 |
---|---|---|
committer | Hans Wennborg <hans@chromium.org> | 2020-01-29 21:50:16 +0100 |
commit | 32723d572077e9a3776553a2067563974e85e7c8 (patch) | |
tree | 72635c7810a1525721b9b12e1cb9fbfbfcad96ef /llvm/examples/LLJITExamples/LLJITWithObjectCache/LLJITWithObjectCache.cpp | |
parent | f7f0fd4a21d52d30f9b3257cd537fbc706f0f176 (diff) | |
download | bcm5719-llvm-32723d572077e9a3776553a2067563974e85e7c8.tar.gz bcm5719-llvm-32723d572077e9a3776553a2067563974e85e7c8.zip |
[ORC] Add support for emulated TLS to ORCv2.
This commit adds a ManglingOptions struct to IRMaterializationUnit, and replaces
IRCompileLayer::CompileFunction with a new IRCompileLayer::IRCompiler class. The
ManglingOptions struct defines the emulated-TLS state (via a bool member,
EmulatedTLS, which is true if emulated-TLS is enabled and false otherwise). The
IRCompileLayer::IRCompiler class wraps an IRCompiler (the same way that the
CompileFunction typedef used to), but adds a method to return the
IRCompileLayer::ManglingOptions that the compiler will use.
These changes allow us to correctly determine the symbols that will be produced
when a thread local global variable defined at the IR level is compiled with or
without emulated TLS. This is required for ORCv2, where MaterializationUnits
must declare their interface up-front.
Most ORCv2 clients should not require any changes. Clients writing custom IR
compilers will need to wrap their compiler in an IRCompileLayer::IRCompiler,
rather than an IRCompileLayer::CompileFunction, however this should be a
straightforward change (see modifications to CompileUtils.* in this patch for an
example).
(cherry picked from commit ce2207abaf9a925b35f15ef92aaff6b301ba6d22)
Diffstat (limited to 'llvm/examples/LLJITExamples/LLJITWithObjectCache/LLJITWithObjectCache.cpp')
0 files changed, 0 insertions, 0 deletions