2005-10-16 05:39:50 +00:00
|
|
|
//===-- PPCTargetMachine.h - Define TargetMachine for PowerPC -----*- C++ -*-=//
|
2005-04-21 23:30:14 +00:00
|
|
|
//
|
2004-08-11 00:09:42 +00:00
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file was developed by the LLVM research group and is distributed under
|
|
|
|
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
2005-04-21 23:30:14 +00:00
|
|
|
//
|
2004-08-11 00:09:42 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
2005-04-21 23:30:14 +00:00
|
|
|
//
|
2004-08-17 04:55:41 +00:00
|
|
|
// This file declares the PowerPC specific subclass of TargetMachine.
|
2004-08-11 00:09:42 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2005-10-16 05:39:50 +00:00
|
|
|
#ifndef PPC_TARGETMACHINE_H
|
|
|
|
#define PPC_TARGETMACHINE_H
|
2004-08-11 00:09:42 +00:00
|
|
|
|
2005-10-14 23:51:18 +00:00
|
|
|
#include "PPCFrameInfo.h"
|
|
|
|
#include "PPCSubtarget.h"
|
2005-10-14 23:53:41 +00:00
|
|
|
#include "PPCJITInfo.h"
|
2005-10-14 23:59:06 +00:00
|
|
|
#include "PPCInstrInfo.h"
|
2006-03-13 23:20:37 +00:00
|
|
|
#include "PPCISelLowering.h"
|
2005-10-14 23:44:05 +00:00
|
|
|
#include "llvm/Target/TargetMachine.h"
|
2004-08-11 00:09:42 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
2005-10-15 21:58:54 +00:00
|
|
|
class PassManager;
|
2005-10-14 23:44:05 +00:00
|
|
|
class IntrinsicLowering;
|
|
|
|
class GlobalValue;
|
2004-08-11 00:09:42 +00:00
|
|
|
class IntrinsicLowering;
|
|
|
|
|
2005-10-16 05:39:50 +00:00
|
|
|
class PPCTargetMachine : public TargetMachine {
|
2005-11-01 20:06:59 +00:00
|
|
|
PPCInstrInfo InstrInfo;
|
|
|
|
PPCSubtarget Subtarget;
|
|
|
|
PPCFrameInfo FrameInfo;
|
|
|
|
PPCJITInfo JITInfo;
|
2006-03-13 23:20:37 +00:00
|
|
|
PPCTargetLowering TLInfo;
|
2005-11-01 20:06:59 +00:00
|
|
|
InstrItineraryData InstrItins;
|
2005-10-14 23:44:05 +00:00
|
|
|
public:
|
2005-10-16 05:39:50 +00:00
|
|
|
PPCTargetMachine(const Module &M, IntrinsicLowering *IL,
|
|
|
|
const std::string &FS);
|
|
|
|
|
|
|
|
virtual const PPCInstrInfo *getInstrInfo() const { return &InstrInfo; }
|
2005-10-14 23:44:05 +00:00
|
|
|
virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
|
2005-10-16 05:39:50 +00:00
|
|
|
virtual TargetJITInfo *getJITInfo() { return &JITInfo; }
|
2005-10-14 23:44:05 +00:00
|
|
|
virtual const TargetSubtarget *getSubtargetImpl() const{ return &Subtarget; }
|
2006-03-13 23:20:37 +00:00
|
|
|
virtual PPCTargetLowering *getTargetLowering() { return &TLInfo; }
|
2005-10-16 05:39:50 +00:00
|
|
|
virtual const MRegisterInfo *getRegisterInfo() const {
|
2004-08-17 04:55:41 +00:00
|
|
|
return &InstrInfo.getRegisterInfo();
|
|
|
|
}
|
2005-11-01 20:06:59 +00:00
|
|
|
virtual const InstrItineraryData getInstrItineraryData() const {
|
|
|
|
return InstrItins;
|
|
|
|
}
|
|
|
|
|
2004-08-11 00:09:42 +00:00
|
|
|
|
2004-11-23 05:56:40 +00:00
|
|
|
static unsigned getJITMatchQuality();
|
|
|
|
|
2004-08-11 00:09:42 +00:00
|
|
|
static unsigned getModuleMatchQuality(const Module &M);
|
2005-10-16 05:39:50 +00:00
|
|
|
|
|
|
|
virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
|
2005-11-08 02:12:47 +00:00
|
|
|
CodeGenFileType FileType, bool Fast);
|
2005-10-16 05:39:50 +00:00
|
|
|
|
2004-08-17 04:55:41 +00:00
|
|
|
bool addPassesToEmitMachineCode(FunctionPassManager &PM,
|
|
|
|
MachineCodeEmitter &MCE);
|
2004-08-11 00:09:42 +00:00
|
|
|
};
|
2005-10-16 05:39:50 +00:00
|
|
|
|
2004-08-11 00:09:42 +00:00
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|