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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 Constant *getConstantInt1(int8_t ConstantInt1); | 181 Constant *getConstantInt1(int8_t ConstantInt1); |
182 Constant *getConstantInt8(int8_t ConstantInt8); | 182 Constant *getConstantInt8(int8_t ConstantInt8); |
183 Constant *getConstantInt16(int16_t ConstantInt16); | 183 Constant *getConstantInt16(int16_t ConstantInt16); |
184 Constant *getConstantInt32(int32_t ConstantInt32); | 184 Constant *getConstantInt32(int32_t ConstantInt32); |
185 Constant *getConstantInt64(int64_t ConstantInt64); | 185 Constant *getConstantInt64(int64_t ConstantInt64); |
186 Constant *getConstantFloat(float Value); | 186 Constant *getConstantFloat(float Value); |
187 Constant *getConstantDouble(double Value); | 187 Constant *getConstantDouble(double Value); |
188 // Returns a symbolic constant. | 188 // Returns a symbolic constant. |
189 Constant *getConstantSym(RelocOffsetT Offset, const IceString &Name, | 189 Constant *getConstantSym(RelocOffsetT Offset, const IceString &Name, |
190 bool SuppressMangling); | 190 bool SuppressMangling); |
| 191 Constant *getConstantExternSym(const IceString &Name); |
191 // Returns an undef. | 192 // Returns an undef. |
192 Constant *getConstantUndef(Type Ty); | 193 Constant *getConstantUndef(Type Ty); |
193 // Returns a zero value. | 194 // Returns a zero value. |
194 Constant *getConstantZero(Type Ty); | 195 Constant *getConstantZero(Type Ty); |
195 // getConstantPool() returns a copy of the constant pool for | 196 // getConstantPool() returns a copy of the constant pool for |
196 // constants of a given type. | 197 // constants of a given type. |
197 ConstantList getConstantPool(Type Ty); | 198 ConstantList getConstantPool(Type Ty); |
| 199 // Returns a copy of the list of external symbols. |
| 200 ConstantList getConstantExternSyms(); |
198 | 201 |
199 const ClFlags &getFlags() const { return Flags; } | 202 const ClFlags &getFlags() const { return Flags; } |
200 | 203 |
201 bool isIRGenerationDisabled() const { | 204 bool isIRGenerationDisabled() const { |
202 return ALLOW_DISABLE_IR_GEN ? getFlags().DisableIRGeneration : false; | 205 return ALLOW_DISABLE_IR_GEN ? getFlags().DisableIRGeneration : false; |
203 } | 206 } |
204 | 207 |
205 // Allocate data of type T using the global allocator. | 208 // Allocate data of type T using the global allocator. |
206 template <typename T> T *allocate() { return getAllocator()->Allocate<T>(); } | 209 template <typename T> T *allocate() { return getAllocator()->Allocate<T>(); } |
207 | 210 |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 explicit OstreamLocker(GlobalContext *Ctx) : Ctx(Ctx) { Ctx->lockStr(); } | 467 explicit OstreamLocker(GlobalContext *Ctx) : Ctx(Ctx) { Ctx->lockStr(); } |
465 ~OstreamLocker() { Ctx->unlockStr(); } | 468 ~OstreamLocker() { Ctx->unlockStr(); } |
466 | 469 |
467 private: | 470 private: |
468 GlobalContext *const Ctx; | 471 GlobalContext *const Ctx; |
469 }; | 472 }; |
470 | 473 |
471 } // end of namespace Ice | 474 } // end of namespace Ice |
472 | 475 |
473 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H | 476 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H |
OLD | NEW |