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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
78 Constant *getConstantInt(Type Ty, uint64_t ConstantInt64); | 78 Constant *getConstantInt(Type Ty, uint64_t ConstantInt64); |
79 Constant *getConstantFloat(float Value); | 79 Constant *getConstantFloat(float Value); |
80 Constant *getConstantDouble(double Value); | 80 Constant *getConstantDouble(double Value); |
81 // Returns a symbolic constant. | 81 // Returns a symbolic constant. |
82 Constant *getConstantSym(Type Ty, int64_t Offset, const IceString &Name = "", | 82 Constant *getConstantSym(Type Ty, int64_t Offset, const IceString &Name = "", |
83 bool SuppressMangling = false); | 83 bool SuppressMangling = false); |
84 // Returns an undef. | 84 // Returns an undef. |
85 Constant *getConstantUndef(Type Ty); | 85 Constant *getConstantUndef(Type Ty); |
86 // Returns a zero value. | 86 // Returns a zero value. |
87 Constant *getConstantZero(Type Ty); | 87 Constant *getConstantZero(Type Ty); |
88 | |
89 // Adds the given constant to the list of pooled immediates. | |
90 void addConstantPooledImmediate(IceString Name, Constant *Immediate); | |
Jim Stichnoth
2014/08/13 23:30:25
Use const IceString & here and all the way up.
Al
wala
2014/08/16 00:07:12
const IceString &: Done.
const Constant *: Doesn'
| |
91 | |
88 // getConstantPool() returns a copy of the constant pool for | 92 // getConstantPool() returns a copy of the constant pool for |
89 // constants of a given type. | 93 // constants of a given type. |
90 ConstantList getConstantPool(Type Ty) const; | 94 ConstantList getConstantPool(Type Ty) const; |
91 | 95 |
96 // getImmediatePool() returns the list of pooled immediates. | |
97 ConstantList getImmediatePool() const; | |
98 | |
92 const ClFlags &getFlags() const { return Flags; } | 99 const ClFlags &getFlags() const { return Flags; } |
93 | 100 |
94 // Allocate data of type T using the global allocator. | 101 // Allocate data of type T using the global allocator. |
95 template <typename T> T *allocate() { return Allocator.Allocate<T>(); } | 102 template <typename T> T *allocate() { return Allocator.Allocate<T>(); } |
96 | 103 |
97 const Intrinsics &getIntrinsicsInfo() const { return IntrinsicsInfo; } | 104 const Intrinsics &getIntrinsicsInfo() const { return IntrinsicsInfo; } |
98 | 105 |
99 // TODO(wala,stichnot): Make the RNG play nicely with multithreaded | 106 // TODO(wala,stichnot): Make the RNG play nicely with multithreaded |
100 // translation. | 107 // translation. |
101 RandomNumberGenerator &getRNG() { return RNG; } | 108 RandomNumberGenerator &getRNG() { return RNG; } |
(...skipping 16 matching lines...) Expand all Loading... | |
118 GlobalContext &operator=(const GlobalContext &) LLVM_DELETED_FUNCTION; | 125 GlobalContext &operator=(const GlobalContext &) LLVM_DELETED_FUNCTION; |
119 | 126 |
120 // Private helpers for mangleName() | 127 // Private helpers for mangleName() |
121 typedef llvm::SmallVector<char, 32> ManglerVector; | 128 typedef llvm::SmallVector<char, 32> ManglerVector; |
122 void incrementSubstitutions(ManglerVector &OldName) const; | 129 void incrementSubstitutions(ManglerVector &OldName) const; |
123 }; | 130 }; |
124 | 131 |
125 } // end of namespace Ice | 132 } // end of namespace Ice |
126 | 133 |
127 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H | 134 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H |
OLD | NEW |