aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PowerPC/PPCTargetMachine.h
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2005-10-16 05:39:50 +0000
committerNate Begeman <natebegeman@mac.com>2005-10-16 05:39:50 +0000
commit21e463b2bf864671a87ebe386cb100ef9349a540 (patch)
tree66837a69bdb67333bffe2b5c6767954f5771f411 /lib/Target/PowerPC/PPCTargetMachine.h
parent5024d93c8b3bde57e906c0325573ed8d3b7061fd (diff)
downloadexternal_llvm-21e463b2bf864671a87ebe386cb100ef9349a540.zip
external_llvm-21e463b2bf864671a87ebe386cb100ef9349a540.tar.gz
external_llvm-21e463b2bf864671a87ebe386cb100ef9349a540.tar.bz2
More PPC32 -> PPC changes, as well as merging some classes that were
redundant after the change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23759 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCTargetMachine.h')
-rw-r--r--lib/Target/PowerPC/PPCTargetMachine.h51
1 files changed, 19 insertions, 32 deletions
diff --git a/lib/Target/PowerPC/PPCTargetMachine.h b/lib/Target/PowerPC/PPCTargetMachine.h
index f24a320..5ba4f32 100644
--- a/lib/Target/PowerPC/PPCTargetMachine.h
+++ b/lib/Target/PowerPC/PPCTargetMachine.h
@@ -1,4 +1,4 @@
-//===-- PPC32TargetMachine.h - Define TargetMachine for PowerPC -*- C++ -*-=//
+//===-- PPCTargetMachine.h - Define TargetMachine for PowerPC -----*- C++ -*-=//
//
// The LLVM Compiler Infrastructure
//
@@ -11,8 +11,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef POWERPC32_TARGETMACHINE_H
-#define POWERPC32_TARGETMACHINE_H
+#ifndef PPC_TARGETMACHINE_H
+#define PPC_TARGETMACHINE_H
#include "PPCFrameInfo.h"
#include "PPCSubtarget.h"
@@ -26,47 +26,34 @@ class IntrinsicLowering;
class GlobalValue;
class IntrinsicLowering;
-// FIXME: Merge into only subclass.
-class PowerPCTargetMachine : public TargetMachine {
- PowerPCFrameInfo FrameInfo;
- PPCSubtarget Subtarget;
-protected:
- PowerPCTargetMachine(const std::string &name, IntrinsicLowering *IL,
- const Module &M, const std::string &FS,
- const TargetData &TD,
- const PowerPCFrameInfo &TFI);
+class PPCTargetMachine : public TargetMachine {
+ PPCInstrInfo InstrInfo;
+ PPCSubtarget Subtarget;
+ PPCFrameInfo FrameInfo;
+ PPCJITInfo JITInfo;
public:
+ PPCTargetMachine(const Module &M, IntrinsicLowering *IL,
+ const std::string &FS);
+
+ virtual const PPCInstrInfo *getInstrInfo() const { return &InstrInfo; }
virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
+ virtual TargetJITInfo *getJITInfo() { return &JITInfo; }
virtual const TargetSubtarget *getSubtargetImpl() const{ return &Subtarget; }
-
- virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
- CodeGenFileType FileType);
-};
-
-class PPC32TargetMachine : public PowerPCTargetMachine {
- PPC32InstrInfo InstrInfo;
- PPC32JITInfo JITInfo;
-
-public:
- PPC32TargetMachine(const Module &M, IntrinsicLowering *IL,
- const std::string &FS);
- virtual const PPC32InstrInfo *getInstrInfo() const { return &InstrInfo; }
- virtual const MRegisterInfo *getRegisterInfo() const {
+ virtual const MRegisterInfo *getRegisterInfo() const {
return &InstrInfo.getRegisterInfo();
}
- virtual TargetJITInfo *getJITInfo() {
- return &JITInfo;
- }
-
static unsigned getJITMatchQuality();
static unsigned getModuleMatchQuality(const Module &M);
-
+
+ virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
+ CodeGenFileType FileType);
+
bool addPassesToEmitMachineCode(FunctionPassManager &PM,
MachineCodeEmitter &MCE);
};
-
+
} // end namespace llvm
#endif