2009-08-02 17:32:10 +00:00
|
|
|
//===-- BlackfinTargetMachine.cpp - Define TargetMachine for Blackfin -----===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "BlackfinTargetMachine.h"
|
|
|
|
#include "Blackfin.h"
|
|
|
|
#include "llvm/PassManager.h"
|
2011-08-24 18:08:43 +00:00
|
|
|
#include "llvm/Support/TargetRegistry.h"
|
2009-08-02 17:32:10 +00:00
|
|
|
|
|
|
|
using namespace llvm;
|
|
|
|
|
|
|
|
extern "C" void LLVMInitializeBlackfinTarget() {
|
|
|
|
RegisterTargetMachine<BlackfinTargetMachine> X(TheBlackfinTarget);
|
|
|
|
}
|
|
|
|
|
|
|
|
BlackfinTargetMachine::BlackfinTargetMachine(const Target &T,
|
2011-07-19 06:37:02 +00:00
|
|
|
StringRef TT,
|
|
|
|
StringRef CPU,
|
2011-07-20 07:51:56 +00:00
|
|
|
StringRef FS,
|
|
|
|
Reloc::Model RM,
|
|
|
|
CodeModel::Model CM)
|
|
|
|
: LLVMTargetMachine(T, TT, CPU, FS, RM, CM),
|
2009-11-07 19:07:32 +00:00
|
|
|
DataLayout("e-p:32:32-i64:32-f64:32-n32"),
|
2011-06-30 01:53:36 +00:00
|
|
|
Subtarget(TT, CPU, FS),
|
2009-08-02 17:32:10 +00:00
|
|
|
TLInfo(*this),
|
2010-05-11 17:31:57 +00:00
|
|
|
TSInfo(*this),
|
2009-08-02 17:32:10 +00:00
|
|
|
InstrInfo(Subtarget),
|
2011-01-10 12:39:04 +00:00
|
|
|
FrameLowering(Subtarget) {
|
2009-08-02 17:32:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool BlackfinTargetMachine::addInstSelector(PassManagerBase &PM,
|
|
|
|
CodeGenOpt::Level OptLevel) {
|
|
|
|
PM.add(createBlackfinISelDag(*this, OptLevel));
|
|
|
|
return false;
|
|
|
|
}
|