2004-06-21 16:55:25 +00:00
|
|
|
//===-- PowerPCTargetMachine.h - Define TargetMachine for PowerPC -*- C++ -*-=//
|
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2004-08-17 05:08:44 +00:00
|
|
|
// This file declares the PowerPC-specific subclass of TargetMachine.
|
2004-06-21 16:55:25 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2004-08-11 00:11:25 +00:00
|
|
|
#ifndef POWERPC_TARGETMACHINE_H
|
|
|
|
#define POWERPC_TARGETMACHINE_H
|
2004-06-21 16:55:25 +00:00
|
|
|
|
2004-08-14 22:16:36 +00:00
|
|
|
#include "PowerPCFrameInfo.h"
|
|
|
|
#include "PowerPCJITInfo.h"
|
2004-06-21 16:55:25 +00:00
|
|
|
#include "llvm/Target/TargetMachine.h"
|
|
|
|
#include "llvm/PassManager.h"
|
2004-09-04 05:00:00 +00:00
|
|
|
#include <set>
|
2004-06-21 16:55:25 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
2004-07-23 16:08:20 +00:00
|
|
|
class GlobalValue;
|
2004-06-21 16:55:25 +00:00
|
|
|
class IntrinsicLowering;
|
|
|
|
|
|
|
|
class PowerPCTargetMachine : public TargetMachine {
|
2004-08-14 22:16:36 +00:00
|
|
|
PowerPCFrameInfo FrameInfo;
|
2004-06-21 16:55:25 +00:00
|
|
|
PowerPCJITInfo JITInfo;
|
2004-07-23 16:08:20 +00:00
|
|
|
|
2004-08-11 00:11:25 +00:00
|
|
|
protected:
|
|
|
|
PowerPCTargetMachine(const std::string &name, IntrinsicLowering *IL,
|
2004-08-14 22:16:36 +00:00
|
|
|
const TargetData &TD, const PowerPCFrameInfo &TFI,
|
2004-08-17 05:08:44 +00:00
|
|
|
const PowerPCJITInfo &TJI);
|
2004-06-21 16:55:25 +00:00
|
|
|
public:
|
|
|
|
virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
|
|
|
|
virtual TargetJITInfo *getJITInfo() {
|
|
|
|
return &JITInfo;
|
|
|
|
}
|
|
|
|
|
2004-07-12 23:36:12 +00:00
|
|
|
static unsigned getJITMatchQuality();
|
2004-08-11 07:40:04 +00:00
|
|
|
|
|
|
|
virtual bool addPassesToEmitAssembly(PassManager &PM, std::ostream &Out);
|
2004-09-04 05:00:00 +00:00
|
|
|
|
|
|
|
// Two shared sets between the instruction selector and the printer allow for
|
|
|
|
// correct linkage on Darwin
|
|
|
|
std::set<GlobalValue*> CalledFunctions;
|
|
|
|
std::set<GlobalValue*> AddressTaken;
|
2004-06-21 16:55:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|