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 26 matching lines...) Expand all Loading... |
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(VariableDeclarationList &) {} | 44 virtual void instrumentGlobals(VariableDeclarationList &) {} |
45 void instrumentFunc(Cfg *Func); | 45 void instrumentFunc(Cfg *Func); |
46 | 46 |
| 47 protected: |
| 48 virtual void instrumentInst(LoweringContext &Context); |
| 49 |
47 private: | 50 private: |
48 void instrumentInst(LoweringContext &Context); | |
49 virtual void instrumentFuncStart(LoweringContext &) {} | 51 virtual void instrumentFuncStart(LoweringContext &) {} |
50 virtual void instrumentAlloca(LoweringContext &, class InstAlloca *) {} | 52 virtual void instrumentAlloca(LoweringContext &, class InstAlloca *) {} |
51 virtual void instrumentArithmetic(LoweringContext &, class InstArithmetic *) { | 53 virtual void instrumentArithmetic(LoweringContext &, class InstArithmetic *) { |
52 } | 54 } |
53 virtual void instrumentBr(LoweringContext &, class InstBr *) {} | 55 virtual void instrumentBr(LoweringContext &, class InstBr *) {} |
54 virtual void instrumentCall(LoweringContext &, class InstCall *) {} | 56 virtual void instrumentCall(LoweringContext &, class InstCall *) {} |
55 virtual void instrumentCast(LoweringContext &, class InstCast *) {} | 57 virtual void instrumentCast(LoweringContext &, class InstCast *) {} |
56 virtual void instrumentExtractElement(LoweringContext &, | 58 virtual void instrumentExtractElement(LoweringContext &, |
57 class InstExtractElement *) {} | 59 class InstExtractElement *) {} |
58 virtual void instrumentFcmp(LoweringContext &, class InstFcmp *) {} | 60 virtual void instrumentFcmp(LoweringContext &, class InstFcmp *) {} |
59 virtual void instrumentIcmp(LoweringContext &, class InstIcmp *) {} | 61 virtual void instrumentIcmp(LoweringContext &, class InstIcmp *) {} |
60 virtual void instrumentInsertElement(LoweringContext &, | 62 virtual void instrumentInsertElement(LoweringContext &, |
61 class InstInsertElement *) {} | 63 class InstInsertElement *) {} |
62 virtual void instrumentIntrinsicCall(LoweringContext &, | 64 virtual void instrumentIntrinsicCall(LoweringContext &, |
63 class InstIntrinsicCall *) {} | 65 class InstIntrinsicCall *) {} |
64 virtual void instrumentLoad(LoweringContext &, class InstLoad *) {} | 66 virtual void instrumentLoad(LoweringContext &, class InstLoad *) {} |
65 virtual void instrumentPhi(LoweringContext &, class InstPhi *) {} | 67 virtual void instrumentPhi(LoweringContext &, class InstPhi *) {} |
66 virtual void instrumentRet(LoweringContext &, class InstRet *) {} | 68 virtual void instrumentRet(LoweringContext &, class InstRet *) {} |
67 virtual void instrumentSelect(LoweringContext &, class InstSelect *) {} | 69 virtual void instrumentSelect(LoweringContext &, class InstSelect *) {} |
68 virtual void instrumentStore(LoweringContext &, class InstStore *) {} | 70 virtual void instrumentStore(LoweringContext &, class InstStore *) {} |
69 virtual void instrumentSwitch(LoweringContext &, class InstSwitch *) {} | 71 virtual void instrumentSwitch(LoweringContext &, class InstSwitch *) {} |
70 virtual void instrumentUnreachable(LoweringContext &, | 72 virtual void instrumentUnreachable(LoweringContext &, |
71 class InstUnreachable *) {} | 73 class InstUnreachable *) {} |
72 virtual void instrumentStart(Cfg *) {} | 74 virtual void instrumentStart(Cfg *) {} |
73 virtual void instrumentLocalVars(Cfg *) {} | 75 virtual void instrumentLocalVars(Cfg *) {} |
| 76 virtual void finishFunc(Cfg *) {} |
74 | 77 |
75 protected: | 78 protected: |
76 GlobalContext *Ctx; | 79 GlobalContext *Ctx; |
77 }; | 80 }; |
78 | 81 |
79 } // end of namespace Ice | 82 } // end of namespace Ice |
80 | 83 |
81 #endif // SUBZERO_SRC_ICEINSTRUMENTATION_H | 84 #endif // SUBZERO_SRC_ICEINSTRUMENTATION_H |
OLD | NEW |