Subzero: Add a few performance measurement tools. --timing-funcs - Produces a sorted list of total time spent translating each function. --timing-focus=<F> - Turns on the --timing equivalent just for one function. Use '*' to do this for all functions, i.e. get complete timing breakdowns across all functions. --verbose-focus=<F> - Temporarily turns on --verbose=all for one function. BUG= none R=jvoung@chromium.org Review URL: https://codereview.chromium.org/620373004
diff --git a/src/IceTargetLoweringX8632.cpp b/src/IceTargetLoweringX8632.cpp index 3217141..9cac11d 100644 --- a/src/IceTargetLoweringX8632.cpp +++ b/src/IceTargetLoweringX8632.cpp
@@ -313,9 +313,7 @@ } void TargetX8632::translateO2() { - GlobalContext *Context = Func->getContext(); - static TimerIdT IDO2 = GlobalContext::getTimerID("O2"); - TimerMarker T(IDO2, Context); + TimerMarker T(TimerStack::TT_O2, Func); // Lower Phi instructions. Func->placePhiLoads(); @@ -400,9 +398,7 @@ } void TargetX8632::translateOm1() { - GlobalContext *Context = Func->getContext(); - static TimerIdT IDOm1 = GlobalContext::getTimerID("Om1"); - TimerMarker T(IDOm1, Context); + TimerMarker T(TimerStack::TT_Om1, Func); Func->placePhiLoads(); if (Func->hasError()) return; @@ -4305,8 +4301,7 @@ void TargetX8632::postLower() { if (Ctx->getOptLevel() != Opt_m1) return; - static TimerIdT IDpostLower = GlobalContext::getTimerID("postLower"); - TimerMarker T(IDpostLower, Ctx); + TimerMarker T(TimerStack::TT_postLower, Func); // TODO: Avoid recomputing WhiteList every instruction. RegSetMask RegInclude = RegSet_All; RegSetMask RegExclude = RegSet_StackPointer;