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

Side by Side Diff: src/IceGlobalContext.cpp

Issue 921043002: Subzero: Honor the Internal flag when filetype=asm. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 10 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceGlobalContext.cpp - Global context defs -------------===// 1 //===- subzero/src/IceGlobalContext.cpp - Global context defs -------------===//
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 aspects of the compilation that persist across 10 // This file defines aspects of the compilation that persist across
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 continue; // Func goes out of scope and gets deleted 191 continue; // Func goes out of scope and gets deleted
192 } 192 }
193 Func->translate(); 193 Func->translate();
194 EmitterWorkItem *Item = nullptr; 194 EmitterWorkItem *Item = nullptr;
195 if (Func->hasError()) { 195 if (Func->hasError()) {
196 getErrorStatus()->assign(EC_Translation); 196 getErrorStatus()->assign(EC_Translation);
197 OstreamLocker L(this); 197 OstreamLocker L(this);
198 getStrDump() << "ICE translation error: " << Func->getError() << "\n"; 198 getStrDump() << "ICE translation error: " << Func->getError() << "\n";
199 Item = new EmitterWorkItem(Func->getSequenceNumber()); 199 Item = new EmitterWorkItem(Func->getSequenceNumber());
200 } else { 200 } else {
201 Func->getAssembler<>()->setInternal(Func->getInternal());
201 switch (getFlags().getOutFileType()) { 202 switch (getFlags().getOutFileType()) {
202 case FT_Elf: 203 case FT_Elf:
203 case FT_Iasm: { 204 case FT_Iasm: {
204 Func->emitIAS(); 205 Func->emitIAS();
205 // The Cfg has already emitted into the assembly buffer, so 206 // The Cfg has already emitted into the assembly buffer, so
206 // stats have been fully collected into this thread's TLS. 207 // stats have been fully collected into this thread's TLS.
207 // Dump them before TLS is reset for the next Cfg. 208 // Dump them before TLS is reset for the next Cfg.
208 dumpStats(Func->getFunctionName()); 209 dumpStats(Func->getFunctionName());
209 Assembler *Asm = Func->releaseAssembler(); 210 Assembler *Asm = Func->releaseAssembler();
210 // Copy relevant fields into Asm before Func is deleted. 211 // Copy relevant fields into Asm before Func is deleted.
211 Asm->setFunctionName(Func->getFunctionName()); 212 Asm->setFunctionName(Func->getFunctionName());
212 Asm->setInternal(Func->getInternal());
213 Item = new EmitterWorkItem(Func->getSequenceNumber(), Asm); 213 Item = new EmitterWorkItem(Func->getSequenceNumber(), Asm);
214 } break; 214 } break;
215 case FT_Asm: 215 case FT_Asm:
216 // The Cfg has not been emitted yet, so stats are not ready 216 // The Cfg has not been emitted yet, so stats are not ready
217 // to be dumped. 217 // to be dumped.
218 Item = new EmitterWorkItem(Func->getSequenceNumber(), Func.release()); 218 Item = new EmitterWorkItem(Func->getSequenceNumber(), Func.release());
219 break; 219 break;
220 } 220 }
221 } 221 }
222 Cfg::setCurrentCfg(nullptr); 222 Cfg::setCurrentCfg(nullptr);
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 Ctx = Func->getContext(); 740 Ctx = Func->getContext();
741 Active = 741 Active =
742 Func->getFocusedTiming() || Ctx->getFlags().getSubzeroTimingEnabled(); 742 Func->getFocusedTiming() || Ctx->getFlags().getSubzeroTimingEnabled();
743 if (Active) 743 if (Active)
744 Ctx->pushTimer(ID, StackID); 744 Ctx->pushTimer(ID, StackID);
745 } 745 }
746 746
747 ICE_TLS_DEFINE_FIELD(GlobalContext::ThreadContext *, GlobalContext, TLS); 747 ICE_TLS_DEFINE_FIELD(GlobalContext::ThreadContext *, GlobalContext, TLS);
748 748
749 } // end of namespace Ice 749 } // end of namespace Ice
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698