| 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 /// \file | 10 /// \file |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 InstCall() = delete; | 375 InstCall() = delete; |
| 376 InstCall(const InstCall &) = delete; | 376 InstCall(const InstCall &) = delete; |
| 377 InstCall &operator=(const InstCall &) = delete; | 377 InstCall &operator=(const InstCall &) = delete; |
| 378 | 378 |
| 379 public: | 379 public: |
| 380 static InstCall *create(Cfg *Func, SizeT NumArgs, Variable *Dest, | 380 static InstCall *create(Cfg *Func, SizeT NumArgs, Variable *Dest, |
| 381 Operand *CallTarget, bool HasTailCall) { | 381 Operand *CallTarget, bool HasTailCall) { |
| 382 /// Set HasSideEffects to true so that the call instruction can't be | 382 /// Set HasSideEffects to true so that the call instruction can't be |
| 383 /// dead-code eliminated. IntrinsicCalls can override this if the particular | 383 /// dead-code eliminated. IntrinsicCalls can override this if the particular |
| 384 /// intrinsic is deletable and has no side-effects. | 384 /// intrinsic is deletable and has no side-effects. |
| 385 const bool HasSideEffects = true; | 385 constexpr bool HasSideEffects = true; |
| 386 const InstKind Kind = Inst::Call; | 386 constexpr InstKind Kind = Inst::Call; |
| 387 return new (Func->allocate<InstCall>()) InstCall( | 387 return new (Func->allocate<InstCall>()) InstCall( |
| 388 Func, NumArgs, Dest, CallTarget, HasTailCall, HasSideEffects, Kind); | 388 Func, NumArgs, Dest, CallTarget, HasTailCall, HasSideEffects, Kind); |
| 389 } | 389 } |
| 390 void addArg(Operand *Arg) { addSource(Arg); } | 390 void addArg(Operand *Arg) { addSource(Arg); } |
| 391 Operand *getCallTarget() const { return getSrc(0); } | 391 Operand *getCallTarget() const { return getSrc(0); } |
| 392 Operand *getArg(SizeT I) const { return getSrc(I + 1); } | 392 Operand *getArg(SizeT I) const { return getSrc(I + 1); } |
| 393 SizeT getNumArgs() const { return getSrcSize() - 1; } | 393 SizeT getNumArgs() const { return getSrcSize() - 1; } |
| 394 bool isTailcall() const { return HasTailCall; } | 394 bool isTailcall() const { return HasTailCall; } |
| 395 void dump(const Cfg *Func) const override; | 395 void dump(const Cfg *Func) const override; |
| 396 static bool classof(const Inst *Inst) { return Inst->getKind() == Call; } | 396 static bool classof(const Inst *Inst) { return Inst->getKind() == Call; } |
| (...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 979 static void noteHead(Ice::Inst *, Ice::Inst *) {} | 979 static void noteHead(Ice::Inst *, Ice::Inst *) {} |
| 980 void deleteNode(Ice::Inst *) {} | 980 void deleteNode(Ice::Inst *) {} |
| 981 | 981 |
| 982 private: | 982 private: |
| 983 mutable ilist_half_node<Ice::Inst> Sentinel; | 983 mutable ilist_half_node<Ice::Inst> Sentinel; |
| 984 }; | 984 }; |
| 985 | 985 |
| 986 } // end of namespace llvm | 986 } // end of namespace llvm |
| 987 | 987 |
| 988 #endif // SUBZERO_SRC_ICEINST_H | 988 #endif // SUBZERO_SRC_ICEINST_H |
| OLD | NEW |