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

Side by Side Diff: src/IceConverter.cpp

Issue 1784243006: Subzero: Improve the use of timers. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 4 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 | « src/IceCompiler.cpp ('k') | src/IceELFObjectWriter.cpp » ('j') | 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/IceConverter.cpp - Converts LLVM to Ice ---------------===// 1 //===- subzero/src/IceConverter.cpp - Converts LLVM to Ice ---------------===//
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 /// \file 10 /// \file
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 } 906 }
907 GlobalDeclarationMap[GV] = Var; 907 GlobalDeclarationMap[GV] = Var;
908 } 908 }
909 } 909 }
910 910
911 void Converter::convertGlobals(Module *Mod) { 911 void Converter::convertGlobals(Module *Mod) {
912 lowerGlobals(LLVM2ICEGlobalsConverter(*this).convertGlobalsToIce(Mod)); 912 lowerGlobals(LLVM2ICEGlobalsConverter(*this).convertGlobalsToIce(Mod));
913 } 913 }
914 914
915 void Converter::convertFunctions() { 915 void Converter::convertFunctions() {
916 const TimerStackIdT StackID = GlobalContext::TSK_Funcs;
917 for (const Function &I : *Mod) { 916 for (const Function &I : *Mod) {
918 if (I.empty()) 917 if (I.empty())
919 continue; 918 continue;
920 919 TimerMarker _(Ctx, I.getName());
921 TimerIdT TimerID = 0;
922 const bool TimeThisFunction = Ctx->getFlags().getTimeEachFunction();
923 if (TimeThisFunction) {
924 TimerID = Ctx->getTimerID(StackID, I.getName());
925 Ctx->pushTimer(TimerID, StackID);
926 }
927 LLVM2ICEFunctionConverter FunctionConverter(*this); 920 LLVM2ICEFunctionConverter FunctionConverter(*this);
928 FunctionConverter.convertFunction(&I); 921 FunctionConverter.convertFunction(&I);
929 if (TimeThisFunction)
930 Ctx->popTimer(TimerID, StackID);
931 } 922 }
932 } 923 }
933 924
934 } // end of namespace Ice 925 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceCompiler.cpp ('k') | src/IceELFObjectWriter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698