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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 ImplicitArgs.push_back(Arg); | 61 ImplicitArgs.push_back(Arg); |
62 } | 62 } |
63 | 63 |
64 // Returns whether the stack frame layout has been computed yet. This | 64 // Returns whether the stack frame layout has been computed yet. This |
65 // is used for dumping the stack frame location of Variables. | 65 // is used for dumping the stack frame location of Variables. |
66 bool Cfg::hasComputedFrame() const { return getTarget()->hasComputedFrame(); } | 66 bool Cfg::hasComputedFrame() const { return getTarget()->hasComputedFrame(); } |
67 | 67 |
68 void Cfg::translate() { | 68 void Cfg::translate() { |
69 if (hasError()) | 69 if (hasError()) |
70 return; | 70 return; |
71 const IceString &TimingFocusOn = getContext()->getFlags().TimingFocusOn; | 71 if (ALLOW_DUMP) { |
72 if (TimingFocusOn == "*" || TimingFocusOn == getFunctionName()) { | 72 const IceString &TimingFocusOn = getContext()->getFlags().TimingFocusOn; |
73 setFocusedTiming(); | 73 if (TimingFocusOn == "*" || TimingFocusOn == getFunctionName()) { |
74 getContext()->resetTimer(GlobalContext::TSK_Default); | 74 setFocusedTiming(); |
75 getContext()->setTimerName(GlobalContext::TSK_Default, getFunctionName()); | 75 getContext()->resetTimer(GlobalContext::TSK_Default); |
| 76 getContext()->setTimerName(GlobalContext::TSK_Default, getFunctionName()); |
| 77 } |
76 } | 78 } |
77 TimerMarker T(TimerStack::TT_translate, this); | 79 TimerMarker T(TimerStack::TT_translate, this); |
78 | 80 |
79 dump("Initial CFG"); | 81 dump("Initial CFG"); |
80 | 82 |
81 // The set of translation passes and their order are determined by | 83 // The set of translation passes and their order are determined by |
82 // the target. | 84 // the target. |
83 getTarget()->translate(); | 85 getTarget()->translate(); |
84 | 86 |
85 dump("Final output"); | 87 dump("Final output"); |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 } | 502 } |
501 } | 503 } |
502 // Print each basic block | 504 // Print each basic block |
503 for (CfgNode *Node : Nodes) | 505 for (CfgNode *Node : Nodes) |
504 Node->dump(this); | 506 Node->dump(this); |
505 if (getContext()->isVerbose(IceV_Instructions)) | 507 if (getContext()->isVerbose(IceV_Instructions)) |
506 Str << "}\n"; | 508 Str << "}\n"; |
507 } | 509 } |
508 | 510 |
509 } // end of namespace Ice | 511 } // end of namespace Ice |
OLD | NEW |