OLD | NEW |
1 //===- subzero/src/IceGlobalContext.h - Global context defs -----*- C++ -*-===// | 1 //===- subzero/src/IceGlobalContext.h - Global context 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 // This file declares aspects of the compilation that persist across | 10 // This file declares aspects of the compilation that persist across |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 unsigned CallingConv, | 133 unsigned CallingConv, |
134 unsigned Linkage, bool IsProto); | 134 unsigned Linkage, bool IsProto); |
135 | 135 |
136 // Returns a new global variable declaration, allocated in an | 136 // Returns a new global variable declaration, allocated in an |
137 // internal memory pool. Ownership of the function is maintained by | 137 // internal memory pool. Ownership of the function is maintained by |
138 // this class instance. | 138 // this class instance. |
139 VariableDeclaration *newVariableDeclaration(); | 139 VariableDeclaration *newVariableDeclaration(); |
140 | 140 |
141 const ClFlags &getFlags() const { return Flags; } | 141 const ClFlags &getFlags() const { return Flags; } |
142 | 142 |
| 143 bool isIRGenerationDisabled() const { |
| 144 return ALLOW_DISABLE_IR_GEN ? getFlags().DisableIRGeneration : false; |
| 145 } |
| 146 |
143 // Allocate data of type T using the global allocator. | 147 // Allocate data of type T using the global allocator. |
144 template <typename T> T *allocate() { return Allocator.Allocate<T>(); } | 148 template <typename T> T *allocate() { return Allocator.Allocate<T>(); } |
145 | 149 |
146 const Intrinsics &getIntrinsicsInfo() const { return IntrinsicsInfo; } | 150 const Intrinsics &getIntrinsicsInfo() const { return IntrinsicsInfo; } |
147 | 151 |
148 // TODO(wala,stichnot): Make the RNG play nicely with multithreaded | 152 // TODO(wala,stichnot): Make the RNG play nicely with multithreaded |
149 // translation. | 153 // translation. |
150 RandomNumberGenerator &getRNG() { return RNG; } | 154 RandomNumberGenerator &getRNG() { return RNG; } |
151 | 155 |
152 // Reset stats at the beginning of a function. | 156 // Reset stats at the beginning of a function. |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 | 239 |
236 private: | 240 private: |
237 TimerIdT ID; | 241 TimerIdT ID; |
238 GlobalContext *const Ctx; | 242 GlobalContext *const Ctx; |
239 const bool Active; | 243 const bool Active; |
240 }; | 244 }; |
241 | 245 |
242 } // end of namespace Ice | 246 } // end of namespace Ice |
243 | 247 |
244 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H | 248 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H |
OLD | NEW |