| OLD | NEW |
| 1 //===- subzero/src/IceDefs.h - Common Subzero declaraions -------*- C++ -*-===// | 1 //===- subzero/src/IceDefs.h - Common Subzero declaraions -------*- 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 various useful types and classes that have | 10 // This file declares various useful types and classes that have |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 class Constant; | 50 class Constant; |
| 51 class GlobalContext; | 51 class GlobalContext; |
| 52 class Inst; | 52 class Inst; |
| 53 class InstPhi; | 53 class InstPhi; |
| 54 class InstTarget; | 54 class InstTarget; |
| 55 class LiveRange; | 55 class LiveRange; |
| 56 class Liveness; | 56 class Liveness; |
| 57 class Operand; | 57 class Operand; |
| 58 class TargetLowering; | 58 class TargetLowering; |
| 59 class Variable; | 59 class Variable; |
| 60 class VariablesMetadata; |
| 60 | 61 |
| 61 // TODO: Switch over to LLVM's ADT container classes. | 62 // TODO: Switch over to LLVM's ADT container classes. |
| 62 // http://llvm.org/docs/ProgrammersManual.html#picking-the-right-data-structure-
for-a-task | 63 // http://llvm.org/docs/ProgrammersManual.html#picking-the-right-data-structure-
for-a-task |
| 63 typedef std::string IceString; | 64 typedef std::string IceString; |
| 64 typedef std::list<Inst *> InstList; | 65 typedef std::list<Inst *> InstList; |
| 65 typedef std::list<InstPhi *> PhiList; | 66 typedef std::list<InstPhi *> PhiList; |
| 66 typedef std::vector<Variable *> VarList; | 67 typedef std::vector<Variable *> VarList; |
| 67 typedef std::vector<Operand *> OperandList; | 68 typedef std::vector<Operand *> OperandList; |
| 68 typedef std::vector<CfgNode *> NodeList; | 69 typedef std::vector<CfgNode *> NodeList; |
| 69 typedef std::vector<Constant *> ConstantList; | 70 typedef std::vector<Constant *> ConstantList; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 }; | 131 }; |
| 131 | 132 |
| 132 template <typename T> bool WouldOverflowAdd(T X, T Y) { | 133 template <typename T> bool WouldOverflowAdd(T X, T Y) { |
| 133 return ((X > 0 && Y > 0 && (X > std::numeric_limits<T>::max() - Y)) || | 134 return ((X > 0 && Y > 0 && (X > std::numeric_limits<T>::max() - Y)) || |
| 134 (X < 0 && Y < 0 && (X < std::numeric_limits<T>::min() - Y))); | 135 (X < 0 && Y < 0 && (X < std::numeric_limits<T>::min() - Y))); |
| 135 } | 136 } |
| 136 | 137 |
| 137 } // end of namespace Ice | 138 } // end of namespace Ice |
| 138 | 139 |
| 139 #endif // SUBZERO_SRC_ICEDEFS_H | 140 #endif // SUBZERO_SRC_ICEDEFS_H |
| OLD | NEW |