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

Side by Side Diff: src/IceOperand.h

Issue 607443003: Subzero: Enable the C++11 build. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Change LLVM_OVERRIDE to override. Remove assembler padding. Created 6 years, 2 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 | « Makefile.standalone ('k') | src/IceTypeConverter.h » ('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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // object's destructor should delete this object. Generally, 70 // object's destructor should delete this object. Generally,
71 // constants are pooled globally, variables are pooled per-CFG, and 71 // constants are pooled globally, variables are pooled per-CFG, and
72 // target-specific operands are not pooled. 72 // target-specific operands are not pooled.
73 virtual bool isPooled() const { return false; } 73 virtual bool isPooled() const { return false; }
74 74
75 virtual ~Operand() {} 75 virtual ~Operand() {}
76 76
77 protected: 77 protected:
78 Operand(OperandKind Kind, Type Ty) 78 Operand(OperandKind Kind, Type Ty)
79 : Ty(Ty), Kind(Kind), NumVars(0), Vars(NULL) {} 79 : Ty(Ty), Kind(Kind), NumVars(0), Vars(NULL) {}
80 Operand(Operand &&O) = default;
80 81
81 const Type Ty; 82 const Type Ty;
82 const OperandKind Kind; 83 const OperandKind Kind;
83 // Vars and NumVars are initialized by the derived class. 84 // Vars and NumVars are initialized by the derived class.
84 SizeT NumVars; 85 SizeT NumVars;
85 Variable **Vars; 86 Variable **Vars;
86 87
87 private: 88 private:
88 Operand(const Operand &) LLVM_DELETED_FUNCTION; 89 Operand(const Operand &) LLVM_DELETED_FUNCTION;
89 Operand &operator=(const Operand &) LLVM_DELETED_FUNCTION; 90 Operand &operator=(const Operand &) LLVM_DELETED_FUNCTION;
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 }; 339 };
339 340
340 Ostream &operator<<(Ostream &Str, const LiveRange &L); 341 Ostream &operator<<(Ostream &Str, const LiveRange &L);
341 342
342 // Variable represents an operand that is register-allocated or 343 // Variable represents an operand that is register-allocated or
343 // stack-allocated. If it is register-allocated, it will ultimately 344 // stack-allocated. If it is register-allocated, it will ultimately
344 // have a non-negative RegNum field. 345 // have a non-negative RegNum field.
345 class Variable : public Operand { 346 class Variable : public Operand {
346 Variable(const Variable &) LLVM_DELETED_FUNCTION; 347 Variable(const Variable &) LLVM_DELETED_FUNCTION;
347 Variable &operator=(const Variable &) LLVM_DELETED_FUNCTION; 348 Variable &operator=(const Variable &) LLVM_DELETED_FUNCTION;
349 Variable(Variable &&V) = default;
348 350
349 public: 351 public:
350 static Variable *create(Cfg *Func, Type Ty, SizeT Index, 352 static Variable *create(Cfg *Func, Type Ty, SizeT Index,
351 const IceString &Name) { 353 const IceString &Name) {
352 return new (Func->allocate<Variable>()) 354 return new (Func->allocate<Variable>())
353 Variable(kVariable, Ty, Index, Name); 355 Variable(kVariable, Ty, Index, Name);
354 } 356 }
355 357
356 SizeT getIndex() const { return Number; } 358 SizeT getIndex() const { return Number; }
357 IceString getName() const; 359 IceString getName() const;
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 const Cfg *Func; 560 const Cfg *Func;
559 std::vector<VariableTracking> Metadata; 561 std::vector<VariableTracking> Metadata;
560 const static InstDefList NoDefinitions; 562 const static InstDefList NoDefinitions;
561 VariablesMetadata(const VariablesMetadata &) LLVM_DELETED_FUNCTION; 563 VariablesMetadata(const VariablesMetadata &) LLVM_DELETED_FUNCTION;
562 VariablesMetadata &operator=(const VariablesMetadata &) LLVM_DELETED_FUNCTION; 564 VariablesMetadata &operator=(const VariablesMetadata &) LLVM_DELETED_FUNCTION;
563 }; 565 };
564 566
565 } // end of namespace Ice 567 } // end of namespace Ice
566 568
567 #endif // SUBZERO_SRC_ICEOPERAND_H 569 #endif // SUBZERO_SRC_ICEOPERAND_H
OLDNEW
« no previous file with comments | « Makefile.standalone ('k') | src/IceTypeConverter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698