mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-12 11:03:24 +00:00
[PEI][NFC] Move StackSize opt-remark code next to -warn-stack code
This allows us to make sure we're always having the same sizes in both remarks and warnings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324283 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cf9dda307c
commit
9d8994460a
@ -227,6 +227,12 @@ bool PEI::runOnMachineFunction(MachineFunction &Fn) {
|
|||||||
DiagnosticInfoStackSize DiagStackSize(F, StackSize);
|
DiagnosticInfoStackSize DiagStackSize(F, StackSize);
|
||||||
F.getContext().diagnose(DiagStackSize);
|
F.getContext().diagnose(DiagStackSize);
|
||||||
}
|
}
|
||||||
|
ORE->emit([&]() {
|
||||||
|
return MachineOptimizationRemarkAnalysis(DEBUG_TYPE, "StackSize",
|
||||||
|
Fn.getFunction().getSubprogram(),
|
||||||
|
&Fn.front())
|
||||||
|
<< ore::NV("NumStackBytes", StackSize) << " stack bytes in function";
|
||||||
|
});
|
||||||
|
|
||||||
delete RS;
|
delete RS;
|
||||||
SaveBlocks.clear();
|
SaveBlocks.clear();
|
||||||
@ -949,13 +955,6 @@ void PEI::calculateFrameObjectOffsets(MachineFunction &Fn) {
|
|||||||
int64_t StackSize = Offset - LocalAreaOffset;
|
int64_t StackSize = Offset - LocalAreaOffset;
|
||||||
MFI.setStackSize(StackSize);
|
MFI.setStackSize(StackSize);
|
||||||
NumBytesStackSpace += StackSize;
|
NumBytesStackSpace += StackSize;
|
||||||
|
|
||||||
ORE->emit([&]() {
|
|
||||||
return MachineOptimizationRemarkAnalysis(DEBUG_TYPE, "StackSize",
|
|
||||||
Fn.getFunction().getSubprogram(),
|
|
||||||
&Fn.front())
|
|
||||||
<< ore::NV("NumStackBytes", StackSize) << " stack bytes in function";
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// insertPrologEpilogCode - Scan the function for modified callee saved
|
/// insertPrologEpilogCode - Scan the function for modified callee saved
|
||||||
|
Loading…
x
Reference in New Issue
Block a user