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

Side by Side Diff: src/IceGlobalContext.h

Issue 339783002: Add support for undef values in ICE IR. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Comment about uninitialized registers Created 6 years, 6 months 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 | « no previous file | 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 // Manage Constants. 71 // Manage Constants.
72 // getConstant*() functions are not const because they might add 72 // getConstant*() functions are not const because they might add
73 // something to the constant pool. 73 // something to the constant pool.
74 Constant *getConstantInt(Type Ty, uint64_t ConstantInt64); 74 Constant *getConstantInt(Type Ty, uint64_t ConstantInt64);
75 Constant *getConstantFloat(float Value); 75 Constant *getConstantFloat(float Value);
76 Constant *getConstantDouble(double Value); 76 Constant *getConstantDouble(double Value);
77 // Returns a symbolic constant. 77 // Returns a symbolic constant.
78 Constant *getConstantSym(Type Ty, int64_t Offset, const IceString &Name = "", 78 Constant *getConstantSym(Type Ty, int64_t Offset, const IceString &Name = "",
79 bool SuppressMangling = false); 79 bool SuppressMangling = false);
80 // Returns an undef.
81 Constant *getConstantUndef(Type Ty);
82 // Returns a zero value.
83 Constant *getConstantZero(Type Ty);
80 // getConstantPool() returns a copy of the constant pool for 84 // getConstantPool() returns a copy of the constant pool for
81 // constants of a given type. 85 // constants of a given type.
82 ConstantList getConstantPool(Type Ty) const; 86 ConstantList getConstantPool(Type Ty) const;
83 87
84 // Allocate data of type T using the global allocator. 88 // Allocate data of type T using the global allocator.
85 template <typename T> T *allocate() { return Allocator.Allocate<T>(); } 89 template <typename T> T *allocate() { return Allocator.Allocate<T>(); }
86 90
87 private: 91 private:
88 Ostream StrDump; // Stream for dumping / diagnostics 92 Ostream StrDump; // Stream for dumping / diagnostics
89 Ostream StrEmit; // Stream for code emission 93 Ostream StrEmit; // Stream for code emission
90 94
91 llvm::BumpPtrAllocator Allocator; 95 llvm::BumpPtrAllocator Allocator;
92 VerboseMask VMask; 96 VerboseMask VMask;
93 llvm::OwningPtr<class ConstantPool> ConstPool; 97 llvm::OwningPtr<class ConstantPool> ConstPool;
94 const TargetArch Arch; 98 const TargetArch Arch;
95 const OptLevel Opt; 99 const OptLevel Opt;
96 const IceString TestPrefix; 100 const IceString TestPrefix;
97 bool HasEmittedFirstMethod; 101 bool HasEmittedFirstMethod;
98 GlobalContext(const GlobalContext &) LLVM_DELETED_FUNCTION; 102 GlobalContext(const GlobalContext &) LLVM_DELETED_FUNCTION;
99 GlobalContext &operator=(const GlobalContext &) LLVM_DELETED_FUNCTION; 103 GlobalContext &operator=(const GlobalContext &) LLVM_DELETED_FUNCTION;
100 }; 104 };
101 105
102 } // end of namespace Ice 106 } // end of namespace Ice
103 107
104 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H 108 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H
OLDNEW
« no previous file with comments | « no previous file | src/IceGlobalContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698