summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-07-18 22:29:13 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-07-18 22:29:13 +0000
commit2d28617de2b0b731c08d1af9e830f31e14ac75b4 (patch)
treee93a2a8c00c44b718f86a24da5044756f3abccc3 /include
parent91614aec48ae01452422faf0cf6a6770d6b2166c (diff)
downloadllvm-2d28617de2b0b731c08d1af9e830f31e14ac75b4.tar.gz
llvm-2d28617de2b0b731c08d1af9e830f31e14ac75b4.tar.bz2
llvm-2d28617de2b0b731c08d1af9e830f31e14ac75b4.tar.xz
Move getInitialFrameState from TargetFrameInfo to MCAsmInfo (suggestions for
better location welcome). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135438 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/MachineModuleInfo.h2
-rw-r--r--include/llvm/MC/MCAsmInfo.h14
-rw-r--r--include/llvm/MC/MCDwarf.h4
-rw-r--r--include/llvm/MC/MachineLocation.h (renamed from include/llvm/CodeGen/MachineLocation.h)12
-rw-r--r--include/llvm/Target/TargetAsmInfo.h8
-rw-r--r--include/llvm/Target/TargetFrameLowering.h5
6 files changed, 22 insertions, 23 deletions
diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h
index c138dbfb72..33d5ffd9c3 100644
--- a/include/llvm/CodeGen/MachineModuleInfo.h
+++ b/include/llvm/CodeGen/MachineModuleInfo.h
@@ -34,7 +34,7 @@
#include "llvm/Pass.h"
#include "llvm/GlobalValue.h"
#include "llvm/Metadata.h"
-#include "llvm/CodeGen/MachineLocation.h"
+#include "llvm/MC/MachineLocation.h"
#include "llvm/MC/MCContext.h"
#include "llvm/Support/Dwarf.h"
#include "llvm/Support/DebugLoc.h"
diff --git a/include/llvm/MC/MCAsmInfo.h b/include/llvm/MC/MCAsmInfo.h
index 41c171761e..f9486de463 100644
--- a/include/llvm/MC/MCAsmInfo.h
+++ b/include/llvm/MC/MCAsmInfo.h
@@ -16,8 +16,10 @@
#ifndef LLVM_TARGET_ASM_INFO_H
#define LLVM_TARGET_ASM_INFO_H
+#include "llvm/MC/MachineLocation.h"
#include "llvm/MC/MCDirectives.h"
#include <cassert>
+#include <vector>
namespace llvm {
class MCExpr;
@@ -304,6 +306,10 @@ namespace llvm {
const char *const *AsmTransCBE; // Defaults to empty
+ //===--- Prologue State ----------------------------------------------===//
+
+ std::vector<MachineMove> InitialFrameState;
+
public:
explicit MCAsmInfo();
virtual ~MCAsmInfo();
@@ -512,6 +518,14 @@ namespace llvm {
const char *const *getAsmCBE() const {
return AsmTransCBE;
}
+
+ void addInitialFrameState(MCSymbol *label, const MachineLocation &D,
+ const MachineLocation &S) {
+ InitialFrameState.push_back(MachineMove(label, D, S));
+ }
+ const std::vector<MachineMove> &getInitialFrameState() const {
+ return InitialFrameState;
+ }
};
}
diff --git a/include/llvm/MC/MCDwarf.h b/include/llvm/MC/MCDwarf.h
index 90c3728567..c426e13294 100644
--- a/include/llvm/MC/MCDwarf.h
+++ b/include/llvm/MC/MCDwarf.h
@@ -16,15 +16,13 @@
#define LLVM_MC_MCDWARF_H
#include "llvm/ADT/StringRef.h"
-#include "llvm/CodeGen/MachineLocation.h" // FIXME
+#include "llvm/MC/MachineLocation.h"
#include "llvm/MC/MCObjectWriter.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/Dwarf.h"
#include <vector>
namespace llvm {
- class TargetAsmInfo;
- class MachineMove;
class MCContext;
class MCExpr;
class MCSection;
diff --git a/include/llvm/CodeGen/MachineLocation.h b/include/llvm/MC/MachineLocation.h
index 21951b6680..8ddfdbcece 100644
--- a/include/llvm/CodeGen/MachineLocation.h
+++ b/include/llvm/MC/MachineLocation.h
@@ -1,4 +1,4 @@
-//===-- llvm/CodeGen/MachineLocation.h --------------------------*- C++ -*-===//
+//===-- llvm/MC/MachineLocation.h -------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -18,8 +18,8 @@
//===----------------------------------------------------------------------===//
-#ifndef LLVM_CODEGEN_MACHINELOCATION_H
-#define LLVM_CODEGEN_MACHINELOCATION_H
+#ifndef LLVM_MC_MACHINELOCATION_H
+#define LLVM_MC_MACHINELOCATION_H
namespace llvm {
class MCSymbol;
@@ -36,11 +36,11 @@ public:
VirtualFP = ~0U
};
MachineLocation()
- : IsRegister(false), Register(0), Offset(0) {}
+ : IsRegister(false), Register(0), Offset(0) {}
explicit MachineLocation(unsigned R)
- : IsRegister(true), Register(R), Offset(0) {}
+ : IsRegister(true), Register(R), Offset(0) {}
MachineLocation(unsigned R, int O)
- : IsRegister(false), Register(R), Offset(O) {}
+ : IsRegister(false), Register(R), Offset(O) {}
bool operator==(const MachineLocation &Other) const {
return IsRegister == Other.IsRegister && Register == Other.Register &&
diff --git a/include/llvm/Target/TargetAsmInfo.h b/include/llvm/Target/TargetAsmInfo.h
index f1ffbd51d4..d04a5f3643 100644
--- a/include/llvm/Target/TargetAsmInfo.h
+++ b/include/llvm/Target/TargetAsmInfo.h
@@ -14,7 +14,6 @@
#ifndef LLVM_TARGET_TARGETASMINFO_H
#define LLVM_TARGET_TARGETASMINFO_H
-#include "llvm/CodeGen/MachineLocation.h"
#include "llvm/Target/TargetLoweringObjectFile.h"
#include "llvm/Target/TargetFrameLowering.h"
#include "llvm/Target/TargetRegisterInfo.h"
@@ -22,13 +21,10 @@
namespace llvm {
template <typename T> class ArrayRef;
class MCSection;
- class MCContext;
- class MachineFunction;
class TargetMachine;
class TargetLoweringObjectFile;
class TargetAsmInfo {
- std::vector<MachineMove> InitialFrameState;
const TargetFrameLowering *TFI;
const TargetLoweringObjectFile *TLOF;
@@ -72,10 +68,6 @@ public:
bool IsEH) const {
return TFI->getCompactUnwindEncoding(Instrs, DataAlignmentFactor, IsEH);
}
-
- const std::vector<MachineMove> &getInitialFrameState() const {
- return InitialFrameState;
- }
};
}
diff --git a/include/llvm/Target/TargetFrameLowering.h b/include/llvm/Target/TargetFrameLowering.h
index e3d77cf762..352b7aee8c 100644
--- a/include/llvm/Target/TargetFrameLowering.h
+++ b/include/llvm/Target/TargetFrameLowering.h
@@ -161,11 +161,6 @@ public:
return hasReservedCallFrame(MF) || hasFP(MF);
}
- /// getInitialFrameState - Returns a list of machine moves that are assumed
- /// on entry to all functions. Note that LabelID is ignored (assumed to be
- /// the beginning of the function.)
- virtual void getInitialFrameState(std::vector<MachineMove> &Moves) const;
-
/// getFrameIndexOffset - Returns the displacement from the frame register to
/// the stack frame of the specified index.
virtual int getFrameIndexOffset(const MachineFunction &MF, int FI) const;