-
Refactor LLVMReactor globals into 3 classes. · 6f8e565bBen Clayton authored
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>
6f8e565b
×