Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: lib/Target/JSBackend/JSTargetMachine.cpp

Issue 1151093004: Changes from 3.7 merge to files not in upstream (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 //===-- JSTargetMachine.cpp - Define TargetMachine for the JS -------------===// 1 //===-- JSTargetMachine.cpp - Define TargetMachine for the JS -------------===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This file defines the JS specific subclass of TargetMachine. 10 // This file defines the JS specific subclass of TargetMachine.
11 // 11 //
12 //===----------------------------------------------------------------------===// 12 //===----------------------------------------------------------------------===//
13 13
14 #include "JSTargetMachine.h" 14 #include "JSTargetMachine.h"
15 #include "llvm/CodeGen/Passes.h" 15 #include "JSTargetTransformInfo.h"
16 #include "llvm/Analysis/TargetTransformInfo.h"
16 #include "llvm/Support/TargetRegistry.h" 17 #include "llvm/Support/TargetRegistry.h"
17 #include "llvm/PassManager.h"
18 using namespace llvm; 18 using namespace llvm;
19 19
20 JSTargetMachine::JSTargetMachine(const Target &T, StringRef Triple, 20 JSTargetMachine::JSTargetMachine(const Target &T, StringRef Triple,
21 StringRef CPU, StringRef FS, const TargetOption s &Options, 21 StringRef CPU, StringRef FS, const TargetOption s &Options,
22 Reloc::Model RM, CodeModel::Model CM, 22 Reloc::Model RM, CodeModel::Model CM,
23 CodeGenOpt::Level OL) 23 CodeGenOpt::Level OL)
24 : TargetMachine(T, Triple, CPU, FS, Options), 24 : TargetMachine(T, "e-p:32:32-i64:64-v128:32:128-n32-S128", Triple, CPU,
25 DL("e-p:32:32-i64:64-v128:32:128-n32-S128"), 25 FS, Options) {
26 Subtarget(&DL) {
27 CodeGenInfo = T.createMCCodeGenInfo(Triple, RM, CM, OL); 26 CodeGenInfo = T.createMCCodeGenInfo(Triple, RM, CM, OL);
28 } 27 }
29 28
30 void JSTargetMachine::addAnalysisPasses(PassManagerBase &PM) { 29
31 // We don't currently use BasicTTI because that depends on 30 TargetIRAnalysis JSTargetMachine::getTargetIRAnalysis() {
32 // TargetLoweringInfo, which we don't currently implement. 31 return TargetIRAnalysis(
33 PM.add(createJSTargetTransformInfoPass(this)); 32 [this](Function &F) { return TargetTransformInfo(JSTTI(this, F)); });
34 } 33 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698