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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 Icmp, | 55 Icmp, |
56 IntrinsicCall, | 56 IntrinsicCall, |
57 InsertElement, | 57 InsertElement, |
58 Load, | 58 Load, |
59 Phi, | 59 Phi, |
60 Ret, | 60 Ret, |
61 Select, | 61 Select, |
62 Store, | 62 Store, |
63 Switch, | 63 Switch, |
64 Assign, // not part of LLVM/PNaCl bitcode | 64 Assign, // not part of LLVM/PNaCl bitcode |
| 65 Breakpoint, // not part of LLVM/PNaCl bitcode |
65 BundleLock, // not part of LLVM/PNaCl bitcode | 66 BundleLock, // not part of LLVM/PNaCl bitcode |
66 BundleUnlock, // not part of LLVM/PNaCl bitcode | 67 BundleUnlock, // not part of LLVM/PNaCl bitcode |
67 FakeDef, // not part of LLVM/PNaCl bitcode | 68 FakeDef, // not part of LLVM/PNaCl bitcode |
68 FakeUse, // not part of LLVM/PNaCl bitcode | 69 FakeUse, // not part of LLVM/PNaCl bitcode |
69 FakeKill, // not part of LLVM/PNaCl bitcode | 70 FakeKill, // not part of LLVM/PNaCl bitcode |
70 JumpTable, // not part of LLVM/PNaCl bitcode | 71 JumpTable, // not part of LLVM/PNaCl bitcode |
71 // Anything >= Target is an InstTarget subclass. Note that the value-spaces | 72 // Anything >= Target is an InstTarget subclass. Note that the value-spaces |
72 // are shared across targets. To avoid confusion over the definition of | 73 // are shared across targets. To avoid confusion over the definition of |
73 // shared values, an object specific to one target should never be passed | 74 // shared values, an object specific to one target should never be passed |
74 // to a different target. | 75 // to a different target. |
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
969 Inst::destroy(Func); | 970 Inst::destroy(Func); |
970 } | 971 } |
971 | 972 |
972 const SizeT Id; | 973 const SizeT Id; |
973 const SizeT NumTargets; | 974 const SizeT NumTargets; |
974 CfgNode **Targets; | 975 CfgNode **Targets; |
975 GlobalString Name; // This JumpTable's name in the output. | 976 GlobalString Name; // This JumpTable's name in the output. |
976 GlobalString FuncName; | 977 GlobalString FuncName; |
977 }; | 978 }; |
978 | 979 |
| 980 /// This instruction inserts an unconditional breakpoint. |
| 981 /// |
| 982 /// On x86, this assembles into an INT 3 instruction. |
| 983 /// |
| 984 /// This instruction is primarily meant for debugging the code generator. |
| 985 class InstBreakpoint : public InstHighLevel { |
| 986 public: |
| 987 InstBreakpoint() = delete; |
| 988 InstBreakpoint(const InstBreakpoint &) = delete; |
| 989 InstBreakpoint &operator=(const InstBreakpoint &) = delete; |
| 990 |
| 991 InstBreakpoint(Cfg *Func); |
| 992 |
| 993 public: |
| 994 static InstBreakpoint *create(Cfg *Func) { |
| 995 return new (Func->allocate<InstBreakpoint>()) InstBreakpoint(Func); |
| 996 } |
| 997 |
| 998 static bool classof(const Inst *Instr) { |
| 999 return Instr->getKind() == Breakpoint; |
| 1000 } |
| 1001 }; |
| 1002 |
979 /// The Target instruction is the base class for all target-specific | 1003 /// The Target instruction is the base class for all target-specific |
980 /// instructions. | 1004 /// instructions. |
981 class InstTarget : public Inst { | 1005 class InstTarget : public Inst { |
982 InstTarget() = delete; | 1006 InstTarget() = delete; |
983 InstTarget(const InstTarget &) = delete; | 1007 InstTarget(const InstTarget &) = delete; |
984 InstTarget &operator=(const InstTarget &) = delete; | 1008 InstTarget &operator=(const InstTarget &) = delete; |
985 | 1009 |
986 public: | 1010 public: |
987 uint32_t getEmitInstCount() const override { return 1; } | 1011 uint32_t getEmitInstCount() const override { return 1; } |
988 void dump(const Cfg *Func) const override; | 1012 void dump(const Cfg *Func) const override; |
(...skipping 26 matching lines...) Expand all Loading... |
1015 static void noteHead(Ice::Inst *, Ice::Inst *) {} | 1039 static void noteHead(Ice::Inst *, Ice::Inst *) {} |
1016 void deleteNode(Ice::Inst *) {} | 1040 void deleteNode(Ice::Inst *) {} |
1017 | 1041 |
1018 private: | 1042 private: |
1019 mutable ilist_half_node<Ice::Inst> Sentinel; | 1043 mutable ilist_half_node<Ice::Inst> Sentinel; |
1020 }; | 1044 }; |
1021 | 1045 |
1022 } // end of namespace llvm | 1046 } // end of namespace llvm |
1023 | 1047 |
1024 #endif // SUBZERO_SRC_ICEINST_H | 1048 #endif // SUBZERO_SRC_ICEINST_H |
OLD | NEW |