Index: src/PNaClTranslator.cpp |
diff --git a/src/PNaClTranslator.cpp b/src/PNaClTranslator.cpp |
index 4f1c3a6714426dabc38081e70302cc7deda5ea51..3f00e2cde19916deac0942e0b011bf098a24026a 100644 |
--- a/src/PNaClTranslator.cpp |
+++ b/src/PNaClTranslator.cpp |
@@ -1339,21 +1339,13 @@ public: |
NextLocalInstIndex(Context->getNumGlobalIDs()) {} |
bool convertFunction() { |
- const Ice::TimerStackIdT StackID = Ice::GlobalContext::TSK_Funcs; |
- Ice::TimerIdT TimerID = 0; |
- const bool TimeThisFunction = getFlags().getTimeEachFunction(); |
- if (TimeThisFunction) { |
- TimerID = getTranslator().getContext()->getTimerID(StackID, |
- FuncDecl->getName()); |
- getTranslator().getContext()->pushTimer(TimerID, StackID); |
- } |
- |
// Note: The Cfg is created, even when IR generation is disabled. This is |
// done to install a CfgLocalAllocator for various internal containers. |
Func = Ice::Cfg::create(getTranslator().getContext(), |
getTranslator().getNextSequenceNumber()); |
Karl
2016/03/11 23:05:50
Curiosity: Why not include this in the time?
Jim Stichnoth
2016/03/11 23:32:34
It was because of the scoping - I need the timer t
|
bool ParserResult; |
{ |
+ Ice::TimerMarker T(getTranslator().getContext(), FuncDecl->getName()); |
Ice::CfgLocalAllocatorScope _(Func.get()); |
// TODO(kschimpf) Clean up API to add a function signature to a CFG. |
@@ -1370,12 +1362,6 @@ public: |
ParserResult = ParseThisBlock(); |
- // Temporarily end per-function timing, which will be resumed by the |
- // translator function. This is because translation may be done |
- // asynchronously in a separate thread. |
- if (TimeThisFunction) |
- getTranslator().getContext()->popTimer(TimerID, StackID); |
- |
// Note: Once any errors have been found, we turn off all translation of |
// all remaining functions. This allows successive parsing errors to be |
// reported, without adding extra checks to the translator for such |