| 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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 Operand *getCallTarget() const { return getSrc(0); } | 387 Operand *getCallTarget() const { return getSrc(0); } |
| 388 Operand *getArg(SizeT I) const { return getSrc(I + 1); } | 388 Operand *getArg(SizeT I) const { return getSrc(I + 1); } |
| 389 SizeT getNumArgs() const { return getSrcSize() - 1; } | 389 SizeT getNumArgs() const { return getSrcSize() - 1; } |
| 390 bool isTailcall() const { return HasTailCall; } | 390 bool isTailcall() const { return HasTailCall; } |
| 391 void dump(const Cfg *Func) const override; | 391 void dump(const Cfg *Func) const override; |
| 392 static bool classof(const Inst *Inst) { return Inst->getKind() == Call; } | 392 static bool classof(const Inst *Inst) { return Inst->getKind() == Call; } |
| 393 Type getReturnType() const; | 393 Type getReturnType() const; |
| 394 | 394 |
| 395 protected: | 395 protected: |
| 396 InstCall(Cfg *Func, SizeT NumArgs, Variable *Dest, Operand *CallTarget, | 396 InstCall(Cfg *Func, SizeT NumArgs, Variable *Dest, Operand *CallTarget, |
| 397 bool HasTailCall, bool HasSideEff, InstKind Kind) | 397 bool MyHasTailCall, bool HasSideEff, InstKind Kind) |
| 398 : InstHighLevel(Func, Kind, NumArgs + 1, Dest), HasTailCall(HasTailCall) { | 398 : InstHighLevel(Func, Kind, NumArgs + 1, Dest), |
| 399 HasTailCall(MyHasTailCall) { |
| 399 HasSideEffects = HasSideEff; | 400 HasSideEffects = HasSideEff; |
| 400 addSource(CallTarget); | 401 addSource(CallTarget); |
| 401 } | 402 } |
| 402 | 403 |
| 403 private: | 404 private: |
| 404 bool HasTailCall; | 405 bool HasTailCall; |
| 405 }; | 406 }; |
| 406 | 407 |
| 407 // Cast instruction (a.k.a. conversion operation). | 408 // Cast instruction (a.k.a. conversion operation). |
| 408 class InstCast : public InstHighLevel { | 409 class InstCast : public InstHighLevel { |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 InstIntrinsicCall(Func, NumArgs, Dest, CallTarget, Info); | 559 InstIntrinsicCall(Func, NumArgs, Dest, CallTarget, Info); |
| 559 } | 560 } |
| 560 static bool classof(const Inst *Inst) { | 561 static bool classof(const Inst *Inst) { |
| 561 return Inst->getKind() == IntrinsicCall; | 562 return Inst->getKind() == IntrinsicCall; |
| 562 } | 563 } |
| 563 | 564 |
| 564 Intrinsics::IntrinsicInfo getIntrinsicInfo() const { return Info; } | 565 Intrinsics::IntrinsicInfo getIntrinsicInfo() const { return Info; } |
| 565 | 566 |
| 566 private: | 567 private: |
| 567 InstIntrinsicCall(Cfg *Func, SizeT NumArgs, Variable *Dest, | 568 InstIntrinsicCall(Cfg *Func, SizeT NumArgs, Variable *Dest, |
| 568 Operand *CallTarget, const Intrinsics::IntrinsicInfo &Info) | 569 Operand *CallTarget, |
| 569 : InstCall(Func, NumArgs, Dest, CallTarget, false, Info.HasSideEffects, | 570 const Intrinsics::IntrinsicInfo &MyInfo) |
| 571 : InstCall(Func, NumArgs, Dest, CallTarget, false, MyInfo.HasSideEffects, |
| 570 Inst::IntrinsicCall), | 572 Inst::IntrinsicCall), |
| 571 Info(Info) {} | 573 Info(MyInfo) {} |
| 572 | 574 |
| 573 const Intrinsics::IntrinsicInfo Info; | 575 const Intrinsics::IntrinsicInfo Info; |
| 574 }; | 576 }; |
| 575 | 577 |
| 576 // Load instruction. The source address is captured in getSrc(0). | 578 // Load instruction. The source address is captured in getSrc(0). |
| 577 class InstLoad : public InstHighLevel { | 579 class InstLoad : public InstHighLevel { |
| 578 InstLoad() = delete; | 580 InstLoad() = delete; |
| 579 InstLoad(const InstLoad &) = delete; | 581 InstLoad(const InstLoad &) = delete; |
| 580 InstLoad &operator=(const InstLoad &) = delete; | 582 InstLoad &operator=(const InstLoad &) = delete; |
| 581 | 583 |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 static void noteHead(Ice::Inst *, Ice::Inst *) {} | 938 static void noteHead(Ice::Inst *, Ice::Inst *) {} |
| 937 void deleteNode(Ice::Inst *) {} | 939 void deleteNode(Ice::Inst *) {} |
| 938 | 940 |
| 939 private: | 941 private: |
| 940 mutable ilist_half_node<Ice::Inst> Sentinel; | 942 mutable ilist_half_node<Ice::Inst> Sentinel; |
| 941 }; | 943 }; |
| 942 | 944 |
| 943 } // end of namespace llvm | 945 } // end of namespace llvm |
| 944 | 946 |
| 945 #endif // SUBZERO_SRC_ICEINST_H | 947 #endif // SUBZERO_SRC_ICEINST_H |
| OLD | NEW |