| OLD | NEW |
| 1 //===- subzero/src/IceDefs.h - Common Subzero declarations ------*- C++ -*-===// | 1 //===- subzero/src/IceDefs.h - Common Subzero declarations ------*- 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 |
| 11 /// \brief Declares various useful types and classes that have widespread use | 11 /// \brief Declares various useful types and classes that have widespread use |
| 12 /// across Subzero. | 12 /// across Subzero. |
| 13 /// | 13 /// |
| 14 //===----------------------------------------------------------------------===// | 14 //===----------------------------------------------------------------------===// |
| 15 | 15 |
| 16 #ifndef SUBZERO_SRC_ICEDEFS_H | 16 #ifndef SUBZERO_SRC_ICEDEFS_H |
| 17 #define SUBZERO_SRC_ICEDEFS_H | 17 #define SUBZERO_SRC_ICEDEFS_H |
| 18 | 18 |
| 19 #include "IceBuildDefs.h" // TODO(stichnot): move into individual files | 19 #include "IceBuildDefs.h" // TODO(stichnot): move into individual files |
| 20 #include "IceMemory.h" | 20 #include "IceMemory.h" |
| 21 #include "IceTLS.h" | 21 #include "IceTLS.h" |
| 22 | 22 |
| 23 #include "llvm/ADT/ArrayRef.h" | 23 #include "llvm/ADT/ArrayRef.h" |
| 24 #include "llvm/ADT/BitVector.h" | |
| 25 #include "llvm/ADT/ilist.h" | 24 #include "llvm/ADT/ilist.h" |
| 26 #include "llvm/ADT/ilist_node.h" | 25 #include "llvm/ADT/ilist_node.h" |
| 27 #include "llvm/ADT/iterator_range.h" | 26 #include "llvm/ADT/iterator_range.h" |
| 28 #include "llvm/ADT/SmallVector.h" | 27 #include "llvm/ADT/SmallVector.h" |
| 29 #include "llvm/ADT/STLExtras.h" | 28 #include "llvm/ADT/STLExtras.h" |
| 30 #include "llvm/Support/Casting.h" | 29 #include "llvm/Support/Casting.h" |
| 31 #include "llvm/Support/ELF.h" | 30 #include "llvm/Support/ELF.h" |
| 32 #include "llvm/Support/raw_ostream.h" | 31 #include "llvm/Support/raw_ostream.h" |
| 33 | 32 |
| 34 #include <cassert> | 33 #include <cassert> |
| 35 #include <cstdint> | 34 #include <cstdint> |
| 36 #include <cstdio> // snprintf | 35 #include <cstdio> // snprintf |
| 37 #include <functional> // std::less | 36 #include <functional> // std::less |
| 38 #include <limits> | 37 #include <limits> |
| 39 #include <list> | 38 #include <list> |
| 40 #include <map> | 39 #include <map> |
| 41 #include <memory> | 40 #include <memory> |
| 42 #include <mutex> | 41 #include <mutex> |
| 43 #include <string> | 42 #include <string> |
| 44 #include <system_error> | 43 #include <system_error> |
| 45 #include <unordered_map> | 44 #include <unordered_map> |
| 46 #include <unordered_set> | 45 #include <unordered_set> |
| 47 #include <utility> | 46 #include <utility> |
| 48 #include <vector> | 47 #include <vector> |
| 49 | 48 |
| 50 namespace Ice { | 49 namespace Ice { |
| 51 | 50 |
| 52 class Assembler; | 51 class Assembler; |
| 52 class BitVector; |
| 53 class Cfg; | 53 class Cfg; |
| 54 class CfgNode; | 54 class CfgNode; |
| 55 class Constant; | 55 class Constant; |
| 56 class ELFObjectWriter; | 56 class ELFObjectWriter; |
| 57 class ELFStreamer; | 57 class ELFStreamer; |
| 58 class FunctionDeclaration; | 58 class FunctionDeclaration; |
| 59 class GlobalContext; | 59 class GlobalContext; |
| 60 class GlobalDeclaration; | 60 class GlobalDeclaration; |
| 61 class Inst; | 61 class Inst; |
| 62 class InstAssign; | 62 class InstAssign; |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 | 148 |
| 149 /// InstNumberT is for holding an instruction number. Instruction numbers are | 149 /// InstNumberT is for holding an instruction number. Instruction numbers are |
| 150 /// used for representing Variable live ranges. | 150 /// used for representing Variable live ranges. |
| 151 using InstNumberT = int32_t; | 151 using InstNumberT = int32_t; |
| 152 | 152 |
| 153 /// A LiveBeginEndMapEntry maps a Variable::Number value to an Inst::Number | 153 /// A LiveBeginEndMapEntry maps a Variable::Number value to an Inst::Number |
| 154 /// value, giving the instruction number that begins or ends a variable's live | 154 /// value, giving the instruction number that begins or ends a variable's live |
| 155 /// range. | 155 /// range. |
| 156 using LiveBeginEndMapEntry = std::pair<SizeT, InstNumberT>; | 156 using LiveBeginEndMapEntry = std::pair<SizeT, InstNumberT>; |
| 157 using LiveBeginEndMap = CfgVector<LiveBeginEndMapEntry>; | 157 using LiveBeginEndMap = CfgVector<LiveBeginEndMapEntry>; |
| 158 using LivenessBV = llvm::BitVector; | 158 using LivenessBV = BitVector; |
| 159 | 159 |
| 160 using TimerStackIdT = uint32_t; | 160 using TimerStackIdT = uint32_t; |
| 161 using TimerIdT = uint32_t; | 161 using TimerIdT = uint32_t; |
| 162 | 162 |
| 163 /// Use alignas(MaxCacheLineSize) to isolate variables/fields that might be | 163 /// Use alignas(MaxCacheLineSize) to isolate variables/fields that might be |
| 164 /// contended while multithreading. Assumes the maximum cache line size is 64. | 164 /// contended while multithreading. Assumes the maximum cache line size is 64. |
| 165 enum { MaxCacheLineSize = 64 }; | 165 enum { MaxCacheLineSize = 64 }; |
| 166 // Use ICE_CACHELINE_BOUNDARY to force the next field in a declaration | 166 // Use ICE_CACHELINE_BOUNDARY to force the next field in a declaration |
| 167 // list to be aligned to the next cache line. | 167 // list to be aligned to the next cache line. |
| 168 // Note: zero is added to work around the following GCC 4.8 bug (fixed in 4.9): | 168 // Note: zero is added to work around the following GCC 4.8 bug (fixed in 4.9): |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 RPE_PooledConstantReordering, | 277 RPE_PooledConstantReordering, |
| 278 RPE_RegAllocRandomization, | 278 RPE_RegAllocRandomization, |
| 279 RPE_num | 279 RPE_num |
| 280 }; | 280 }; |
| 281 | 281 |
| 282 using RelocOffsetArray = llvm::SmallVector<class RelocOffset *, 4>; | 282 using RelocOffsetArray = llvm::SmallVector<class RelocOffset *, 4>; |
| 283 | 283 |
| 284 } // end of namespace Ice | 284 } // end of namespace Ice |
| 285 | 285 |
| 286 #endif // SUBZERO_SRC_ICEDEFS_H | 286 #endif // SUBZERO_SRC_ICEDEFS_H |
| OLD | NEW |