OLD | NEW |
1 //===- subzero/src/IceInstrumentation.h - ICE instrumentation ---*- C++ -*-===// | 1 //===- subzero/src/IceInstrumentation.h - ICE instrumentation ---*- 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 23 matching lines...) Expand all Loading... |
34 | 34 |
35 class LoweringContext; | 35 class LoweringContext; |
36 | 36 |
37 class Instrumentation { | 37 class Instrumentation { |
38 Instrumentation() = delete; | 38 Instrumentation() = delete; |
39 Instrumentation(const Instrumentation &) = delete; | 39 Instrumentation(const Instrumentation &) = delete; |
40 Instrumentation &operator=(const Instrumentation &) = delete; | 40 Instrumentation &operator=(const Instrumentation &) = delete; |
41 | 41 |
42 public: | 42 public: |
43 Instrumentation(GlobalContext *Ctx) : Ctx(Ctx) {} | 43 Instrumentation(GlobalContext *Ctx) : Ctx(Ctx) {} |
44 virtual void instrumentGlobals() {}; | 44 virtual void instrumentGlobals(VariableDeclarationList &) {} |
45 void instrumentFunc(Cfg *Func); | 45 void instrumentFunc(Cfg *Func); |
46 | 46 |
47 private: | 47 private: |
48 void instrumentInst(LoweringContext &Context); | 48 void instrumentInst(LoweringContext &Context); |
49 virtual void instrumentFuncStart(LoweringContext &Context) { | 49 virtual void instrumentFuncStart(LoweringContext &) {} |
50 (void) Context; | 50 virtual void instrumentAlloca(LoweringContext &, const class InstAlloca *) {} |
51 } | 51 virtual void instrumentArithmetic(LoweringContext &, |
52 virtual void instrumentAlloca(LoweringContext &Context, | 52 const class InstArithmetic *) {} |
53 const class InstAlloca *Instr) { | 53 virtual void instrumentBr(LoweringContext &, const class InstBr *) {} |
54 (void) Context; | 54 virtual void instrumentCall(LoweringContext &, const class InstCall *) {} |
55 (void) Instr; | 55 virtual void instrumentCast(LoweringContext &, const class InstCast *) {} |
56 } | 56 virtual void instrumentExtractElement(LoweringContext &, |
57 virtual void instrumentArithmetic(LoweringContext &Context, | 57 const class InstExtractElement *) {} |
58 const class InstArithmetic *Instr) { | 58 virtual void instrumentFcmp(LoweringContext &, const class InstFcmp *) {} |
59 (void) Context; | 59 virtual void instrumentIcmp(LoweringContext &, const class InstIcmp *) {} |
60 (void) Instr; | 60 virtual void instrumentInsertElement(LoweringContext &, |
61 } | 61 const class InstInsertElement *) {} |
62 virtual void instrumentBr(LoweringContext &Context, | 62 virtual void instrumentIntrinsicCall(LoweringContext &, |
63 const class InstBr *Instr) { | 63 const class InstIntrinsicCall *) {} |
64 (void) Context; | 64 virtual void instrumentLoad(LoweringContext &, const class InstLoad *) {} |
65 (void) Instr; | 65 virtual void instrumentPhi(LoweringContext &, const class InstPhi *) {} |
66 } | 66 virtual void instrumentRet(LoweringContext &, const class InstRet *) {} |
67 virtual void instrumentCall(LoweringContext &Context, | 67 virtual void instrumentSelect(LoweringContext &, const class InstSelect *) {} |
68 const class InstCall *Instr) { | 68 virtual void instrumentStore(LoweringContext &, const class InstStore *) {} |
69 (void) Context; | 69 virtual void instrumentSwitch(LoweringContext &, const class InstSwitch *) {} |
70 (void) Instr; | 70 virtual void instrumentUnreachable(LoweringContext &, |
71 } | 71 const class InstUnreachable *) {} |
72 virtual void instrumentCast(LoweringContext &Context, | 72 virtual void instrumentLocalVars(Cfg *) {} |
73 const class InstCast *Instr) { | |
74 (void) Context; | |
75 (void) Instr; | |
76 } | |
77 virtual void instrumentExtractElement(LoweringContext &Context, | |
78 const class InstExtractElement *Instr) { | |
79 (void) Context; | |
80 (void) Instr; | |
81 } | |
82 virtual void instrumentFcmp(LoweringContext &Context, | |
83 const class InstFcmp *Instr) { | |
84 (void) Context; | |
85 (void) Instr; | |
86 } | |
87 virtual void instrumentIcmp(LoweringContext &Context, | |
88 const class InstIcmp *Instr) { | |
89 (void) Context; | |
90 (void) Instr; | |
91 } | |
92 virtual void instrumentInsertElement(LoweringContext &Context, | |
93 const class InstInsertElement *Instr) { | |
94 (void) Context; | |
95 (void) Instr; | |
96 } | |
97 virtual void instrumentIntrinsicCall(LoweringContext &Context, | |
98 const class InstIntrinsicCall *Instr) { | |
99 (void) Context; | |
100 (void) Instr; | |
101 } | |
102 virtual void instrumentLoad(LoweringContext &Context, | |
103 const class InstLoad *Instr) { | |
104 (void) Context; | |
105 (void) Instr; | |
106 } | |
107 virtual void instrumentPhi(LoweringContext &Context, | |
108 const class InstPhi *Instr) { | |
109 (void) Context; | |
110 (void) Instr; | |
111 } | |
112 virtual void instrumentRet(LoweringContext &Context, | |
113 const class InstRet *Instr) { | |
114 (void) Context; | |
115 (void) Instr; | |
116 } | |
117 virtual void instrumentSelect(LoweringContext &Context, | |
118 const class InstSelect *Instr) { | |
119 (void) Context; | |
120 (void) Instr; | |
121 } | |
122 virtual void instrumentStore(LoweringContext &Context, | |
123 const class InstStore *Instr) { | |
124 (void) Context; | |
125 (void) Instr; | |
126 } | |
127 virtual void instrumentSwitch(LoweringContext &Context, | |
128 const class InstSwitch *Instr) { | |
129 (void) Context; | |
130 (void) Instr; | |
131 } | |
132 virtual void instrumentUnreachable(LoweringContext &Context, | |
133 const class InstUnreachable *Instr) { | |
134 (void) Context; | |
135 (void) Instr; | |
136 } | |
137 virtual void instrumentLocalVars(Cfg *Func) { | |
138 (void) Func; | |
139 } | |
140 | 73 |
141 protected: | 74 protected: |
142 GlobalContext *Ctx; | 75 GlobalContext *Ctx; |
143 }; | 76 }; |
144 | 77 |
145 } // end of namespace Ice | 78 } // end of namespace Ice |
146 | 79 |
147 #endif // SUBZERO_SRC_ICEINSTRUMENTATION_H | 80 #endif // SUBZERO_SRC_ICEINSTRUMENTATION_H |
OLD | NEW |