Implement code generation of Tapir IR - #11
Merged
Merged
Conversation
Implements these Tapir codegen constructs for LLVM as well.
The Cilk tests are only expected to work with panic=abort since code generation for landing pads and resumes (and general unwind handling) is not implemented yet.
We need to add no-prefer-dynamic to avoid dynamically linking the standard library, since libstd.so links with libpanic_unwind and we want to link with libpanic_abort. This commit currently has the Cilk tests which are expected to pass, failing, since they're being expected to fail rather than pass by the test runner. I'm not sure why this occurs.
This still doesn't work with the same error. Maybe there's a different place we use TLII and it's not set, or there's some place where we should be.
…iables We now use the enviroment variable OPENCILK_ABI_PATH to configure the path to the OpenCilk ABI, and the environment variable OPENCILK_RT_SEARCH_DIR to configure the search path for the OpenCilk runtime. At some point this should change so that we search many paths for both.
aleph-oh
marked this pull request as ready for review
April 23, 2024 15:49
oooacaiooo referenced
this pull request
in mcj-group/rust-cilk
Sep 28, 2025
# This is the 1st commit message: in llvm-project: Move Orphaning analysis to parent functions # This is the commit message #2: in llvm-project: Move Orphaning analysis to parent functions # This is the commit message #3: in llvm-project: Move Orphaning analysis to parent functions # This is the commit message #4: in llvm-project: Move Orphaning analysis to parent functions # This is the commit message #5: in llvm-project: Move Orphaning analysis to parent functions # This is the commit message #6: debug # This is the commit message #7: debug # This is the commit message #8: debug # This is the commit message #9: debug # This is the commit message #10: debug # This is the commit message #11: debug
oooacaiooo referenced
this pull request
in mcj-group/rust-cilk
Oct 24, 2025
# This is the 1st commit message: in llvm-project: Move Orphaning analysis to parent functions # This is the commit message #2: in llvm-project: Move Orphaning analysis to parent functions # This is the commit message #3: in llvm-project: Move Orphaning analysis to parent functions # This is the commit message #4: in llvm-project: Move Orphaning analysis to parent functions # This is the commit message #5: in llvm-project: Move Orphaning analysis to parent functions # This is the commit message #6: debug # This is the commit message #7: debug # This is the commit message #8: debug # This is the commit message #9: debug # This is the commit message #10: debug # This is the commit message #11: debug
oooacaiooo referenced
this pull request
in mcj-group/rust-cilk
Mar 25, 2026
# This is the 1st commit message: in llvm-project: Move Orphaning analysis to parent functions # This is the commit message #2: in llvm-project: Move Orphaning analysis to parent functions # This is the commit message #3: in llvm-project: Move Orphaning analysis to parent functions # This is the commit message #4: in llvm-project: Move Orphaning analysis to parent functions # This is the commit message #5: in llvm-project: Move Orphaning analysis to parent functions # This is the commit message #6: debug # This is the commit message #7: debug # This is the commit message #8: debug # This is the commit message #9: debug # This is the commit message #10: debug # This is the commit message #11: debug
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
Sign up for freeto 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 generates Tapir IR from programs that use Cilk keywords. It does this by requiring code generation backends indicate whether they support Tapir and implement code generation for the analogous MIR constructs. The LLVM backend is the only one which currently indicates that it provides Tapir support, and it additionally modifies the code generation process to link in the OpenCilk runtime's bitcode files. We also download the OpenCilk runtime and productivity-tools during bootstrapping so that the default compiler supports using Cilk constructs at runtime, which required some changes to the bootstrapping process.
There are a few limitations at the moment:
This PR also changes the test suite by compiling Cilk tests with panic=abort and statically linking the standard library (which has to be rebuilt since it's typically built with the unwinding panic runtime). Building with LTO also could be better tested: it's possible that when building with LTO we don't properly link the runtime.