-
Notifications
You must be signed in to change notification settings - Fork 22
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
Use statepoints to compute stack roots when invoking koreCollect #426
Merged
Conversation
This file contains 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
dwightguth
force-pushed
the
statepoint2
branch
7 times, most recently
from
September 20, 2021 21:27
a02befb
to
c27a46d
Compare
dwightguth
force-pushed
the
statepoint2
branch
4 times, most recently
from
September 27, 2021 19:31
06c6407
to
8f468f6
Compare
This lowered setting is required because nix still uses MacOS SDK 10.12 which has a bug when the binary size is too big
theo25
approved these changes
Sep 27, 2021
Baltoli
approved these changes
Sep 29, 2021
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.
One minor stylistic issue but otherwise LGTM
Co-authored-by: Bruce Collie <brucecollie82@gmail.com>
dwightguth
pushed a commit
that referenced
this pull request
Oct 13, 2021
* add llvm file with opaque function definitions * add llvm pass * implement getMangledTypeStr * introduce references to address space 1 * refactor allocateTerm * add statepoint gc strategy * add noreturn to finish_rewriting * add missing typed alloction functions * add code to retrieve stack map * parse stack map when application boots * remove manual root tracking * use libunwind to walk stack for roots * wire up gc in scripts * use tailcc instead of fastcc * add gc-leaf-function attribute to tail calls * fix bug involving match reason functions * reverse order of relocations in llvm pass * fixes for llvm 10 * fix llvm pass for llvm 10 * fix bug on mac os * fix cmake * use LLVM_VERSION_MAJOR * fix mac os * link against libunwind * fix name mangling issue on mac os * fix ciscript * fix linking against libunwind on mac os * add back missing dependencies on libunwind * try to fix nix on mac os * add comments * add LLVM_LINK variable to cmake * install opaque.ll in separate directory * change llvm-kompile script to invoke llvm-link * make sure opaque functions will actually get inlined * break long line * skip constants in stack map * remove gc-leaf-function attribute from tail calls * add llvm pass to mark tail calls as gc-leaf-function * fix gc offsets * format new files * fix bug on llvm 10 * fix format * don't reverse on older llvm * use slightly lower threshold for iterated optimization on nix This lowered setting is required because nix still uses MacOS SDK 10.12 which has a bug when the binary size is too big * fix code review comments * fix llvm 12 * Fix merge conflict * Update lib/llvm/EmitGCLayoutInfo.cpp Co-authored-by: Bruce Collie <brucecollie82@gmail.com> * Update MarkTailCallsAsGCLeaf.cpp Co-authored-by: Bruce Collie <brucecollie82@gmail.com>
31 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR makes use of the LLVM garbage collection API in order to compute the gc roots on the stack when calling
koreCollect
.It operates via the following pieces:
koreCollect
since we do not need them to track roots anymoretailcc
instead offastcc
so as to simplify tail call optimizationGenerating roots from global variables remains the same as before.
This is rather big, so I'd like multiple sets of eyes on it. Note that I have not yet added new calls to
koreCollect
at the start of other functions in the llvm backend (likeapply_rule
andside_condition
andeval
). I decided to do that in a follow up PR since this is already so large.Ready for review.