aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/PowerPC/PPCTargetMachine.h
diff options
context:
space:
mode:
authorMisha Brukman <brukman+llvm@gmail.com>2004-08-17 04:55:41 +0000
committerMisha Brukman <brukman+llvm@gmail.com>2004-08-17 04:55:41 +0000
commitf2ccb77ee9d8ab35866dae111fa36929689c7511 (patch)
treec1b71d510e6af6c32a71dd944bc85b6f468327b9 /lib/Target/PowerPC/PPCTargetMachine.h
parent2c38413b3f5420f45f2f8220b21862246d446dd0 (diff)
downloadexternal_llvm-f2ccb77ee9d8ab35866dae111fa36929689c7511.zip
external_llvm-f2ccb77ee9d8ab35866dae111fa36929689c7511.tar.gz
external_llvm-f2ccb77ee9d8ab35866dae111fa36929689c7511.tar.bz2
PowerPC 32-/64-bit split: Part I, PPC32* bit files, adapted from former PowerPC*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15850 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCTargetMachine.h')
-rw-r--r--lib/Target/PowerPC/PPCTargetMachine.h38
1 files changed, 22 insertions, 16 deletions
diff --git a/lib/Target/PowerPC/PPCTargetMachine.h b/lib/Target/PowerPC/PPCTargetMachine.h
index 650f5cb..21dc0a0 100644
--- a/lib/Target/PowerPC/PPCTargetMachine.h
+++ b/lib/Target/PowerPC/PPCTargetMachine.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