-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[CodeGen] Port StackProtector
to new pass manager
#75334
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 StackProtector
to new pass manager
#75334
Conversation
✅ With the latest revision this PR passed the C/C++ code formatter. |
2b10011
to
4b273ab
Compare
Ping @arsenm |
unsigned SSPBufferSize = SSPLayoutInfo::DefaultSSPBufferSize; | ||
|
||
// A prologue is generated. | ||
bool HasPrologue = false; | ||
|
||
// IR checking code is generated. | ||
bool HasIRCheck = false; |
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.
These fields look like they were moved to a new location, but not removed from the old one?
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.
Replace these fields with new a member SSPLayoutInfo Info;
is OK, just to want to modify the old code as little as possible.
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 don't follow this. If you moved them the old references should be deleted? Changing less code isn't preferable to leaving dead 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.
Merge them into one member LayoutInfo
, but still need to keep the interface as an analysis pass.
4b273ab
to
af70d34
Compare
af70d34
to
f67aa75
Compare
The original `StackProtector` is both transform and analysis pass, break it into two passes now. `getAnalysis<StackProtector>()` could be now replaced by `FAM.getResult<SSPLayoutAnalysis>(F)` in new pass system.
The original
StackProtector
is both transform and analysis pass, break it into two passes now.getAnalysis<StackProtector>()
could be now replaced byFAM.getResult<SSPLayoutAnalysis>(F)
in new pass system.