diff options
| author | Misha Brukman <brukman+llvm@gmail.com> | 2004-08-17 04:55:41 +0000 |
|---|---|---|
| committer | Misha Brukman <brukman+llvm@gmail.com> | 2004-08-17 04:55:41 +0000 |
| commit | 116f9277f6526930e446ed9800082e55d293984b (patch) | |
| tree | 770cd445ebf26b5cdb08c4fb85ef04dbaa2b5828 /llvm/lib/Target/PowerPC/PPC32TargetMachine.h | |
| parent | c9d99efdd3b4c25279a50a861daec120d0e1479c (diff) | |
| download | bcm5719-llvm-116f9277f6526930e446ed9800082e55d293984b.tar.gz bcm5719-llvm-116f9277f6526930e446ed9800082e55d293984b.zip | |
PowerPC 32-/64-bit split: Part I, PPC32* bit files, adapted from former PowerPC*
llvm-svn: 15850
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPC32TargetMachine.h')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPC32TargetMachine.h | 38 |
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 |

