summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/SystemZ/SystemZMachineFunctionInfo.h
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2016-04-04 12:44:55 +0000
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2016-04-04 12:44:55 +0000
commitf557d083252598cc42ce1b5409edaa91a305c9f9 (patch)
treeacda63c698807a15a1938ea0f8f033968925e89d /llvm/lib/Target/SystemZ/SystemZMachineFunctionInfo.h
parente4a77057a3cee509f87af0893cd5705d70339194 (diff)
downloadbcm5719-llvm-f557d083252598cc42ce1b5409edaa91a305c9f9.tar.gz
bcm5719-llvm-f557d083252598cc42ce1b5409edaa91a305c9f9.zip
[SystemZ] Support llvm.frameaddress/llvm.returnaddress intrinsics
Enable the SystemZ back-end to lower FRAMEADDR and RETURNADDR, which previously would cause the back-end to crash. Currently, only a frame count of zero is supported. Author: bryanpkc Differential Revision: http://reviews.llvm.org/D18514 llvm-svn: 265291
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZMachineFunctionInfo.h')
-rw-r--r--llvm/lib/Target/SystemZ/SystemZMachineFunctionInfo.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZMachineFunctionInfo.h b/llvm/lib/Target/SystemZ/SystemZMachineFunctionInfo.h
index f4a517bd54d..4f64f4c65f1 100644
--- a/llvm/lib/Target/SystemZ/SystemZMachineFunctionInfo.h
+++ b/llvm/lib/Target/SystemZ/SystemZMachineFunctionInfo.h
@@ -22,14 +22,15 @@ class SystemZMachineFunctionInfo : public MachineFunctionInfo {
unsigned VarArgsFirstFPR;
unsigned VarArgsFrameIndex;
unsigned RegSaveFrameIndex;
+ int FramePointerSaveIndex;
bool ManipulatesSP;
unsigned NumLocalDynamics;
public:
explicit SystemZMachineFunctionInfo(MachineFunction &MF)
: LowSavedGPR(0), HighSavedGPR(0), VarArgsFirstGPR(0), VarArgsFirstFPR(0),
- VarArgsFrameIndex(0), RegSaveFrameIndex(0), ManipulatesSP(false),
- NumLocalDynamics(0) {}
+ VarArgsFrameIndex(0), RegSaveFrameIndex(0), FramePointerSaveIndex(0),
+ ManipulatesSP(false), NumLocalDynamics(0) {}
// Get and set the first call-saved GPR that should be saved and restored
// by this function. This is 0 if no GPRs need to be saved or restored.
@@ -59,6 +60,10 @@ public:
unsigned getRegSaveFrameIndex() const { return RegSaveFrameIndex; }
void setRegSaveFrameIndex(unsigned FI) { RegSaveFrameIndex = FI; }
+ // Get and set the frame index of where the old frame pointer is stored.
+ int getFramePointerSaveIndex() const { return FramePointerSaveIndex; }
+ void setFramePointerSaveIndex(int Idx) { FramePointerSaveIndex = Idx; }
+
// Get and set whether the function directly manipulates the stack pointer,
// e.g. through STACKSAVE or STACKRESTORE.
bool getManipulatesSP() const { return ManipulatesSP; }
OpenPOWER on IntegriCloud