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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 typedef uint32_t TimerStackIdT; | 123 typedef uint32_t TimerStackIdT; |
124 typedef uint32_t TimerIdT; | 124 typedef uint32_t TimerIdT; |
125 | 125 |
126 // Use alignas(MaxCacheLineSize) to isolate variables/fields that | 126 // Use alignas(MaxCacheLineSize) to isolate variables/fields that |
127 // might be contended while multithreading. Assumes the maximum cache | 127 // might be contended while multithreading. Assumes the maximum cache |
128 // line size is 64. | 128 // line size is 64. |
129 enum { MaxCacheLineSize = 64 }; | 129 enum { MaxCacheLineSize = 64 }; |
130 // Use ICE_CACHELINE_BOUNDARY to force the next field in a declaration | 130 // Use ICE_CACHELINE_BOUNDARY to force the next field in a declaration |
131 // list to be aligned to the next cache line. | 131 // list to be aligned to the next cache line. |
132 #define ICE_CACHELINE_BOUNDARY \ | 132 #define ICE_CACHELINE_BOUNDARY \ |
133 alignas(MaxCacheLineSize) struct {} | 133 __attribute__((aligned(MaxCacheLineSize))) int : 0 |
134 | 134 |
135 // PNaCl is ILP32, so theoretically we should only need 32-bit offsets. | 135 // PNaCl is ILP32, so theoretically we should only need 32-bit offsets. |
136 typedef int32_t RelocOffsetT; | 136 typedef int32_t RelocOffsetT; |
137 enum { RelocAddrSize = 4 }; | 137 enum { RelocAddrSize = 4 }; |
138 | 138 |
139 enum LivenessMode { | 139 enum LivenessMode { |
140 // Basic version of live-range-end calculation. Marks the last uses | 140 // Basic version of live-range-end calculation. Marks the last uses |
141 // of variables based on dataflow analysis. Records the set of | 141 // of variables based on dataflow analysis. Records the set of |
142 // live-in and live-out variables for each block. Identifies and | 142 // live-in and live-out variables for each block. Identifies and |
143 // deletes dead instructions (primarily stores). | 143 // deletes dead instructions (primarily stores). |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 return llvm::make_range(Container.rbegin(), Container.rend()); | 208 return llvm::make_range(Container.rbegin(), Container.rend()); |
209 } | 209 } |
210 template <typename T> | 210 template <typename T> |
211 llvm::iterator_range<typename T::reverse_iterator> reverse_range(T &Container) { | 211 llvm::iterator_range<typename T::reverse_iterator> reverse_range(T &Container) { |
212 return llvm::make_range(Container.rbegin(), Container.rend()); | 212 return llvm::make_range(Container.rbegin(), Container.rend()); |
213 } | 213 } |
214 | 214 |
215 } // end of namespace Ice | 215 } // end of namespace Ice |
216 | 216 |
217 #endif // SUBZERO_SRC_ICEDEFS_H | 217 #endif // SUBZERO_SRC_ICEDEFS_H |
OLD | NEW |