Newer
Older
Akira Hatanaka
committed
//==--- MipsFrameLowering.h - Define frame lowering for Mips --*- C++ -*---===//
Anton Korobeynikov
committed
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
Akira Hatanaka
committed
//===----------------------------------------------------------------------===//
Anton Korobeynikov
committed
//
//
//
Akira Hatanaka
committed
//===----------------------------------------------------------------------===//
Anton Korobeynikov
committed
#ifndef MIPS_FRAMEINFO_H
#define MIPS_FRAMEINFO_H
Anton Korobeynikov
committed
#include "Mips.h"
#include "MipsSubtarget.h"
Anton Korobeynikov
committed
#include "llvm/Target/TargetFrameLowering.h"
Anton Korobeynikov
committed
namespace llvm {
class MipsSubtarget;
Anton Korobeynikov
committed
class MipsFrameLowering : public TargetFrameLowering {
Anton Korobeynikov
committed
protected:
const MipsSubtarget &STI;
public:
Anton Korobeynikov
committed
explicit MipsFrameLowering(const MipsSubtarget &sti)
Anton Korobeynikov
committed
// FIXME: Is this correct at all?
Anton Korobeynikov
committed
: TargetFrameLowering(StackGrowsUp, 8, 0), STI(sti) {
Anton Korobeynikov
committed
}
void adjustMipsStackFrame(MachineFunction &MF) const;
/// emitProlog/emitEpilog - These methods insert prolog and epilog code into
/// the function.
void emitPrologue(MachineFunction &MF) const;
void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
bool hasFP(const MachineFunction &MF) const;
Bruno Cardoso Lopes
committed
void processFunctionBeforeFrameFinalized(MachineFunction &MF) const;
Anton Korobeynikov
committed
};
} // End llvm namespace
#endif