diff options
author | Than McIntosh <thanm@google.com> | 2019-07-19 12:54:44 +0000 |
---|---|---|
committer | Than McIntosh <thanm@google.com> | 2019-07-19 12:54:44 +0000 |
commit | e238a4c7570a701603e73359c281b4833ccdb348 (patch) | |
tree | 5144401d6c274457f50e79a88d233793447b3dca /llvm/lib/Target/X86/X86FrameLowering.cpp | |
parent | 20a0e7caaf39d14929c1469f341acb664356eeb9 (diff) | |
download | bcm5719-llvm-e238a4c7570a701603e73359c281b4833ccdb348.tar.gz bcm5719-llvm-e238a4c7570a701603e73359c281b4833ccdb348.zip |
[X86] for split stack, not save/restore nested arg if unused
Summary:
For split-stack, if the nested argument (i.e. R10) is not used, no need to save/restore it in the prologue.
Reviewers: thanm
Reviewed By: thanm
Subscribers: mstorsjo, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64673
llvm-svn: 366569
Diffstat (limited to 'llvm/lib/Target/X86/X86FrameLowering.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86FrameLowering.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86FrameLowering.cpp b/llvm/lib/Target/X86/X86FrameLowering.cpp index e310fe06911..1fb6eb33872 100644 --- a/llvm/lib/Target/X86/X86FrameLowering.cpp +++ b/llvm/lib/Target/X86/X86FrameLowering.cpp @@ -2212,7 +2212,7 @@ HasNestArgument(const MachineFunction *MF) { const Function &F = MF->getFunction(); for (Function::const_arg_iterator I = F.arg_begin(), E = F.arg_end(); I != E; I++) { - if (I->hasNestAttr()) + if (I->hasNestAttr() && !I->use_empty()) return true; } return false; |