2011-01-10 12:39:04 +00:00
|
|
|
//===-- Thumb1FrameLowering.h - Thumb1-specific frame info stuff --*- C++ -*-=//
|
2010-11-15 00:06:54 +00:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef __THUMB_FRAMEINFO_H_
|
2011-04-24 15:47:01 +00:00
|
|
|
#define __THUMB_FRAMEINFO_H_
|
2010-11-15 00:06:54 +00:00
|
|
|
|
|
|
|
#include "ARM.h"
|
2011-01-10 12:39:04 +00:00
|
|
|
#include "ARMFrameLowering.h"
|
2010-11-15 00:06:54 +00:00
|
|
|
#include "ARMSubtarget.h"
|
|
|
|
#include "Thumb1InstrInfo.h"
|
|
|
|
#include "Thumb1RegisterInfo.h"
|
2011-01-10 12:39:04 +00:00
|
|
|
#include "llvm/Target/TargetFrameLowering.h"
|
2010-11-15 00:06:54 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class ARMSubtarget;
|
|
|
|
|
2011-01-10 12:39:04 +00:00
|
|
|
class Thumb1FrameLowering : public ARMFrameLowering {
|
2010-11-15 00:06:54 +00:00
|
|
|
public:
|
2011-01-10 12:39:04 +00:00
|
|
|
explicit Thumb1FrameLowering(const ARMSubtarget &sti)
|
|
|
|
: ARMFrameLowering(sti) {
|
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
|
|
|
|
2010-11-27 23:05:03 +00:00
|
|
|
bool spillCalleeSavedRegisters(MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator MI,
|
|
|
|
const std::vector<CalleeSavedInfo> &CSI,
|
|
|
|
const TargetRegisterInfo *TRI) const;
|
|
|
|
bool restoreCalleeSavedRegisters(MachineBasicBlock &MBB,
|
|
|
|
MachineBasicBlock::iterator MI,
|
|
|
|
const std::vector<CalleeSavedInfo> &CSI,
|
|
|
|
const TargetRegisterInfo *TRI) const;
|
|
|
|
|
2010-11-18 21:19:35 +00:00
|
|
|
bool hasReservedCallFrame(const MachineFunction &MF) const;
|
2010-11-15 00:06:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End llvm namespace
|
|
|
|
|
|
|
|
#endif
|