summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit6cca84e43c934344051252d4bc3a2f11d89ce1a2 (patch)
tree7f1a383eea6c66f519d3bb98be0dd9bc76375c8d /llvm/lib/Target/PowerPC/PPCTargetMachine.h
parent825298b060b9194a591b547a6d4e067db2f51639 (diff)
downloadbcm5719-llvm-6cca84e43c934344051252d4bc3a2f11d89ce1a2.tar.gz
bcm5719-llvm-6cca84e43c934344051252d4bc3a2f11d89ce1a2.zip
More PPC32 -> PPC changes, as well as merging some classes that were
redundant after the change. llvm-svn: 23759
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCTargetMachine.h')
-rw-r--r--llvm/lib/Target/PowerPC/PPCTargetMachine.h51
1 files changed, 19 insertions, 32 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.h b/llvm/lib/Target/PowerPC/PPCTargetMachine.h
index f24a32080b0..5ba4f322901 100644
--- a/llvm/lib/Target/PowerPC/PPCTargetMachine.h
+++ b/llvm/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
OpenPOWER on IntegriCloud