| OLD | NEW |
| (Empty) |
| 1 //===-- JSTargetMachine.cpp - Define TargetMachine for the JS -------------===// | |
| 2 // | |
| 3 // The LLVM Compiler Infrastructure | |
| 4 // | |
| 5 // This file is distributed under the University of Illinois Open Source | |
| 6 // License. See LICENSE.TXT for details. | |
| 7 // | |
| 8 //===----------------------------------------------------------------------===// | |
| 9 // | |
| 10 // This file defines the JS specific subclass of TargetMachine. | |
| 11 // | |
| 12 //===----------------------------------------------------------------------===// | |
| 13 | |
| 14 #include "JSTargetMachine.h" | |
| 15 #include "JSTargetTransformInfo.h" | |
| 16 #include "llvm/Analysis/TargetTransformInfo.h" | |
| 17 #include "llvm/Support/TargetRegistry.h" | |
| 18 using namespace llvm; | |
| 19 | |
| 20 JSTargetMachine::JSTargetMachine(const Target &T, StringRef Triple, | |
| 21 StringRef CPU, StringRef FS, const TargetOption
s &Options, | |
| 22 Reloc::Model RM, CodeModel::Model CM, | |
| 23 CodeGenOpt::Level OL) | |
| 24 : TargetMachine(T, "e-p:32:32-i64:64-v128:32:128-n32-S128", Triple, CPU, | |
| 25 FS, Options) { | |
| 26 CodeGenInfo = T.createMCCodeGenInfo(Triple, RM, CM, OL); | |
| 27 } | |
| 28 | |
| 29 | |
| 30 TargetIRAnalysis JSTargetMachine::getTargetIRAnalysis() { | |
| 31 return TargetIRAnalysis( | |
| 32 [this](Function &F) { return TargetTransformInfo(JSTTI(this, F)); }); | |
| 33 } | |
| OLD | NEW |