| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |