| OLD | NEW |
| 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 // This file declares the Inst class and its target-independent | 10 // This file declares the Inst class and its target-independent |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 const bool HasSideEffects = true; | 364 const bool HasSideEffects = true; |
| 365 const InstKind Kind = Inst::Call; | 365 const InstKind Kind = Inst::Call; |
| 366 return new (Func->allocate<InstCall>()) InstCall( | 366 return new (Func->allocate<InstCall>()) InstCall( |
| 367 Func, NumArgs, Dest, CallTarget, HasTailCall, HasSideEffects, Kind); | 367 Func, NumArgs, Dest, CallTarget, HasTailCall, HasSideEffects, Kind); |
| 368 } | 368 } |
| 369 void addArg(Operand *Arg) { addSource(Arg); } | 369 void addArg(Operand *Arg) { addSource(Arg); } |
| 370 Operand *getCallTarget() const { return getSrc(0); } | 370 Operand *getCallTarget() const { return getSrc(0); } |
| 371 Operand *getArg(SizeT I) const { return getSrc(I + 1); } | 371 Operand *getArg(SizeT I) const { return getSrc(I + 1); } |
| 372 SizeT getNumArgs() const { return getSrcSize() - 1; } | 372 SizeT getNumArgs() const { return getSrcSize() - 1; } |
| 373 bool isTailcall() const { return HasTailCall; } | 373 bool isTailcall() const { return HasTailCall; } |
| 374 void dump(const Cfg *Func) const; | 374 void dump(const Cfg *Func) const override; |
| 375 static bool classof(const Inst *Inst) { return Inst->getKind() == Call; } | 375 static bool classof(const Inst *Inst) { return Inst->getKind() == Call; } |
| 376 Type getReturnType() const; | 376 Type getReturnType() const; |
| 377 | 377 |
| 378 protected: | 378 protected: |
| 379 InstCall(Cfg *Func, SizeT NumArgs, Variable *Dest, Operand *CallTarget, | 379 InstCall(Cfg *Func, SizeT NumArgs, Variable *Dest, Operand *CallTarget, |
| 380 bool HasTailCall, bool HasSideEff, InstKind Kind) | 380 bool HasTailCall, bool HasSideEff, InstKind Kind) |
| 381 : InstHighLevel(Func, Kind, NumArgs + 1, Dest), HasTailCall(HasTailCall) { | 381 : InstHighLevel(Func, Kind, NumArgs + 1, Dest), HasTailCall(HasTailCall) { |
| 382 HasSideEffects = HasSideEff; | 382 HasSideEffects = HasSideEff; |
| 383 addSource(CallTarget); | 383 addSource(CallTarget); |
| 384 } | 384 } |
| (...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 865 static void noteHead(Ice::Inst *, Ice::Inst *) {} | 865 static void noteHead(Ice::Inst *, Ice::Inst *) {} |
| 866 void deleteNode(Ice::Inst *) {} | 866 void deleteNode(Ice::Inst *) {} |
| 867 | 867 |
| 868 private: | 868 private: |
| 869 mutable ilist_half_node<Ice::Inst> Sentinel; | 869 mutable ilist_half_node<Ice::Inst> Sentinel; |
| 870 }; | 870 }; |
| 871 | 871 |
| 872 } // end of namespace llvm | 872 } // end of namespace llvm |
| 873 | 873 |
| 874 #endif // SUBZERO_SRC_ICEINST_H | 874 #endif // SUBZERO_SRC_ICEINST_H |
| OLD | NEW |