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

Side by Side Diff: src/IceCompiler.cpp

Issue 1171563002: Subzero: Emit ARM build-attributes in the file scope (as header). (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: use class final, fix for mips32 Created 5 years, 6 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 | « no previous file | src/IceGlobalContext.h » ('j') | src/IceTargetLoweringMIPS32.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceCompiler.cpp - Driver for bitcode translation -------===// 1 //===- subzero/src/IceCompiler.cpp - Driver for bitcode translation -------===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
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 a driver for translating PNaCl bitcode into native code. 10 // This file defines a driver for translating PNaCl bitcode into native code.
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 const std::string LLSuffix = ".ll"; 95 const std::string LLSuffix = ".ll";
96 const IceString &IRFilename = ExtraFlags.getIRFilename(); 96 const IceString &IRFilename = ExtraFlags.getIRFilename();
97 bool BuildOnRead = ExtraFlags.getBuildOnRead(); 97 bool BuildOnRead = ExtraFlags.getBuildOnRead();
98 if (ALLOW_LLVM_IR_AS_INPUT && IRFilename.length() >= LLSuffix.length() && 98 if (ALLOW_LLVM_IR_AS_INPUT && IRFilename.length() >= LLSuffix.length() &&
99 IRFilename.compare(IRFilename.length() - LLSuffix.length(), 99 IRFilename.compare(IRFilename.length() - LLSuffix.length(),
100 LLSuffix.length(), LLSuffix) == 0) 100 LLSuffix.length(), LLSuffix) == 0)
101 BuildOnRead = false; 101 BuildOnRead = false;
102 102
103 TimerMarker T(Ice::TimerStack::TT_szmain, &Ctx); 103 TimerMarker T(Ice::TimerStack::TT_szmain, &Ctx);
104 104
105 if (Ctx.getFlags().getOutFileType() == FT_Elf) { 105 Ctx.emitFileHeader();
106 TimerMarker T1(Ice::TimerStack::TT_emit, &Ctx);
107 Ctx.getObjectWriter()->writeInitialELFHeader();
108 }
109
110 Ctx.startWorkerThreads(); 106 Ctx.startWorkerThreads();
111 107
112 std::unique_ptr<Translator> Translator; 108 std::unique_ptr<Translator> Translator;
113 if (BuildOnRead) { 109 if (BuildOnRead) {
114 std::unique_ptr<PNaClTranslator> PTranslator(new PNaClTranslator(&Ctx)); 110 std::unique_ptr<PNaClTranslator> PTranslator(new PNaClTranslator(&Ctx));
115 std::unique_ptr<llvm::StreamingMemoryObject> MemObj( 111 std::unique_ptr<llvm::StreamingMemoryObject> MemObj(
116 new llvm::StreamingMemoryObjectImpl(InputStream.release())); 112 new llvm::StreamingMemoryObjectImpl(InputStream.release()));
117 PTranslator->translate(IRFilename, std::move(MemObj)); 113 PTranslator->translate(IRFilename, std::move(MemObj));
118 Translator.reset(PTranslator.release()); 114 Translator.reset(PTranslator.release());
119 } else if (ALLOW_LLVM_IR) { 115 } else if (ALLOW_LLVM_IR) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 Ctx.dumpTimers(); 153 Ctx.dumpTimers();
158 if (Ctx.getFlags().getTimeEachFunction()) { 154 if (Ctx.getFlags().getTimeEachFunction()) {
159 const bool DumpCumulative = false; 155 const bool DumpCumulative = false;
160 Ctx.dumpTimers(GlobalContext::TSK_Funcs, DumpCumulative); 156 Ctx.dumpTimers(GlobalContext::TSK_Funcs, DumpCumulative);
161 } 157 }
162 const bool FinalStats = true; 158 const bool FinalStats = true;
163 Ctx.dumpStats("_FINAL_", FinalStats); 159 Ctx.dumpStats("_FINAL_", FinalStats);
164 } 160 }
165 161
166 } // end of namespace Ice 162 } // end of namespace Ice
OLDNEW
« no previous file with comments | « no previous file | src/IceGlobalContext.h » ('j') | src/IceTargetLoweringMIPS32.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698