2004-06-21 16:55:25 +00:00
|
|
|
//===-- PowerPCTargetMachine.cpp - Define TargetMachine for PowerPC -------===//
|
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "PowerPCTargetMachine.h"
|
|
|
|
#include "PowerPC.h"
|
|
|
|
#include "llvm/Module.h"
|
|
|
|
#include "llvm/PassManager.h"
|
2004-06-21 18:30:31 +00:00
|
|
|
#include "llvm/CodeGen/IntrinsicLowering.h"
|
2004-06-21 16:55:25 +00:00
|
|
|
#include "llvm/CodeGen/MachineFunction.h"
|
|
|
|
#include "llvm/CodeGen/Passes.h"
|
2004-07-11 04:17:58 +00:00
|
|
|
#include "llvm/Target/TargetOptions.h"
|
2004-07-11 02:48:49 +00:00
|
|
|
#include "llvm/Target/TargetMachineRegistry.h"
|
2004-06-21 16:55:25 +00:00
|
|
|
#include "llvm/Transforms/Scalar.h"
|
2004-07-11 02:48:49 +00:00
|
|
|
#include <iostream>
|
2004-06-21 16:55:25 +00:00
|
|
|
using namespace llvm;
|
|
|
|
|
2004-08-11 00:11:25 +00:00
|
|
|
PowerPCTargetMachine::PowerPCTargetMachine(const std::string &name,
|
|
|
|
IntrinsicLowering *IL,
|
|
|
|
const TargetData &TD,
|
|
|
|
const TargetFrameInfo &TFI,
|
|
|
|
const PowerPCJITInfo &TJI)
|
|
|
|
: TargetMachine(name, IL, TD), FrameInfo(TFI), JITInfo(TJI) {}
|
2004-07-11 02:48:49 +00:00
|
|
|
|
2004-07-12 23:36:12 +00:00
|
|
|
unsigned PowerPCTargetMachine::getJITMatchQuality() {
|
|
|
|
#if defined(__POWERPC__) || defined (__ppc__) || defined(_POWER)
|
|
|
|
return 10;
|
|
|
|
#else
|
|
|
|
return 0;
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2004-08-11 00:11:25 +00:00
|
|
|
void PowerPCJITInfo::addPassesToJITCompile(FunctionPassManager &PM) {
|
|
|
|
assert(0 && "Cannot execute PowerPCJITInfo::addPassesToJITCompile()");
|
2004-07-12 23:36:12 +00:00
|
|
|
}
|
|
|
|
|
2004-08-11 00:11:25 +00:00
|
|
|
void PowerPCJITInfo::replaceMachineCodeForFunction(void *Old, void *New) {
|
|
|
|
assert(0 && "Cannot execute PowerPCJITInfo::replaceMachineCodeForFunction()");
|
2004-06-21 16:55:25 +00:00
|
|
|
}
|
|
|
|
|
2004-08-11 00:11:25 +00:00
|
|
|
void *PowerPCJITInfo::getJITStubForFunction(Function *F,
|
|
|
|
MachineCodeEmitter &MCE) {
|
|
|
|
assert(0 && "Cannot execute PowerPCJITInfo::getJITStubForFunction()");
|
|
|
|
return 0;
|
2004-06-21 16:55:25 +00:00
|
|
|
}
|