-
Notifications
You must be signed in to change notification settings - Fork 11k
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
[CodeGen] Port ShadowStackGCLowering
to new pass manager
#75324
Merged
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
6ee5ff5
to
32bfbb0
Compare
Ping @arsenm |
arsenm
approved these changes
Dec 19, 2023
@@ -170,7 +212,7 @@ Type *ShadowStackGCLowering::GetConcreteStackEntryType(Function &F) { | |||
|
|||
/// doInitialization - If this module uses the GC intrinsics, find them now. If | |||
/// not, exit fast. | |||
bool ShadowStackGCLowering::doInitialization(Module &M) { | |||
bool ShadowStackGCLoweringImpl::doInitialization(Module &M) { | |||
bool Active = false; | |||
for (Function &F : M) { | |||
if (F.hasGC() && F.getGC() == std::string("shadow-stack")) { |
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.
existing issue but this doesn't need the std::string?
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.
Done.
6ba3523
to
3892562
Compare
3892562
to
d81ecd3
Compare
arsenm
approved these changes
Jan 5, 2024
justinfargnoli
pushed a commit
to justinfargnoli/llvm-project
that referenced
this pull request
Jan 28, 2024
IIUC the new pass system was designed with parallelism. This pass needs to add some global variables into the current module, this is not allowed by [WritingAnLLVMPass](https://llvm.org/docs/WritingAnLLVMPass.html#the-functionpass-class), so convert it to module pass, see FIXME in `GetFrameMap`. Therefore, this will trigger assertion in `CodeGenPassBuilder`: https://github.com/llvm/llvm-project/blob/effd47ed45e3badd756103346a7c3b9e1e939e5e/llvm/include/llvm/CodeGen/CodeGenPassBuilder.h#L200-L207 Will fix it in future.
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.
IIUC the new pass system was designed with parallelism. This pass needs to add some global variables into the current module, this is not allowed by
WritingAnLLVMPass, so convert it to module pass, see FIXME in
GetFrameMap
.Therefore, this will trigger assertion in
CodeGenPassBuilder
:llvm-project/llvm/include/llvm/CodeGen/CodeGenPassBuilder.h
Lines 200 to 207 in effd47e