-
Eliminate duplicate LLVM contexts · 567e560dNicolas Capens authored
The LLVMContext object is used for caching LLVM types, eliminating duplicate constants, and things like handling diagnostics information. Previously we created one for the JITBuilder as well as the JITRoutine. While having multiple ones is mostly benign from a correctness point of view, it adds unnecessary overhead. This change reuses the context created for the JITBuilder object (which is used during IR construction), for the JITRoutine (which uses it for actual compilation). Bug: b/177024837 Change-Id: Iefbbd7fbeb53e67ab41914fad471dd94d9755311 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/51568 Kokoro-Result: kokoro <noreply+kokoro@google.com> Tested-by:
Nicolas Capens <nicolascapens@google.com> Reviewed-by:
Antonio Maiorano <amaiorano@google.com>
567e560d
×