Chromium Code Reviews| 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 11 matching lines...) Expand all Loading... | |
| 22 #include <cstdio> // snprintf | 22 #include <cstdio> // snprintf |
| 23 #include <functional> // std::less | 23 #include <functional> // std::less |
| 24 #include <list> | 24 #include <list> |
| 25 #include <map> | 25 #include <map> |
| 26 #include <set> | 26 #include <set> |
| 27 #include <string> | 27 #include <string> |
| 28 #include <vector> | 28 #include <vector> |
| 29 | 29 |
| 30 #include "llvm/ADT/BitVector.h" | 30 #include "llvm/ADT/BitVector.h" |
| 31 #include "llvm/ADT/SmallBitVector.h" | 31 #include "llvm/ADT/SmallBitVector.h" |
| 32 #include "llvm/ADT/SmallVector.h" | |
| 32 #include "llvm/ADT/STLExtras.h" | 33 #include "llvm/ADT/STLExtras.h" |
| 33 #include "llvm/Support/Casting.h" | 34 #include "llvm/Support/Casting.h" |
| 34 #include "llvm/Support/Compiler.h" // LLVM_STATIC_ASSERT | 35 #include "llvm/Support/Compiler.h" // LLVM_STATIC_ASSERT |
| 35 #include "llvm/Support/raw_ostream.h" | 36 #include "llvm/Support/raw_ostream.h" |
| 36 #include "llvm/Support/Timer.h" | 37 #include "llvm/Support/Timer.h" |
| 37 | 38 |
| 38 // Roll our own static_assert<> in the absence of C++11. TODO: change | 39 // Roll our own static_assert<> in the absence of C++11. TODO: change |
| 39 // to static_assert<> with C++11. | 40 // to static_assert<> with C++11. |
| 40 template <bool> struct staticAssert; | 41 template <bool> struct staticAssert; |
| 41 template <> struct staticAssert<true> {}; // only true is defined | 42 template <> struct staticAssert<true> {}; // only true is defined |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 57 class Variable; | 58 class Variable; |
| 58 | 59 |
| 59 // TODO: Switch over to LLVM's ADT container classes. | 60 // TODO: Switch over to LLVM's ADT container classes. |
| 60 // http://llvm.org/docs/ProgrammersManual.html#picking-the-right-data-structure- for-a-task | 61 // http://llvm.org/docs/ProgrammersManual.html#picking-the-right-data-structure- for-a-task |
| 61 typedef std::string IceString; | 62 typedef std::string IceString; |
| 62 typedef std::list<Inst *> InstList; | 63 typedef std::list<Inst *> InstList; |
| 63 typedef std::list<InstPhi *> PhiList; | 64 typedef std::list<InstPhi *> PhiList; |
| 64 typedef std::vector<Variable *> VarList; | 65 typedef std::vector<Variable *> VarList; |
| 65 typedef std::vector<CfgNode *> NodeList; | 66 typedef std::vector<CfgNode *> NodeList; |
| 66 typedef std::vector<Constant *> ConstantList; | 67 typedef std::vector<Constant *> ConstantList; |
| 68 typedef std::vector<IceString> StringList; | |
|
jvoung (off chromium)
2014/06/27 22:33:24
I don't think you need StringList anymore then?
| |
| 69 | |
| 70 const unsigned VECT128_BYTES = 16; | |
| 71 // TODO(stichnot): Switch Vect128 to std::array after C++11 | |
| 72 typedef llvm::SmallVector<char, VECT128_BYTES> Vect128; | |
| 73 typedef llvm::SmallVector<bool, VECT128_BYTES> BitVect; | |
| 67 | 74 |
| 68 // SizeT is for holding small-ish limits like number of source | 75 // SizeT is for holding small-ish limits like number of source |
| 69 // operands in an instruction. It is used instead of size_t (which | 76 // operands in an instruction. It is used instead of size_t (which |
| 70 // may be 64-bits wide) when we want to save space. | 77 // may be 64-bits wide) when we want to save space. |
| 71 typedef uint32_t SizeT; | 78 typedef uint32_t SizeT; |
| 72 | 79 |
| 73 // InstNumberT is for holding an instruction number. Instruction | 80 // InstNumberT is for holding an instruction number. Instruction |
| 74 // numbers are used for representing Variable live ranges. | 81 // numbers are used for representing Variable live ranges. |
| 75 typedef int32_t InstNumberT; | 82 typedef int32_t InstNumberT; |
| 76 | 83 |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 140 | 147 |
| 141 private: | 148 private: |
| 142 const llvm::TimeRecord Start; | 149 const llvm::TimeRecord Start; |
| 143 Timer(const Timer &) LLVM_DELETED_FUNCTION; | 150 Timer(const Timer &) LLVM_DELETED_FUNCTION; |
| 144 Timer &operator=(const Timer &) LLVM_DELETED_FUNCTION; | 151 Timer &operator=(const Timer &) LLVM_DELETED_FUNCTION; |
| 145 }; | 152 }; |
| 146 | 153 |
| 147 } // end of namespace Ice | 154 } // end of namespace Ice |
| 148 | 155 |
| 149 #endif // SUBZERO_SRC_ICEDEFS_H | 156 #endif // SUBZERO_SRC_ICEDEFS_H |
| OLD | NEW |