2009-07-25 14:49:55 +08:00
|
|
|
//===-- SystemZTargetMachine.cpp - Define TargetMachine for SystemZ -------===//
|
2009-07-16 21:27:25 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "SystemZTargetMachine.h"
|
|
|
|
#include "SystemZ.h"
|
|
|
|
#include "llvm/PassManager.h"
|
2009-07-25 14:49:55 +08:00
|
|
|
#include "llvm/Target/TargetRegistry.h"
|
2009-07-16 21:27:25 +08:00
|
|
|
using namespace llvm;
|
|
|
|
|
2009-07-16 22:36:52 +08:00
|
|
|
extern "C" void LLVMInitializeSystemZTarget() {
|
2009-07-25 14:49:55 +08:00
|
|
|
// Register the target.
|
|
|
|
RegisterTargetMachine<SystemZTargetMachine> X(TheSystemZTarget);
|
2009-07-16 21:27:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/// SystemZTargetMachine ctor - Create an ILP64 architecture model
|
|
|
|
///
|
2009-07-16 22:36:52 +08:00
|
|
|
SystemZTargetMachine::SystemZTargetMachine(const Target &T,
|
2011-07-20 15:51:56 +08:00
|
|
|
StringRef TT, StringRef CPU,
|
|
|
|
StringRef FS, Reloc::Model RM,
|
|
|
|
CodeModel::Model CM)
|
|
|
|
: LLVMTargetMachine(T, TT, CPU, FS, RM, CM),
|
2011-06-30 09:53:36 +08:00
|
|
|
Subtarget(TT, CPU, FS),
|
2009-07-16 22:36:52 +08:00
|
|
|
DataLayout("E-p:64:64:64-i8:8:16-i16:16:16-i32:32:32-i64:64:64-f32:32:32"
|
2009-11-08 03:07:32 +08:00
|
|
|
"-f64:64:64-f128:128:128-a0:16:16-n32:64"),
|
2010-05-12 01:31:57 +08:00
|
|
|
InstrInfo(*this), TLInfo(*this), TSInfo(*this),
|
2011-01-10 20:39:04 +08:00
|
|
|
FrameLowering(Subtarget) {
|
2009-07-16 21:27:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
bool SystemZTargetMachine::addInstSelector(PassManagerBase &PM,
|
|
|
|
CodeGenOpt::Level OptLevel) {
|
|
|
|
// Install an instruction selector.
|
|
|
|
PM.add(createSystemZISelDag(*this, OptLevel));
|
|
|
|
return false;
|
|
|
|
}
|