-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate codegen to operate on orc::ThreadSafeModule #44440
Conversation
b88d995
to
87366a5
Compare
There's a few indentation TODOs left in this PR, which I've deliberately left out for now as they cause large whitespace diffs that confuse the diff viewer. |
b86ac64
to
5383db9
Compare
Per an offline discussion with Valentin, we will change the interface of |
@@ -132,16 +132,6 @@ GlobalValue* jl_get_llvm_function_impl(void *native_code, uint32_t idx) | |||
return NULL; | |||
} | |||
|
|||
extern "C" JL_DLLEXPORT | |||
LLVMContext* jl_get_llvm_context_impl(void *native_code) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Victory
That's interesting, I wouldn't be surprised that there's a hidden bug given the size of the changeset but the changes to jl_merge_module aren't actually meaningful. |
Looks like at least the error in jl_merge_module during LoopVectorization tests is:
|
And another one:
Looks like there's a common x86.bmi.bzhi intrinsic that's causing some issues between function definition/declaration |
Reduced to
|
And again to
|
I am now slightly suspicious of this line: https://github.com/JuliaSIMD/VectorizationBase.jl/blob/9ae47c5c12c7bec9b57c132c24f67c4f14090c9e/src/llvm_intrin/masks.jl#L336
I'm not sure, but I'm guessing that the list should only have 2 typ, not 3 |
orc::ThreadSafeModule and orc::ThreadSafeContext use reference-counted contexts to allow multiple contexts to be created and destroyed safely during codegen. Moving TSModule to be our API boundary gets us closer to parallelizing codegen without leaking contexts.
Depends on
#43770 to remove the global debug information with associated global context#44454 to refactor a few globals.