1 //===-- BlackfinTargetMachine.cpp - Define TargetMachine for Blackfin -----===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 //===----------------------------------------------------------------------===//
13 #include "BlackfinTargetMachine.h"
15 #include "llvm/PassManager.h"
16 #include "llvm/Target/TargetRegistry.h"
20 extern "C" void LLVMInitializeBlackfinTarget() {
21 RegisterTargetMachine<BlackfinTargetMachine> X(TheBlackfinTarget);
24 BlackfinTargetMachine::BlackfinTargetMachine(const Target &T,
25 const std::string &TT,
26 const std::string &CPU,
27 const std::string &FS)
28 : LLVMTargetMachine(T, TT, CPU, FS),
29 DataLayout("e-p:32:32-i64:32-f64:32-n32"),
30 Subtarget(TT, CPU, FS),
34 FrameLowering(Subtarget) {
37 bool BlackfinTargetMachine::addInstSelector(PassManagerBase &PM,
38 CodeGenOpt::Level OptLevel) {
39 PM.add(createBlackfinISelDag(*this, OptLevel));