-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Local names linking #60031
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
Merged
Merged
Local names linking #60031
Changes from 76 commits
Commits
Show all changes
77 commits
Select commit
Hold shift + click to select a range
70db9ab
Add jl_invoke_api_t enum and use it in staticdata.c
xal-0 341bf40
Set JL_CI_FLAGS_SPECPTR_SPECIALIZED only on specsig in jl_update_all_…
xal-0 580d5e5
[JIT] Switch to post-compile linking
xal-0 da849ec
Add CodegenParams.unique_names so they can be enabled in llvmpasses t…
xal-0 f8ab8e9
Fix timing_print_module_names not capturing JL_TIMING_DEFAULT_BLOCK
xal-0 c88e5eb
Merge remote-tracking branch 'upstream/master' into local-names-linking
xal-0 91ea524
Use hand-written PLT thunks
xal-0 879d0c0
Merge remote-tracking branch 'upstream/master' into local-names-linking
xal-0 5f4a808
Use fallback PLT for i386
xal-0 7cb4632
Don't add Attribute::Naked unless using inline assembly PLT thunk
xal-0 f81c77b
Use TCK_MustTail in fallback PLT thunk
xal-0 6e05524
Merge remote-tracking branch 'upstream/master' into local-names-linking
xal-0 b924155
Remove jl_link_global emulation from jl_get_llvmf_defn_impl
xal-0 be9d60b
Merge remote-tracking branch 'upstream/master' into local-names-linking
xal-0 efdd5e9
Re-enable DLSymOptimizer for the time being
xal-0 4dc5ff6
Merge remote-tracking branch 'upstream/master' into local-names-linking
xal-0 1646f8e
Re-add JL_NOTSAFEPOINT_LEAVE/ENTER annotations on optimizeDLSyms
xal-0 84ba70d
Remove redundant separators between name and unique number; fix names…
xal-0 ed7c0ff
One extra fix for the names.jl llvmpass test
xal-0 5c6aec1
Remove Attribute::NoUnwind on new modules, generate for PLT thunks
xal-0 45db5fd
Allow inlining of PLT thunks if no efficient version is available
xal-0 744b80b
Generate trampolines for args1 -> specsig case in linkCallTarget
xal-0 b41456d
Annotate JuliaOJIT to reflect that we safepoint in materilization
xal-0 5a12aeb
Suppress silly -Werror=maybe-uninitialized
xal-0 0111742
Merge remote-tracking branch 'upstream/master' into local-names-linking
xal-0 f340ef7
Suppress GCChecker error on ExecutionSession::reportError
xal-0 f33ba41
Revert "Annotate JuliaOJIT to reflect that we safepoint in materiliza…
xal-0 51f6597
Release engine_lock, exit gc_safe region after compiling CIs
xal-0 343fea9
Add JLTrampolineMaterializationUnit, move compilation to materilize
xal-0 396fb87
Don't leave JuliaTaskDispatcher::work_until until all tasks finish
xal-0 a92c9cc
Set codeinst->time_compile once again
xal-0 18e4570
Use only jl_code_info_t from codeinfos in emit_always_inline (aotcomp…
xal-0 f4ddeb0
Merge remote-tracking branch 'upstream/master' into local-names-linking
xal-0 18083e8
Use global TaskQueue in JuliaTaskDispatcher, help other threads
xal-0 4045f73
Fail with better error when symbol lookup/compile fails; don't abort
xal-0 0933257
Simplify JuliaTaskDispatcher to avoid deadlock
xal-0 df93b85
Enter GC safe state when waiting in JuliaTaskDispatcher; fix GCChecker
xal-0 36404a6
Fix error message capturing Exports by reference (outside of lifetime)
xal-0 8eea69a
Re-enable optimizeDLSyms in the JIT
xal-0 72c66d9
Merge remote-tracking branch 'upstream/master' into local-names-linking
xal-0 d852c9b
Ignore sections of materialize() in GCChecker
xal-0 62c7451
Use a better symbol for tojlinvoke trampolines
xal-0 26655f0
Merge remote-tracking branch 'upstream/master' into local-names-linking
xal-0 a663f80
Attempt to detect deadlocks in JuliaTaskDispatcher
xal-0 338e0ee
Call set_value on promise even when lookup fails
xal-0 23c025c
Print error in JuliaOJIT::publishCIs
xal-0 fc54412
Hold LinkerMutex when it would be wrong for another thread to see the…
xal-0 0a659d3
Hold lock when checking future readiness
xal-0 708bf78
Remove broken deadlock detection from JuliaTaskDispatcher
xal-0 ee54f91
Add LinkerMutex to devdocs
xal-0 862a177
Disable JuliaTaskDispatcher::shutdown()
xal-0 914864c
Remove unused code for assertions
xal-0 6d4fb76
Merge branch 'master' into local-names-linking
xal-0 814f309
Remove TODO
xal-0 13e2328
When allocating a new CodeInstance, remove it from CISymbols
xal-0 f0c1ca5
Remove misleading jl_emit_oc_wrapper comments
xal-0 3973bcc
Add jl_jit_unregister_ci, and use it in jl_eval_thunk instead
xal-0 7ba4fba
Remove JuliaOJIT::addModule (unused)
xal-0 886af4f
Call jl_jit_unregister_ci even when throwing an exception
xal-0 081bb57
Mark jl_jit_unregister_mi as JL_NOTSAFEPOINT
xal-0 0b6e2b1
Update some out-of-date comments
xal-0 6bde4ea
Merge remote-tracking branch 'upstream/master' into local-names-linking
xal-0 603724c
Don't store references to call_targets in queue, since we may rehash
xal-0 5dffc89
Check return value of JIT.compileModule for failure in JLMaterializat…
xal-0 b3851a7
Check invoke_api in CISymbols before returning from linkCallTarget
xal-0 b2b42af
In jl_codegen_output_t, don't keep reference to owned TSM
xal-0 4ad8884
Add assertion to aot_link_output for documentation reasons
xal-0 175e0eb
Unregister toplevel CodeInstances before invoking, add tests
xal-0 70a5f23
Fix broken BuiltinInvokeTag check in get_item_for_reloc
xal-0 03dd273
Call jl_do_dump_compile in GC-unsafe region
xal-0 816e912
Remove some unused variables
xal-0 b6734b1
Remove commented-out jl_using_gdb_jitevents in JL_DEBUG_BUILD
xal-0 42277e9
In emit_always_inline, erase old decl when emitting inline version
xal-0 3d0a308
Fix GCChecker eror in JLMaterializationUnit::materialize (again)
xal-0 d3a9be5
Save and restore errno, last_error in jl_invoke_oneshot
xal-0 e88a612
Merge branch 'master' into local-names-linking
xal-0 a1ab491
Sleep after test_gc_codeinst()
xal-0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why is this needed? Can't we adjust the names?
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.
It's just to support a quirk of how some of the
test/llvmpassestests work. Julia compiles every CodeInstance in its own module like usual, but we link everything together withllvm-link. Without it linking fails because of multiply-defined symbols.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.
We could change those tests? Perhaps even an opportunity to use JuliaC?
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.
I can try adapting the tests to use local names (it should be ok to concatenate all the IR output together). When I added this I thought it might help adapt consumers of Julia-generated LLVM IR to this change. If they can be updated to local names without much effort, I'll remove this flag entirely.
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.
The complicated consumers are GPUCompiler and especially Enzyme, happy to chat about what needs to change there when you get there