blob: e366d6a560eae9539bef3c5e5a19f7f39ec46a36 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001//===-- IA64TargetMachine.cpp - Define TargetMachine for IA64 -------------===//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner081ce942007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Dan Gohmanf17a25c2007-07-18 16:29:46 +00007//
8//===----------------------------------------------------------------------===//
9//
10// This file implements the IA64 specific subclass of TargetMachine.
11//
12//===----------------------------------------------------------------------===//
13
14#include "IA64TargetAsmInfo.h"
15#include "IA64TargetMachine.h"
16#include "IA64.h"
17#include "llvm/Module.h"
18#include "llvm/PassManager.h"
19#include "llvm/Target/TargetMachineRegistry.h"
20using namespace llvm;
21
Anton Korobeynikovbab832e2009-06-19 19:36:55 +000022// Register the target
Daniel Dunbarfe5939f2009-07-15 20:24:03 +000023static RegisterTarget<IA64TargetMachine> X(TheIA64Target, "ia64",
Chris Lattner3f83d3f2008-10-16 06:16:50 +000024 "IA-64 (Itanium) [experimental]");
Dan Gohmanf17a25c2007-07-18 16:29:46 +000025
Bob Wilsonebbc1c42009-06-23 23:59:40 +000026// Force static initialization.
27extern "C" void LLVMInitializeIA64Target() { }
Douglas Gregor1dc5ff42009-06-16 20:12:29 +000028
Dan Gohmanf17a25c2007-07-18 16:29:46 +000029const TargetAsmInfo *IA64TargetMachine::createTargetAsmInfo() const {
30 return new IA64TargetAsmInfo(*this);
31}
32
Dan Gohmanf17a25c2007-07-18 16:29:46 +000033/// IA64TargetMachine ctor - Create an LP64 architecture model
34///
Daniel Dunbarfe5939f2009-07-15 20:24:03 +000035IA64TargetMachine::IA64TargetMachine(const Target &T, const Module &M,
36 const std::string &FS)
37 : LLVMTargetMachine(T),
38 DataLayout("e-f80:128:128"),
Dan Gohmanf17a25c2007-07-18 16:29:46 +000039 FrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0),
40 TLInfo(*this) { // FIXME? check this stuff
41}
42
43
44//===----------------------------------------------------------------------===//
45// Pass Pipeline Configuration
46//===----------------------------------------------------------------------===//
47
Bill Wendling5ed22ac2009-04-29 23:29:43 +000048bool IA64TargetMachine::addInstSelector(PassManagerBase &PM,
Daniel Dunbarb10d2222009-07-01 01:48:54 +000049 CodeGenOpt::Level OptLevel) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000050 PM.add(createIA64DAGToDAGInstructionSelector(*this));
51 return false;
52}
53
Bill Wendling5ed22ac2009-04-29 23:29:43 +000054bool IA64TargetMachine::addPreEmitPass(PassManagerBase &PM,
55 CodeGenOpt::Level OptLevel) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000056 // Make sure everything is bundled happily
57 PM.add(createIA64BundlingPass(*this));
58 return true;
59}