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

Side by Side Diff: src/IceCfg.cpp

Issue 640713003: Subzero: Improve the output with the --timing-focus=xxx option. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: 80-col Created 6 years, 2 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/IceCfgNode.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/IceCfg.cpp - Control flow graph implementation ---------===// 1 //===- subzero/src/IceCfg.cpp - Control flow graph implementation ---------===//
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 implements the Cfg class, including constant pool 10 // This file implements the Cfg class, including constant pool
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 // Returns whether the stack frame layout has been computed yet. This 65 // Returns whether the stack frame layout has been computed yet. This
66 // is used for dumping the stack frame location of Variables. 66 // is used for dumping the stack frame location of Variables.
67 bool Cfg::hasComputedFrame() const { return getTarget()->hasComputedFrame(); } 67 bool Cfg::hasComputedFrame() const { return getTarget()->hasComputedFrame(); }
68 68
69 void Cfg::translate() { 69 void Cfg::translate() {
70 if (hasError()) 70 if (hasError())
71 return; 71 return;
72 VerboseMask OldVerboseMask = getContext()->getVerbose(); 72 VerboseMask OldVerboseMask = getContext()->getVerbose();
73 const IceString &TimingFocusOn = getContext()->getFlags().TimingFocusOn; 73 const IceString &TimingFocusOn = getContext()->getFlags().TimingFocusOn;
74 if (TimingFocusOn == "*" || TimingFocusOn == getFunctionName()) 74 if (TimingFocusOn == "*" || TimingFocusOn == getFunctionName()) {
75 setFocusedTiming(); 75 setFocusedTiming();
76 getContext()->resetTimer(GlobalContext::TSK_Default);
77 getContext()->setTimerName(GlobalContext::TSK_Default, getFunctionName());
78 }
76 bool VerboseFocus = 79 bool VerboseFocus =
77 (getContext()->getFlags().VerboseFocusOn == getFunctionName()); 80 (getContext()->getFlags().VerboseFocusOn == getFunctionName());
78 if (VerboseFocus) 81 if (VerboseFocus)
79 getContext()->setVerbose(IceV_All); 82 getContext()->setVerbose(IceV_All);
80 TimerMarker T(TimerStack::TT_translate, this); 83 TimerMarker T(TimerStack::TT_translate, this);
81 84
82 dump("Initial CFG"); 85 dump("Initial CFG");
83 86
84 // The set of translation passes and their order are determined by 87 // The set of translation passes and their order are determined by
85 // the target. 88 // the target.
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 } 374 }
372 } 375 }
373 // Print each basic block 376 // Print each basic block
374 for (CfgNode *Node : Nodes) 377 for (CfgNode *Node : Nodes)
375 Node->dump(this); 378 Node->dump(this);
376 if (getContext()->isVerbose(IceV_Instructions)) 379 if (getContext()->isVerbose(IceV_Instructions))
377 Str << "}\n"; 380 Str << "}\n";
378 } 381 }
379 382
380 } // end of namespace Ice 383 } // end of namespace Ice
OLDNEW
« no previous file with comments | « no previous file | src/IceCfgNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698