| OLD | NEW |
| 1 //===- subzero/src/IceGlobalContext.h - Global context defs -----*- C++ -*-===// | 1 //===- subzero/src/IceGlobalContext.h - Global context defs -----*- C++ -*-===// |
| 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 declares aspects of the compilation that persist across | 10 // This file declares aspects of the compilation that persist across |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 CodeStats() | 41 CodeStats() |
| 42 : InstructionsEmitted(0), RegistersSaved(0), FrameBytes(0), Spills(0), | 42 : InstructionsEmitted(0), RegistersSaved(0), FrameBytes(0), Spills(0), |
| 43 Fills(0) {} | 43 Fills(0) {} |
| 44 void reset() { *this = CodeStats(); } | 44 void reset() { *this = CodeStats(); } |
| 45 void updateEmitted(uint32_t InstCount) { InstructionsEmitted += InstCount; } | 45 void updateEmitted(uint32_t InstCount) { InstructionsEmitted += InstCount; } |
| 46 void updateRegistersSaved(uint32_t Num) { RegistersSaved += Num; } | 46 void updateRegistersSaved(uint32_t Num) { RegistersSaved += Num; } |
| 47 void updateFrameBytes(uint32_t Bytes) { FrameBytes += Bytes; } | 47 void updateFrameBytes(uint32_t Bytes) { FrameBytes += Bytes; } |
| 48 void updateSpills() { ++Spills; } | 48 void updateSpills() { ++Spills; } |
| 49 void updateFills() { ++Fills; } | 49 void updateFills() { ++Fills; } |
| 50 void dump(const IceString &Name, Ostream &Str) { | 50 void dump(const IceString &Name, Ostream &Str) { |
| 51 if (!ALLOW_DUMP) |
| 52 return; |
| 51 Str << "|" << Name << "|Inst Count |" << InstructionsEmitted << "\n"; | 53 Str << "|" << Name << "|Inst Count |" << InstructionsEmitted << "\n"; |
| 52 Str << "|" << Name << "|Regs Saved |" << RegistersSaved << "\n"; | 54 Str << "|" << Name << "|Regs Saved |" << RegistersSaved << "\n"; |
| 53 Str << "|" << Name << "|Frame Bytes |" << FrameBytes << "\n"; | 55 Str << "|" << Name << "|Frame Bytes |" << FrameBytes << "\n"; |
| 54 Str << "|" << Name << "|Spills |" << Spills << "\n"; | 56 Str << "|" << Name << "|Spills |" << Spills << "\n"; |
| 55 Str << "|" << Name << "|Fills |" << Fills << "\n"; | 57 Str << "|" << Name << "|Fills |" << Fills << "\n"; |
| 56 Str << "|" << Name << "|Spills+Fills|" << Spills + Fills << "\n"; | 58 Str << "|" << Name << "|Spills+Fills|" << Spills + Fills << "\n"; |
| 57 } | 59 } |
| 58 | 60 |
| 59 private: | 61 private: |
| 60 uint32_t InstructionsEmitted; | 62 uint32_t InstructionsEmitted; |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 | 241 |
| 240 private: | 242 private: |
| 241 TimerIdT ID; | 243 TimerIdT ID; |
| 242 GlobalContext *const Ctx; | 244 GlobalContext *const Ctx; |
| 243 const bool Active; | 245 const bool Active; |
| 244 }; | 246 }; |
| 245 | 247 |
| 246 } // end of namespace Ice | 248 } // end of namespace Ice |
| 247 | 249 |
| 248 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H | 250 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H |
| OLD | NEW |