2012-02-28 15:46:26 +08:00
|
|
|
//===-- MipsFrameLowering.h - Define frame lowering for Mips ----*- C++ -*-===//
|
2010-11-15 08:06:54 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
2011-04-16 05:51:11 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2010-11-15 08:06:54 +08:00
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
2011-04-16 05:51:11 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2010-11-15 08:06:54 +08:00
|
|
|
|
2011-03-05 03:20:24 +08:00
|
|
|
#ifndef MIPS_FRAMEINFO_H
|
|
|
|
#define MIPS_FRAMEINFO_H
|
2010-11-15 08:06:54 +08:00
|
|
|
|
|
|
|
#include "Mips.h"
|
2011-01-10 20:39:04 +08:00
|
|
|
#include "llvm/Target/TargetFrameLowering.h"
|
2010-11-15 08:06:54 +08:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
class MipsSubtarget;
|
|
|
|
|
2011-01-10 20:39:04 +08:00
|
|
|
class MipsFrameLowering : public TargetFrameLowering {
|
2010-11-15 08:06:54 +08:00
|
|
|
protected:
|
|
|
|
const MipsSubtarget &STI;
|
|
|
|
|
|
|
|
public:
|
2013-03-29 09:51:04 +08:00
|
|
|
explicit MipsFrameLowering(const MipsSubtarget &sti, unsigned Alignment)
|
|
|
|
: TargetFrameLowering(StackGrowsDown, Alignment, 0, Alignment), STI(sti) {}
|
2010-11-15 08:06:54 +08:00
|
|
|
|
2014-07-19 07:33:47 +08:00
|
|
|
static const MipsFrameLowering *create(const MipsSubtarget &ST);
|
2012-08-03 02:21:47 +08:00
|
|
|
|
2014-04-29 15:58:02 +08:00
|
|
|
bool hasFP(const MachineFunction &MF) const override;
|
2012-11-03 05:10:22 +08:00
|
|
|
|
|
|
|
protected:
|
|
|
|
uint64_t estimateStackSize(const MachineFunction &MF) const;
|
2010-11-15 08:06:54 +08:00
|
|
|
};
|
|
|
|
|
2013-03-12 08:16:36 +08:00
|
|
|
/// Create MipsFrameLowering objects.
|
2012-08-03 02:21:47 +08:00
|
|
|
const MipsFrameLowering *createMips16FrameLowering(const MipsSubtarget &ST);
|
|
|
|
const MipsFrameLowering *createMipsSEFrameLowering(const MipsSubtarget &ST);
|
|
|
|
|
2010-11-15 08:06:54 +08:00
|
|
|
} // End llvm namespace
|
|
|
|
|
|
|
|
#endif
|