[mips] Add assembler support for the "la $reg,symbol" pseudo-instruction.
[oota-llvm.git] / lib / Target / Mips / MipsFrameLowering.h
index 9f234f9b37498ecae724473eed548fba7d2c5530..90a8d2af63b27d552288a4b0b6f561d4f3c7f94a 100644 (file)
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef MIPS_FRAMEINFO_H
-#define MIPS_FRAMEINFO_H
+#ifndef LLVM_LIB_TARGET_MIPS_MIPSFRAMELOWERING_H
+#define LLVM_LIB_TARGET_MIPS_MIPSFRAMELOWERING_H
 
 #include "Mips.h"
-#include "MipsSubtarget.h"
 #include "llvm/Target/TargetFrameLowering.h"
 
 namespace llvm {
@@ -26,13 +25,21 @@ protected:
   const MipsSubtarget &STI;
 
 public:
-  explicit MipsFrameLowering(const MipsSubtarget &sti)
-    : TargetFrameLowering(StackGrowsDown, sti.hasMips64() ? 16 : 8, 0,
-                          sti.hasMips64() ? 16 : 8), STI(sti) {}
+  explicit MipsFrameLowering(const MipsSubtarget &sti, unsigned Alignment)
+    : TargetFrameLowering(StackGrowsDown, Alignment, 0, Alignment), STI(sti) {}
 
-  bool hasFP(const MachineFunction &MF) const;
+  static const MipsFrameLowering *create(const MipsSubtarget &ST);
+
+  bool hasFP(const MachineFunction &MF) const override;
+
+protected:
+  uint64_t estimateStackSize(const MachineFunction &MF) const;
 };
 
+/// Create MipsFrameLowering objects.
+const MipsFrameLowering *createMips16FrameLowering(const MipsSubtarget &ST);
+const MipsFrameLowering *createMipsSEFrameLowering(const MipsSubtarget &ST);
+
 } // End llvm namespace
 
 #endif