Refactor LLVMReactor globals into 3 classes.
Split the scattered LLVM global variables into 3 new classes:
• JITGlobals is a singleton that holds all the immutable machine specific
information for the host device.
• JITBuilder holds all the LLVM state for building routines.
• JITRoutine is a rr::Routine that holds a LLVM JIT session, compiler and
object layer as each routine may require different target machine
settings and no Reactor routine directly links against another.
This reduce all the global varibles to down to one - 'jit' a JITBuilder.
In theory, this can be marked as TLS to remove the global reactor mutex lock.
These change also make it possible to specify per-function JIT optimization
settings (implemented in a follow-up change).
Change-Id: If4c90de444830f398eb79081fd349f313a8d3bd7
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33481Tested-by:
Ben Clayton <bclayton@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Reviewed-by:
Nicolas Capens <nicolascapens@google.com>
Showing
This source diff could not be displayed because it is too large.
You can
view the blob
instead.
src/Reactor/LLVMRoutine.cpp
deleted
100644 → 0
src/Reactor/LLVMRoutine.hpp
deleted
100644 → 0
Please
register
or
sign in
to comment