| 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 /// \file | 10 /// \file |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 getContext()->resetTimer(GlobalContext::TSK_Default); | 177 getContext()->resetTimer(GlobalContext::TSK_Default); |
| 178 getContext()->setTimerName(GlobalContext::TSK_Default, Name); | 178 getContext()->setTimerName(GlobalContext::TSK_Default, Name); |
| 179 } | 179 } |
| 180 if (getContext()->getFlags().getTimeEachFunction()) | 180 if (getContext()->getFlags().getTimeEachFunction()) |
| 181 FunctionTimer.reset(new TimerMarker( | 181 FunctionTimer.reset(new TimerMarker( |
| 182 getContext()->getTimerID(GlobalContext::TSK_Funcs, Name), | 182 getContext()->getTimerID(GlobalContext::TSK_Funcs, Name), |
| 183 getContext(), GlobalContext::TSK_Funcs)); | 183 getContext(), GlobalContext::TSK_Funcs)); |
| 184 } | 184 } |
| 185 TimerMarker T(TimerStack::TT_translate, this); | 185 TimerMarker T(TimerStack::TT_translate, this); |
| 186 | 186 |
| 187 // Create the Hi and Lo variables where a split was needed | |
| 188 for (Variable *Var : Variables) | |
| 189 if (auto Var64On32 = llvm::dyn_cast<Variable64On32>(Var)) | |
| 190 Var64On32->initHiLo(this); | |
| 191 | |
| 192 dump("Initial CFG"); | 187 dump("Initial CFG"); |
| 193 | 188 |
| 194 if (getContext()->getFlags().getEnableBlockProfile()) { | 189 if (getContext()->getFlags().getEnableBlockProfile()) { |
| 195 profileBlocks(); | 190 profileBlocks(); |
| 196 // TODO(jpp): this is fragile, at best. Figure out a better way of | 191 // TODO(jpp): this is fragile, at best. Figure out a better way of |
| 197 // detecting exit functions. | 192 // detecting exit functions. |
| 198 if (GlobalContext::matchSymbolName(getFunctionName(), "exit")) { | 193 if (GlobalContext::matchSymbolName(getFunctionName(), "exit")) { |
| 199 addCallToProfileSummary(); | 194 addCallToProfileSummary(); |
| 200 } | 195 } |
| 201 dump("Profiled CFG"); | 196 dump("Profiled CFG"); |
| 202 } | 197 } |
| 203 | 198 |
| 199 // Create the Hi and Lo variables where a split was needed |
| 200 for (Variable *Var : Variables) |
| 201 if (auto Var64On32 = llvm::dyn_cast<Variable64On32>(Var)) |
| 202 Var64On32->initHiLo(this); |
| 203 |
| 204 // The set of translation passes and their order are determined by the | 204 // The set of translation passes and their order are determined by the |
| 205 // target. | 205 // target. |
| 206 getTarget()->translate(); | 206 getTarget()->translate(); |
| 207 | 207 |
| 208 dump("Final output"); | 208 dump("Final output"); |
| 209 if (getFocusedTiming()) | 209 if (getFocusedTiming()) |
| 210 getContext()->dumpTimers(); | 210 getContext()->dumpTimers(); |
| 211 } | 211 } |
| 212 | 212 |
| 213 void Cfg::computeInOutEdges() { | 213 void Cfg::computeInOutEdges() { |
| (...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 } | 787 } |
| 788 } | 788 } |
| 789 // Print each basic block | 789 // Print each basic block |
| 790 for (CfgNode *Node : Nodes) | 790 for (CfgNode *Node : Nodes) |
| 791 Node->dump(this); | 791 Node->dump(this); |
| 792 if (isVerbose(IceV_Instructions)) | 792 if (isVerbose(IceV_Instructions)) |
| 793 Str << "}\n"; | 793 Str << "}\n"; |
| 794 } | 794 } |
| 795 | 795 |
| 796 } // end of namespace Ice | 796 } // end of namespace Ice |
| OLD | NEW |