| OLD | NEW |
| 1 //===- subzero/src/IceTimerTree.h - Pass timer defs -------------*- C++ -*-===// | 1 //===- subzero/src/IceTimerTree.h - Pass timer 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 /// \file | 10 /// \file |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "IceTimerTree.def" | 21 #include "IceTimerTree.def" |
| 22 | 22 |
| 23 namespace Ice { | 23 namespace Ice { |
| 24 | 24 |
| 25 class TimerStack { | 25 class TimerStack { |
| 26 TimerStack() = delete; | 26 TimerStack() = delete; |
| 27 TimerStack &operator=(const TimerStack &) = delete; | 27 TimerStack &operator=(const TimerStack &) = delete; |
| 28 | 28 |
| 29 /// Timer tree index type. A variable of this type is used to access | 29 /// Timer tree index type. A variable of this type is used to access |
| 30 /// an interior, not-necessarily-leaf node of the tree. | 30 /// an interior, not-necessarily-leaf node of the tree. |
| 31 typedef std::vector<class TimerTreeNode>::size_type TTindex; | 31 using TTindex = std::vector<class TimerTreeNode>::size_type; |
| 32 /// Representation of a path of leaf values leading to a particular | 32 /// Representation of a path of leaf values leading to a particular |
| 33 /// node. The representation happens to be in "reverse" order, | 33 /// node. The representation happens to be in "reverse" order, |
| 34 /// i.e. from leaf/interior to root, for implementation efficiency. | 34 /// i.e. from leaf/interior to root, for implementation efficiency. |
| 35 typedef llvm::SmallVector<TTindex, 8> PathType; | 35 using PathType = llvm::SmallVector<TTindex, 8>; |
| 36 /// Representation of a mapping of leaf node indexes from one timer | 36 /// Representation of a mapping of leaf node indexes from one timer |
| 37 /// stack to another. | 37 /// stack to another. |
| 38 typedef std::vector<TimerIdT> TranslationType; | 38 using TranslationType = std::vector<TimerIdT>; |
| 39 | 39 |
| 40 /// TimerTreeNode represents an interior or leaf node in the call tree. | 40 /// TimerTreeNode represents an interior or leaf node in the call tree. |
| 41 /// It contains a list of children, a pointer to its parent, and the | 41 /// It contains a list of children, a pointer to its parent, and the |
| 42 /// timer ID for the node. It also holds the cumulative time spent at | 42 /// timer ID for the node. It also holds the cumulative time spent at |
| 43 /// this node and below. The children are always at a higher index in | 43 /// this node and below. The children are always at a higher index in |
| 44 /// the TimerTreeNode::Nodes array, and the parent is always at a lower | 44 /// the TimerTreeNode::Nodes array, and the parent is always at a lower |
| 45 /// index. | 45 /// index. |
| 46 class TimerTreeNode { | 46 class TimerTreeNode { |
| 47 TimerTreeNode &operator=(const TimerTreeNode &) = delete; | 47 TimerTreeNode &operator=(const TimerTreeNode &) = delete; |
| 48 | 48 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 std::vector<IceString> IDs; /// indexed by TimerIdT | 90 std::vector<IceString> IDs; /// indexed by TimerIdT |
| 91 std::vector<TimerTreeNode> Nodes; /// indexed by TTindex | 91 std::vector<TimerTreeNode> Nodes; /// indexed by TTindex |
| 92 std::vector<double> LeafTimes; /// indexed by TimerIdT | 92 std::vector<double> LeafTimes; /// indexed by TimerIdT |
| 93 std::vector<size_t> LeafCounts; /// indexed by TimerIdT | 93 std::vector<size_t> LeafCounts; /// indexed by TimerIdT |
| 94 TTindex StackTop = 0; | 94 TTindex StackTop = 0; |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 } // end of namespace Ice | 97 } // end of namespace Ice |
| 98 | 98 |
| 99 #endif // SUBZERO_SRC_ICETIMERTREE_H | 99 #endif // SUBZERO_SRC_ICETIMERTREE_H |
| OLD | NEW |