2009-08-02 19:32:10 +02: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 20:08:43 +02:00
|
|
|
#include "llvm/Support/TargetRegistry.h"
|
2009-08-02 19:32:10 +02:00
|
|
|
|
|
|
|
using namespace llvm;
|
|
|
|
|
|
|
|
extern "C" void LLVMInitializeBlackfinTarget() {
|
|
|
|
RegisterTargetMachine<BlackfinTargetMachine> X(TheBlackfinTarget);
|
|
|
|
}
|
|
|
|
|
|
|
|
BlackfinTargetMachine::BlackfinTargetMachine(const Target &T,
|
2011-07-19 08:37:02 +02:00
|
|
|
StringRef TT,
|
|
|
|
StringRef CPU,
|
2011-07-20 09:51:56 +02:00
|
|
|
StringRef FS,
|
|
|
|
Reloc::Model RM,
|
|
|
|
CodeModel::Model CM)
|
|
|
|
: LLVMTargetMachine(T, TT, CPU, FS, RM, CM),
|
2009-11-07 20:07:32 +01:00
|
|
|
DataLayout("e-p:32:32-i64:32-f64:32-n32"),
|
2011-06-30 03:53:36 +02:00
|
|
|
Subtarget(TT, CPU, FS),
|
2009-08-02 19:32:10 +02:00
|
|
|
TLInfo(*this),
|
2010-05-11 19:31:57 +02:00
|
|
|
TSInfo(*this),
|
2009-08-02 19:32:10 +02:00
|
|
|
InstrInfo(Subtarget),
|
2011-01-10 13:39:04 +01:00
|
|
|
FrameLowering(Subtarget) {
|
2009-08-02 19:32:10 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
bool BlackfinTargetMachine::addInstSelector(PassManagerBase &PM,
|
|
|
|
CodeGenOpt::Level OptLevel) {
|
|
|
|
PM.add(createBlackfinISelDag(*this, OptLevel));
|
|
|
|
return false;
|
|
|
|
}
|