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