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

Side by Side Diff: src/IceOperand.h

Issue 837553009: Make fixups reference any constant (allow const float/double pool literals). (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: go back to one arenaallocator type alias Created 5 years, 11 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 | « src/IceInstX8632.cpp ('k') | src/IceTargetLoweringX8632.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/IceOperand.h - High-level operands -----------*- C++ -*-===// 1 //===- subzero/src/IceOperand.h - High-level operands -----------*- 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 the Operand class and its target-independent 10 // This file declares the Operand class and its target-independent
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 return Str; 94 return Str;
95 } 95 }
96 96
97 // Constant is the abstract base class for constants. All 97 // Constant is the abstract base class for constants. All
98 // constants are allocated from a global arena and are pooled. 98 // constants are allocated from a global arena and are pooled.
99 class Constant : public Operand { 99 class Constant : public Operand {
100 Constant(const Constant &) = delete; 100 Constant(const Constant &) = delete;
101 Constant &operator=(const Constant &) = delete; 101 Constant &operator=(const Constant &) = delete;
102 102
103 public: 103 public:
104 uint32_t getPoolEntryID() const { return PoolEntryID; } 104 void emitPoolLabel(Ostream &Str) const {
105 Str << ".L$" << getType() << "$" << PoolEntryID;
106 }
105 using Operand::dump; 107 using Operand::dump;
106 void emit(const Cfg *Func) const override { emit(Func->getContext()); } 108 void emit(const Cfg *Func) const override { emit(Func->getContext()); }
107 virtual void emit(GlobalContext *Ctx) const = 0; 109 virtual void emit(GlobalContext *Ctx) const = 0;
108 void dump(const Cfg *Func, Ostream &Str) const = 0; 110 void dump(const Cfg *Func, Ostream &Str) const = 0;
109 111
110 static bool classof(const Operand *Operand) { 112 static bool classof(const Operand *Operand) {
111 OperandKind Kind = Operand->getKind(); 113 OperandKind Kind = Operand->getKind();
112 return Kind >= kConst_Base && Kind <= kConst_Num; 114 return Kind >= kConst_Base && Kind <= kConst_Num;
113 } 115 }
114 116
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 private: 625 private:
624 const Cfg *Func; 626 const Cfg *Func;
625 MetadataKind Kind; 627 MetadataKind Kind;
626 std::vector<VariableTracking> Metadata; 628 std::vector<VariableTracking> Metadata;
627 const static InstDefList NoDefinitions; 629 const static InstDefList NoDefinitions;
628 }; 630 };
629 631
630 } // end of namespace Ice 632 } // end of namespace Ice
631 633
632 #endif // SUBZERO_SRC_ICEOPERAND_H 634 #endif // SUBZERO_SRC_ICEOPERAND_H
OLDNEW
« no previous file with comments | « src/IceInstX8632.cpp ('k') | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698