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 "BlackfinTargetAsmInfo.h"
16 #include "llvm/PassManager.h"
17 #include "llvm/Target/TargetRegistry.h"
21 extern "C" void LLVMInitializeBlackfinTarget() {
22 RegisterTargetMachine
<BlackfinTargetMachine
> X(TheBlackfinTarget
);
23 RegisterAsmInfo
<BlackfinTargetAsmInfo
> Y(TheBlackfinTarget
);
27 BlackfinTargetMachine::BlackfinTargetMachine(const Target
&T
,
28 const std::string
&TT
,
29 const std::string
&FS
)
30 : LLVMTargetMachine(T
, TT
),
31 DataLayout("e-p:32:32-i64:32-f64:32"),
35 FrameInfo(TargetFrameInfo::StackGrowsDown
, 4, 0) {
38 bool BlackfinTargetMachine::addInstSelector(PassManagerBase
&PM
,
39 CodeGenOpt::Level OptLevel
) {
40 PM
.add(createBlackfinISelDag(*this, OptLevel
));