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

Side by Side Diff: src/IceInst.h

Issue 1639063002: UnimplementedLoweringError's message now includes the instruction name. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Remove unnecessary include Created 4 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 | « no previous file | src/IceInst.cpp » ('j') | src/IceInst.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceInst.h - High-level instructions ----------*- C++ -*-===// 1 //===- subzero/src/IceInst.h - High-level instructions ----------*- 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 /// \file 10 /// \file
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 JumpTable, // not part of LLVM/PNaCl bitcode 69 JumpTable, // not part of LLVM/PNaCl bitcode
70 // Anything >= Target is an InstTarget subclass. Note that the value-spaces 70 // Anything >= Target is an InstTarget subclass. Note that the value-spaces
71 // are shared across targets. To avoid confusion over the definition of 71 // are shared across targets. To avoid confusion over the definition of
72 // shared values, an object specific to one target should never be passed 72 // shared values, an object specific to one target should never be passed
73 // to a different target. 73 // to a different target.
74 Target, 74 Target,
75 Target_Max = std::numeric_limits<uint8_t>::max(), 75 Target_Max = std::numeric_limits<uint8_t>::max(),
76 }; 76 };
77 static_assert(Target <= Target_Max, "Must not be above max."); 77 static_assert(Target <= Target_Max, "Must not be above max.");
78 InstKind getKind() const { return Kind; } 78 InstKind getKind() const { return Kind; }
79 virtual IceString getInstName() const;
79 80
80 InstNumberT getNumber() const { return Number; } 81 InstNumberT getNumber() const { return Number; }
81 void renumber(Cfg *Func); 82 void renumber(Cfg *Func);
82 enum { 83 enum {
83 NumberDeleted = -1, 84 NumberDeleted = -1,
84 NumberSentinel = 0, 85 NumberSentinel = 0,
85 NumberInitial = 2, 86 NumberInitial = 2,
86 NumberExtended = NumberInitial - 1 87 NumberExtended = NumberInitial - 1
87 }; 88 };
88 89
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 #undef X 282 #undef X
282 _num 283 _num
283 }; 284 };
284 285
285 static InstArithmetic *create(Cfg *Func, OpKind Op, Variable *Dest, 286 static InstArithmetic *create(Cfg *Func, OpKind Op, Variable *Dest,
286 Operand *Source1, Operand *Source2) { 287 Operand *Source1, Operand *Source2) {
287 return new (Func->allocate<InstArithmetic>()) 288 return new (Func->allocate<InstArithmetic>())
288 InstArithmetic(Func, Op, Dest, Source1, Source2); 289 InstArithmetic(Func, Op, Dest, Source1, Source2);
289 } 290 }
290 OpKind getOp() const { return Op; } 291 OpKind getOp() const { return Op; }
292
293 virtual IceString getInstName() const override;
294
291 static const char *getOpName(OpKind Op); 295 static const char *getOpName(OpKind Op);
292 bool isCommutative() const; 296 bool isCommutative() const;
293 void dump(const Cfg *Func) const override; 297 void dump(const Cfg *Func) const override;
294 static bool classof(const Inst *Inst) { 298 static bool classof(const Inst *Inst) {
295 return Inst->getKind() == Arithmetic; 299 return Inst->getKind() == Arithmetic;
296 } 300 }
297 301
298 private: 302 private:
299 InstArithmetic(Cfg *Func, OpKind Op, Variable *Dest, Operand *Source1, 303 InstArithmetic(Cfg *Func, OpKind Op, Variable *Dest, Operand *Source1,
300 Operand *Source2); 304 Operand *Source2);
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 static void noteHead(Ice::Inst *, Ice::Inst *) {} 993 static void noteHead(Ice::Inst *, Ice::Inst *) {}
990 void deleteNode(Ice::Inst *) {} 994 void deleteNode(Ice::Inst *) {}
991 995
992 private: 996 private:
993 mutable ilist_half_node<Ice::Inst> Sentinel; 997 mutable ilist_half_node<Ice::Inst> Sentinel;
994 }; 998 };
995 999
996 } // end of namespace llvm 1000 } // end of namespace llvm
997 1001
998 #endif // SUBZERO_SRC_ICEINST_H 1002 #endif // SUBZERO_SRC_ICEINST_H
OLDNEW
« no previous file with comments | « no previous file | src/IceInst.cpp » ('j') | src/IceInst.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698