2005-03-17 18:17:03 +00:00
|
|
|
//===-- IA64TargetMachine.cpp - Define TargetMachine for IA64 -------------===//
|
2005-04-21 23:13:11 +00:00
|
|
|
//
|
2005-03-17 18:17:03 +00:00
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-29 20:36:04 +00:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2005-04-21 23:13:11 +00:00
|
|
|
//
|
2005-03-17 18:17:03 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
2005-04-21 23:13:11 +00:00
|
|
|
//
|
2006-09-04 04:14:57 +00:00
|
|
|
// This file implements the IA64 specific subclass of TargetMachine.
|
2005-03-17 18:17:03 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2006-09-07 23:39:26 +00:00
|
|
|
#include "IA64TargetAsmInfo.h"
|
2005-03-17 18:17:03 +00:00
|
|
|
#include "IA64TargetMachine.h"
|
|
|
|
#include "IA64.h"
|
|
|
|
#include "llvm/Module.h"
|
|
|
|
#include "llvm/PassManager.h"
|
|
|
|
#include "llvm/Target/TargetMachineRegistry.h"
|
|
|
|
using namespace llvm;
|
|
|
|
|
2009-06-19 19:36:55 +00:00
|
|
|
// Register the target
|
2009-07-15 20:24:03 +00:00
|
|
|
static RegisterTarget<IA64TargetMachine> X(TheIA64Target, "ia64",
|
2008-10-16 06:16:50 +00:00
|
|
|
"IA-64 (Itanium) [experimental]");
|
2005-03-17 18:17:03 +00:00
|
|
|
|
2009-06-23 23:59:40 +00:00
|
|
|
// Force static initialization.
|
|
|
|
extern "C" void LLVMInitializeIA64Target() { }
|
2009-06-16 20:12:29 +00:00
|
|
|
|
2006-09-07 23:39:26 +00:00
|
|
|
const TargetAsmInfo *IA64TargetMachine::createTargetAsmInfo() const {
|
|
|
|
return new IA64TargetAsmInfo(*this);
|
|
|
|
}
|
|
|
|
|
2005-03-17 18:17:03 +00:00
|
|
|
/// IA64TargetMachine ctor - Create an LP64 architecture model
|
|
|
|
///
|
2009-07-15 20:24:03 +00:00
|
|
|
IA64TargetMachine::IA64TargetMachine(const Target &T, const Module &M,
|
|
|
|
const std::string &FS)
|
|
|
|
: LLVMTargetMachine(T),
|
|
|
|
DataLayout("e-f80:128:128"),
|
2006-03-13 23:20:37 +00:00
|
|
|
FrameInfo(TargetFrameInfo::StackGrowsDown, 16, 0),
|
|
|
|
TLInfo(*this) { // FIXME? check this stuff
|
2005-03-17 18:17:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2006-09-04 04:14:57 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Pass Pipeline Configuration
|
|
|
|
//===----------------------------------------------------------------------===//
|
2005-03-17 18:17:03 +00:00
|
|
|
|
2009-04-29 23:29:43 +00:00
|
|
|
bool IA64TargetMachine::addInstSelector(PassManagerBase &PM,
|
2009-07-01 01:48:54 +00:00
|
|
|
CodeGenOpt::Level OptLevel) {
|
2006-01-19 14:13:11 +00:00
|
|
|
PM.add(createIA64DAGToDAGInstructionSelector(*this));
|
2006-09-04 04:14:57 +00:00
|
|
|
return false;
|
|
|
|
}
|
2005-03-17 18:17:03 +00:00
|
|
|
|
2009-04-29 23:29:43 +00:00
|
|
|
bool IA64TargetMachine::addPreEmitPass(PassManagerBase &PM,
|
|
|
|
CodeGenOpt::Level OptLevel) {
|
2006-01-25 02:23:38 +00:00
|
|
|
// Make sure everything is bundled happily
|
|
|
|
PM.add(createIA64BundlingPass(*this));
|
2006-09-04 04:14:57 +00:00
|
|
|
return true;
|
|
|
|
}
|