Breaking up the PowerPC target into 32- and 64-bit subparts, Part III: the rest.
[oota-llvm.git] / lib / Target / PowerPC / PPCTargetMachine.cpp
1 //===-- PowerPCTargetMachine.cpp - Define TargetMachine for PowerPC -------===//
2 // 
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file was developed by the LLVM research group and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
7 // 
8 //===----------------------------------------------------------------------===//
9 // 
10 //
11 //===----------------------------------------------------------------------===//
12
13 #include "PowerPCTargetMachine.h"
14 #include "PowerPC.h"
15 #include "llvm/Module.h"
16 #include "llvm/PassManager.h"
17 #include "llvm/CodeGen/IntrinsicLowering.h"
18 #include "llvm/CodeGen/MachineFunction.h"
19 #include "llvm/CodeGen/Passes.h"
20 #include "llvm/Target/TargetOptions.h"
21 #include "llvm/Target/TargetMachineRegistry.h"
22 #include "llvm/Transforms/Scalar.h"
23 #include <iostream>
24 using namespace llvm;
25
26 PowerPCTargetMachine::PowerPCTargetMachine(const std::string &name,
27                                            IntrinsicLowering *IL,
28                                            const TargetData &TD,
29                                            const TargetFrameInfo &TFI,
30                                            const PowerPCJITInfo &TJI) 
31   : TargetMachine(name, IL, TD), FrameInfo(TFI), JITInfo(TJI) {}
32
33 unsigned PowerPCTargetMachine::getJITMatchQuality() {
34 #if defined(__POWERPC__) || defined (__ppc__) || defined(_POWER)
35   return 10;
36 #else
37   return 0;
38 #endif
39 }
40
41 void PowerPCJITInfo::addPassesToJITCompile(FunctionPassManager &PM) {
42   assert(0 && "Cannot execute PowerPCJITInfo::addPassesToJITCompile()");
43 }
44
45 void PowerPCJITInfo::replaceMachineCodeForFunction(void *Old, void *New) {
46   assert(0 && "Cannot execute PowerPCJITInfo::replaceMachineCodeForFunction()");
47 }
48
49 void *PowerPCJITInfo::getJITStubForFunction(Function *F, 
50                                             MachineCodeEmitter &MCE) {
51   assert(0 && "Cannot execute PowerPCJITInfo::getJITStubForFunction()");
52   return 0;
53 }