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

Side by Side Diff: lib/Target/X86/X86TargetMachine.cpp

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 9 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
« no previous file with comments | « lib/Target/X86/X86Subtarget.cpp ('k') | lib/Target/X86/X86TargetObjectFile.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===-- X86TargetMachine.cpp - Define TargetMachine for the X86 -----------===// 1 //===-- X86TargetMachine.cpp - Define TargetMachine for the X86 -----------===//
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 X86 specific subclass of TargetMachine. 10 // This file defines the X86 specific subclass of TargetMachine.
(...skipping 20 matching lines...) Expand all
31 31
32 static std::unique_ptr<TargetLoweringObjectFile> createTLOF(const Triple &TT) { 32 static std::unique_ptr<TargetLoweringObjectFile> createTLOF(const Triple &TT) {
33 if (TT.isOSBinFormatMachO()) { 33 if (TT.isOSBinFormatMachO()) {
34 if (TT.getArch() == Triple::x86_64) 34 if (TT.getArch() == Triple::x86_64)
35 return make_unique<X86_64MachoTargetObjectFile>(); 35 return make_unique<X86_64MachoTargetObjectFile>();
36 return make_unique<TargetLoweringObjectFileMachO>(); 36 return make_unique<TargetLoweringObjectFileMachO>();
37 } 37 }
38 38
39 if (TT.isOSLinux()) 39 if (TT.isOSLinux())
40 return make_unique<X86LinuxTargetObjectFile>(); 40 return make_unique<X86LinuxTargetObjectFile>();
41 // @LOCALMOD-BEGIN
42 if (TT.isOSNaCl())
43 return make_unique<TargetLoweringObjectFileNaCl>();
44 // @LOCALMOD-END
41 if (TT.isOSBinFormatELF()) 45 if (TT.isOSBinFormatELF())
42 return make_unique<TargetLoweringObjectFileELF>(); 46 return make_unique<TargetLoweringObjectFileELF>();
43 if (TT.isKnownWindowsMSVCEnvironment()) 47 if (TT.isKnownWindowsMSVCEnvironment())
44 return make_unique<X86WindowsTargetObjectFile>(); 48 return make_unique<X86WindowsTargetObjectFile>();
45 if (TT.isOSBinFormatCOFF()) 49 if (TT.isOSBinFormatCOFF())
46 return make_unique<TargetLoweringObjectFileCOFF>(); 50 return make_unique<TargetLoweringObjectFileCOFF>();
47 llvm_unreachable("unknown subtarget type"); 51 llvm_unreachable("unknown subtarget type");
48 } 52 }
49 53
50 /// X86TargetMachine ctor - Create an X86 target. 54 /// X86TargetMachine ctor - Create an X86 target.
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 addPass(createX86IssueVZeroUpperPass()); 212 addPass(createX86IssueVZeroUpperPass());
209 ShouldPrint = true; 213 ShouldPrint = true;
210 } 214 }
211 215
212 if (getOptLevel() != CodeGenOpt::None) { 216 if (getOptLevel() != CodeGenOpt::None) {
213 addPass(createX86PadShortFunctions()); 217 addPass(createX86PadShortFunctions());
214 addPass(createX86FixupLEAs()); 218 addPass(createX86FixupLEAs());
215 ShouldPrint = true; 219 ShouldPrint = true;
216 } 220 }
217 221
222 // @LOCALMOD-START
223 if (getX86Subtarget().isTargetNaCl()) {
224 addPass(createX86NaClRewritePass());
225 ShouldPrint = true;
226 }
227 // @LOCALMOD-END
228
218 return ShouldPrint; 229 return ShouldPrint;
219 } 230 }
OLDNEW
« no previous file with comments | « lib/Target/X86/X86Subtarget.cpp ('k') | lib/Target/X86/X86TargetObjectFile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698