blob: 27fceba73907039fd55dc1b00a898a6fe9f047b4 [file] [log] [blame]
Brian Gaekeca78f492004-01-21 21:13:19 +00001//===-- 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 "llvm/Module.h"
15#include "llvm/PassManager.h"
16#include "llvm/Target/TargetMachineImpls.h"
17#include "llvm/CodeGen/MachineFunction.h"
18#include "llvm/CodeGen/Passes.h"
19
20namespace llvm {
21
22// allocatePowerPCTargetMachine - Allocate and return a subclass of
23// TargetMachine that implements the PowerPC backend.
24//
25TargetMachine *allocatePowerPCTargetMachine(const Module &M,
26 IntrinsicLowering *IL) {
27 return new PowerPCTargetMachine(M, IL);
28}
29
30/// PowerPCTargetMachine ctor - Create an ILP32 architecture model
31///
32PowerPCTargetMachine::PowerPCTargetMachine(const Module &M,
33 IntrinsicLowering *IL)
34 : TargetMachine("PowerPC", IL, true, 4, 4, 4, 4, 4),
Brian Gaeke954e3162004-01-23 06:39:30 +000035 FrameInfo(TargetFrameInfo::StackGrowsDown, 8, 4), JITInfo(*this) {
Brian Gaekeca78f492004-01-21 21:13:19 +000036}
37
38// addPassesToEmitAssembly - We currently use all of the same passes as the JIT
39// does to emit statically compiled machine code.
40bool PowerPCTargetMachine::addPassesToEmitAssembly(PassManager &PM,
41 std::ostream &Out) {
42 return true;
43}
44
45/// addPassesToJITCompile - Add passes to the specified pass manager to
Brian Gaeke7b0cd6d2004-01-23 06:35:43 +000046/// implement a fast dynamic compiler for this target.
Brian Gaekeca78f492004-01-21 21:13:19 +000047///
Brian Gaeke7b0cd6d2004-01-23 06:35:43 +000048void PowerPCJITInfo::addPassesToJITCompile(FunctionPassManager &PM) {
Brian Gaekeca78f492004-01-21 21:13:19 +000049}
50
51} // end namespace llvm