-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Spill/restore FP/BP around instructions in which they are clobbered #81048
Changes from 5 commits
a302b28
4b07031
5d51df4
9a1d2d3
8097e82
d271d0c
bc10655
13ef42c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -228,6 +228,11 @@ bool PEI::runOnMachineFunction(MachineFunction &MF) { | |
FrameIndexVirtualScavenging = TRI->requiresFrameIndexScavenging(MF); | ||
ORE = &getAnalysis<MachineOptimizationRemarkEmitterPass>().getORE(); | ||
|
||
// Spill frame pointer and/or base pointer registers if they are clobbered. | ||
// It is placed before call frame instruction elimination so it will not mess | ||
// with stack arguments. | ||
TFI->spillFPBP(MF); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The PEI process is very complicated, please add comments elaborating on what this does and why it comes before call frame instruction elimination. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done. |
||
|
||
// Calculate the MaxCallFrameSize value for the function's frame | ||
// information. Also eliminates call frame pseudo instructions. | ||
calculateCallFrameInfo(MF); | ||
|
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.
This is existing code, but I generally try to recommend
MCContext::reportError
overreport_fatal_error
. We do have actual non-fatal error handling facilities during CodeGen.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.