summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.h
diff options
context:
space:
mode:
authorSimon Dardis <simon.dardis@imgtec.com>2016-06-14 13:39:43 +0000
committerSimon Dardis <simon.dardis@imgtec.com>2016-06-14 13:39:43 +0000
commit878c0b1b76aa5ce8526a50109bd382457eb68ec7 (patch)
treebd121d23a5ebb8d11e0c00df1a01dd3e5ba5ae64 /llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.h
parent65b6be1d3aaf404075050a7f2a27682e2434737f (diff)
downloadbcm5719-llvm-878c0b1b76aa5ce8526a50109bd382457eb68ec7.tar.gz
bcm5719-llvm-878c0b1b76aa5ce8526a50109bd382457eb68ec7.zip
[mips] Optimize stack pointer adjustments.
Instead of always using addu to adjust the stack pointer when the size out is of the range of an addiu instruction, use subu so that a smaller constant can be generated. This can give savings of ~3 instructions whenever a function has a a stack frame whose size is out of range of an addiu instruction. This change may break some naive stack unwinders. Partially resolves PR/26291. Thanks to David Chisnall for reporting the issue. Reviewers: dsanders, vkalintiris Differential Review: http://reviews.llvm.org/D21321 llvm-svn: 272666
Diffstat (limited to 'llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.h')
-rw-r--r--llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.h b/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.h
index 4ea45e56702..9372a3c2bb1 100644
--- a/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.h
+++ b/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.h
@@ -69,6 +69,7 @@ public:
unsigned GetZeroReg() const;
unsigned GetPtrAdduOp() const;
unsigned GetPtrAddiuOp() const;
+ unsigned GetPtrSubuOp() const;
unsigned GetPtrAndOp() const;
unsigned GetGPRMoveOp() const;
inline bool ArePtrs64bit() const { return IsN64(); }
OpenPOWER on IntegriCloud