summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPC32TargetMachine.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPC32TargetMachine.h')
-rw-r--r--llvm/lib/Target/PowerPC/PPC32TargetMachine.h38
1 files changed, 22 insertions, 16 deletions
diff --git a/llvm/lib/Target/PowerPC/PPC32TargetMachine.h b/llvm/lib/Target/PowerPC/PPC32TargetMachine.h
index 650f5cb0cc3..21dc0a0c62d 100644
--- a/llvm/lib/Target/PowerPC/PPC32TargetMachine.h
+++ b/llvm/lib/Target/PowerPC/PPC32TargetMachine.h
@@ -1,4 +1,4 @@
-//===-- PPC32TargetMachine.h - PowerPC/Darwin TargetMachine ---*- C++ -*-=//
+//===-- PPC32TargetMachine.h - Define TargetMachine for PowerPC -*- C++ -*-=//
//
// The LLVM Compiler Infrastructure
//
@@ -7,36 +7,42 @@
//
//===----------------------------------------------------------------------===//
//
-// This file declares the PowerPC/Darwin specific subclass of TargetMachine.
+// This file declares the PowerPC specific subclass of TargetMachine.
//
//===----------------------------------------------------------------------===//
-#ifndef POWERPC_DARWIN_TARGETMACHINE_H
-#define POWERPC_DARWIN_TARGETMACHINE_H
+#ifndef POWERPC32_TARGETMACHINE_H
+#define POWERPC32_TARGETMACHINE_H
-#include "llvm/Target/TargetMachine.h"
-#include "llvm/Target/TargetFrameInfo.h"
-#include "llvm/PassManager.h"
#include "PowerPCTargetMachine.h"
+#include "PPC32InstrInfo.h"
+#include "llvm/PassManager.h"
+#include <set>
namespace llvm {
+class GlobalValue;
class IntrinsicLowering;
class PPC32TargetMachine : public PowerPCTargetMachine {
+ PPC32InstrInfo InstrInfo;
+
public:
PPC32TargetMachine(const Module &M, IntrinsicLowering *IL);
+ virtual const PPC32InstrInfo *getInstrInfo() const { return &InstrInfo; }
+ virtual const MRegisterInfo *getRegisterInfo() const {
+ return &InstrInfo.getRegisterInfo();
+ }
- /// addPassesToEmitMachineCode - Add passes to the specified pass manager to
- /// get machine code emitted. This uses a MachineCodeEmitter object to handle
- /// actually outputting the machine code and resolving things like the address
- /// of functions. This method should returns true if machine code emission is
- /// not supported.
- ///
- virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
- MachineCodeEmitter &MCE);
-
static unsigned getModuleMatchQuality(const Module &M);
+
+ bool addPassesToEmitMachineCode(FunctionPassManager &PM,
+ MachineCodeEmitter &MCE);
+
+ // Two shared sets between the instruction selector and the printer allow for
+ // correct linkage on Darwin
+ std::set<GlobalValue*> CalledFunctions;
+ std::set<GlobalValue*> AddressTaken;
};
} // end namespace llvm
OpenPOWER on IntegriCloud