Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(362)

Side by Side Diff: src/IceGlobalContext.h

Issue 737513008: Subzero: Simplify the constant pools. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Better fix for the int8/uint8 tests Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/IceConverter.cpp ('k') | src/IceGlobalContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 // rather than once per function. 106 // rather than once per function.
107 bool testAndSetHasEmittedFirstMethod() { 107 bool testAndSetHasEmittedFirstMethod() {
108 bool HasEmitted = HasEmittedFirstMethod; 108 bool HasEmitted = HasEmittedFirstMethod;
109 HasEmittedFirstMethod = true; 109 HasEmittedFirstMethod = true;
110 return HasEmitted; 110 return HasEmitted;
111 } 111 }
112 112
113 // Manage Constants. 113 // Manage Constants.
114 // getConstant*() functions are not const because they might add 114 // getConstant*() functions are not const because they might add
115 // something to the constant pool. 115 // something to the constant pool.
116 Constant *getConstantInt32(Type Ty, uint32_t ConstantInt32); 116 Constant *getConstantInt(Type Ty, int64_t Value);
117 Constant *getConstantInt64(Type Ty, uint64_t ConstantInt64); 117 Constant *getConstantInt1(int8_t ConstantInt1);
118 Constant *getConstantInt8(int8_t ConstantInt8);
119 Constant *getConstantInt16(int16_t ConstantInt16);
120 Constant *getConstantInt32(int32_t ConstantInt32);
121 Constant *getConstantInt64(int64_t ConstantInt64);
118 Constant *getConstantFloat(float Value); 122 Constant *getConstantFloat(float Value);
119 Constant *getConstantDouble(double Value); 123 Constant *getConstantDouble(double Value);
120 // Returns a symbolic constant. 124 // Returns a symbolic constant.
121 Constant *getConstantSym(Type Ty, RelocOffsetT Offset, 125 Constant *getConstantSym(RelocOffsetT Offset, const IceString &Name,
122 const IceString &Name = "", 126 bool SuppressMangling);
123 bool SuppressMangling = false);
124 // Returns an undef. 127 // Returns an undef.
125 Constant *getConstantUndef(Type Ty); 128 Constant *getConstantUndef(Type Ty);
126 // Returns a zero value. 129 // Returns a zero value.
127 Constant *getConstantZero(Type Ty); 130 Constant *getConstantZero(Type Ty);
128 // getConstantPool() returns a copy of the constant pool for 131 // getConstantPool() returns a copy of the constant pool for
129 // constants of a given type. 132 // constants of a given type.
130 ConstantList getConstantPool(Type Ty) const; 133 ConstantList getConstantPool(Type Ty) const;
131 // Returns a new function declaration, allocated in an internal 134 // Returns a new function declaration, allocated in an internal
132 // memory pool. Ownership of the function is maintained by this 135 // memory pool. Ownership of the function is maintained by this
133 // class instance. 136 // class instance.
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 244
242 private: 245 private:
243 TimerIdT ID; 246 TimerIdT ID;
244 GlobalContext *const Ctx; 247 GlobalContext *const Ctx;
245 const bool Active; 248 const bool Active;
246 }; 249 };
247 250
248 } // end of namespace Ice 251 } // end of namespace Ice
249 252
250 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H 253 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H
OLDNEW
« no previous file with comments | « src/IceConverter.cpp ('k') | src/IceGlobalContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698