diff options
| author | Chad Rosier <mcrosier@codeaurora.org> | 2016-03-14 18:17:41 +0000 |
|---|---|---|
| committer | Chad Rosier <mcrosier@codeaurora.org> | 2016-03-14 18:17:41 +0000 |
| commit | 6d986550707568a459e50c581cb79aef9e3072bb (patch) | |
| tree | be04bea0592457093d164f0bb84d592f448cecf0 /llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h | |
| parent | de89d5f81fb647e9744e4583bb0d77dc6a237b42 (diff) | |
| download | bcm5719-llvm-6d986550707568a459e50c581cb79aef9e3072bb.tar.gz bcm5719-llvm-6d986550707568a459e50c581cb79aef9e3072bb.zip | |
[AArch64] Break the dependency between FP and SP when possible.
When the SP in not changed because of realignment/VLAs etc., we restore the SP
by using the previous value of SP and not the FP. Breaking the dependency will
help in cases when the epilog of a callee is close to the epilog of the caller;
for then "sub sp, fp, #" depends on the load restoring the FP in the epilog of
the callee.
http://reviews.llvm.org/D18060
Patch by Aditya Kumar and Evandro Menezes.
llvm-svn: 263458
Diffstat (limited to 'llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h')
| -rw-r--r-- | llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h b/llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h index 76ad2d12f0a..ebb05d5d258 100644 --- a/llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h +++ b/llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h @@ -79,18 +79,22 @@ class AArch64FunctionInfo : public MachineFunctionInfo { /// copies. bool IsSplitCSR; + /// True when the stack gets realigned dynamically because the size of stack + /// frame is unknown at compile time. e.g., in case of VLAs. + bool StackRealigned; + public: AArch64FunctionInfo() : BytesInStackArgArea(0), ArgumentStackToRestore(0), HasStackFrame(false), NumLocalDynamicTLSAccesses(0), VarArgsStackIndex(0), VarArgsGPRIndex(0), VarArgsGPRSize(0), VarArgsFPRIndex(0), VarArgsFPRSize(0), - IsSplitCSR(false) {} + IsSplitCSR(false), StackRealigned(false) {} explicit AArch64FunctionInfo(MachineFunction &MF) : BytesInStackArgArea(0), ArgumentStackToRestore(0), HasStackFrame(false), NumLocalDynamicTLSAccesses(0), VarArgsStackIndex(0), VarArgsGPRIndex(0), VarArgsGPRSize(0), VarArgsFPRIndex(0), VarArgsFPRSize(0), - IsSplitCSR(false) { + IsSplitCSR(false), StackRealigned(false) { (void)MF; } @@ -105,6 +109,9 @@ public: bool hasStackFrame() const { return HasStackFrame; } void setHasStackFrame(bool s) { HasStackFrame = s; } + bool isStackRealigned() const { return StackRealigned; } + void setStackRealigned(bool s) { StackRealigned = s; } + bool isSplitCSR() const { return IsSplitCSR; } void setIsSplitCSR(bool s) { IsSplitCSR = s; } |

