| OLD | NEW |
| 1 //===- subzero/src/IceConverter.cpp - Converts LLVM to Ice ---------------===// | 1 //===- subzero/src/IceConverter.cpp - Converts LLVM to Ice ---------------===// |
| 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 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 906 } | 906 } |
| 907 GlobalDeclarationMap[GV] = Var; | 907 GlobalDeclarationMap[GV] = Var; |
| 908 } | 908 } |
| 909 } | 909 } |
| 910 | 910 |
| 911 void Converter::convertGlobals(Module *Mod) { | 911 void Converter::convertGlobals(Module *Mod) { |
| 912 lowerGlobals(LLVM2ICEGlobalsConverter(*this).convertGlobalsToIce(Mod)); | 912 lowerGlobals(LLVM2ICEGlobalsConverter(*this).convertGlobalsToIce(Mod)); |
| 913 } | 913 } |
| 914 | 914 |
| 915 void Converter::convertFunctions() { | 915 void Converter::convertFunctions() { |
| 916 const TimerStackIdT StackID = GlobalContext::TSK_Funcs; | |
| 917 for (const Function &I : *Mod) { | 916 for (const Function &I : *Mod) { |
| 918 if (I.empty()) | 917 if (I.empty()) |
| 919 continue; | 918 continue; |
| 920 | 919 TimerMarker _(Ctx, I.getName()); |
| 921 TimerIdT TimerID = 0; | |
| 922 const bool TimeThisFunction = Ctx->getFlags().getTimeEachFunction(); | |
| 923 if (TimeThisFunction) { | |
| 924 TimerID = Ctx->getTimerID(StackID, I.getName()); | |
| 925 Ctx->pushTimer(TimerID, StackID); | |
| 926 } | |
| 927 LLVM2ICEFunctionConverter FunctionConverter(*this); | 920 LLVM2ICEFunctionConverter FunctionConverter(*this); |
| 928 FunctionConverter.convertFunction(&I); | 921 FunctionConverter.convertFunction(&I); |
| 929 if (TimeThisFunction) | |
| 930 Ctx->popTimer(TimerID, StackID); | |
| 931 } | 922 } |
| 932 } | 923 } |
| 933 | 924 |
| 934 } // end of namespace Ice | 925 } // end of namespace Ice |
| OLD | NEW |