2006-08-16 14:43:33 +00:00
|
|
|
//===-- ARMTargetFrameInfo.h - Define TargetFrameInfo for ARM ---*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-29 20:36:04 +00:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
2006-08-16 14:43:33 +00:00
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef ARM_FRAMEINFO_H
|
|
|
|
#define ARM_FRAMEINFO_H
|
|
|
|
|
|
|
|
#include "ARM.h"
|
2007-01-19 07:51:42 +00:00
|
|
|
#include "ARMSubtarget.h"
|
2009-07-09 06:49:09 +00:00
|
|
|
#include "llvm/Target/TargetFrameInfo.h"
|
2006-08-16 14:43:33 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
2010-11-15 00:06:54 +00:00
|
|
|
class ARMSubtarget;
|
2006-08-16 14:43:33 +00:00
|
|
|
|
2007-01-19 07:51:42 +00:00
|
|
|
class ARMFrameInfo : public TargetFrameInfo {
|
2010-11-15 00:06:54 +00:00
|
|
|
protected:
|
|
|
|
const ARMSubtarget &STI;
|
|
|
|
|
2006-08-16 14:43:33 +00:00
|
|
|
public:
|
2010-11-15 00:06:54 +00:00
|
|
|
explicit ARMFrameInfo(const ARMSubtarget &sti)
|
|
|
|
: TargetFrameInfo(StackGrowsDown, sti.getStackAlignment(), 0, 4), STI(sti) {
|
2006-08-16 14:43:33 +00:00
|
|
|
}
|
2010-11-15 00:06:54 +00:00
|
|
|
|
|
|
|
/// emitProlog/emitEpilog - These methods insert prolog and epilog code into
|
|
|
|
/// the function.
|
|
|
|
void emitPrologue(MachineFunction &MF) const;
|
|
|
|
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
|
2010-11-18 21:19:35 +00:00
|
|
|
|
|
|
|
bool hasFP(const MachineFunction &MF) const;
|
|
|
|
bool hasReservedCallFrame(const MachineFunction &MF) const;
|
|
|
|
bool canSimplifyCallFramePseudos(const MachineFunction &MF) const;
|
2010-11-20 15:59:32 +00:00
|
|
|
int getFrameIndexReference(const MachineFunction &MF, int FI,
|
|
|
|
unsigned &FrameReg) const;
|
|
|
|
int ResolveFrameIndexReference(const MachineFunction &MF, int FI,
|
|
|
|
unsigned &FrameReg, int SPAdj) const;
|
|
|
|
int getFrameIndexOffset(const MachineFunction &MF, int FI) const;
|
|
|
|
|
2006-08-16 14:43:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End llvm namespace
|
|
|
|
|
|
|
|
#endif
|