2011-01-10 13:39:04 +01:00
|
|
|
//=- BlackfinFrameLowering.h - Define frame lowering for Blackfin -*- C++ -*-=//
|
2010-11-15 01:06:54 +01:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef ALPHA_FRAMEINFO_H
|
|
|
|
#define ALPHA_FRAMEINFO_H
|
|
|
|
|
|
|
|
#include "Blackfin.h"
|
|
|
|
#include "BlackfinSubtarget.h"
|
2011-01-10 13:39:04 +01:00
|
|
|
#include "llvm/Target/TargetFrameLowering.h"
|
2010-11-15 01:06:54 +01:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class BlackfinSubtarget;
|
|
|
|
|
2011-01-10 13:39:04 +01:00
|
|
|
class BlackfinFrameLowering : public TargetFrameLowering {
|
2010-11-15 01:06:54 +01:00
|
|
|
protected:
|
|
|
|
const BlackfinSubtarget &STI;
|
|
|
|
|
|
|
|
public:
|
2011-01-10 13:39:04 +01:00
|
|
|
explicit BlackfinFrameLowering(const BlackfinSubtarget &sti)
|
|
|
|
: TargetFrameLowering(TargetFrameLowering::StackGrowsDown, 4, 0), STI(sti) {
|
2010-11-15 01:06:54 +01: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 22:19:35 +01:00
|
|
|
|
|
|
|
bool hasFP(const MachineFunction &MF) const;
|
2010-11-28 00:05:25 +01:00
|
|
|
|
|
|
|
void processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
|
|
|
|
RegScavenger *RS) const;
|
2010-11-15 01:06:54 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End llvm namespace
|
|
|
|
|
|
|
|
#endif
|