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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // rather than once per function. | 68 // rather than once per function. |
69 bool testAndSetHasEmittedFirstMethod() { | 69 bool testAndSetHasEmittedFirstMethod() { |
70 bool HasEmitted = HasEmittedFirstMethod; | 70 bool HasEmitted = HasEmittedFirstMethod; |
71 HasEmittedFirstMethod = true; | 71 HasEmittedFirstMethod = true; |
72 return HasEmitted; | 72 return HasEmitted; |
73 } | 73 } |
74 | 74 |
75 // Manage Constants. | 75 // Manage Constants. |
76 // getConstant*() functions are not const because they might add | 76 // getConstant*() functions are not const because they might add |
77 // something to the constant pool. | 77 // something to the constant pool. |
78 Constant *getConstantInt(Type Ty, uint64_t ConstantInt64); | 78 Constant *getConstantInt64(Type Ty, uint64_t ConstantInt64); |
| 79 Constant *getConstantInt32(Type Ty, uint32_t ConstantInt32); |
79 Constant *getConstantFloat(float Value); | 80 Constant *getConstantFloat(float Value); |
80 Constant *getConstantDouble(double Value); | 81 Constant *getConstantDouble(double Value); |
81 // Returns a symbolic constant. | 82 // Returns a symbolic constant. |
82 Constant *getConstantSym(Type Ty, int64_t Offset, const IceString &Name = "", | 83 Constant *getConstantSym(Type Ty, int64_t Offset, const IceString &Name = "", |
83 bool SuppressMangling = false); | 84 bool SuppressMangling = false); |
84 // Returns an undef. | 85 // Returns an undef. |
85 Constant *getConstantUndef(Type Ty); | 86 Constant *getConstantUndef(Type Ty); |
86 // Returns a zero value. | 87 // Returns a zero value. |
87 Constant *getConstantZero(Type Ty); | 88 Constant *getConstantZero(Type Ty); |
88 // getConstantPool() returns a copy of the constant pool for | 89 // getConstantPool() returns a copy of the constant pool for |
(...skipping 29 matching lines...) Expand all Loading... |
118 GlobalContext &operator=(const GlobalContext &) LLVM_DELETED_FUNCTION; | 119 GlobalContext &operator=(const GlobalContext &) LLVM_DELETED_FUNCTION; |
119 | 120 |
120 // Private helpers for mangleName() | 121 // Private helpers for mangleName() |
121 typedef llvm::SmallVector<char, 32> ManglerVector; | 122 typedef llvm::SmallVector<char, 32> ManglerVector; |
122 void incrementSubstitutions(ManglerVector &OldName) const; | 123 void incrementSubstitutions(ManglerVector &OldName) const; |
123 }; | 124 }; |
124 | 125 |
125 } // end of namespace Ice | 126 } // end of namespace Ice |
126 | 127 |
127 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H | 128 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H |
OLD | NEW |