| OLD | NEW |
| 1 //===- subzero/src/IceASanInstrumentation.h - AddressSanitizer --*- C++ -*-===// | 1 //===- subzero/src/IceASanInstrumentation.h - AddressSanitizer --*- 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 27 matching lines...) Expand all Loading... |
| 38 ICE_TLS_INIT_FIELD(LocalVars); | 38 ICE_TLS_INIT_FIELD(LocalVars); |
| 39 ICE_TLS_INIT_FIELD(LocalDtors); | 39 ICE_TLS_INIT_FIELD(LocalDtors); |
| 40 ICE_TLS_INIT_FIELD(CurNode); | 40 ICE_TLS_INIT_FIELD(CurNode); |
| 41 ICE_TLS_INIT_FIELD(CheckedVars); | 41 ICE_TLS_INIT_FIELD(CheckedVars); |
| 42 } | 42 } |
| 43 void instrumentGlobals(VariableDeclarationList &Globals) override; | 43 void instrumentGlobals(VariableDeclarationList &Globals) override; |
| 44 | 44 |
| 45 private: | 45 private: |
| 46 std::string nextRzName(); | 46 std::string nextRzName(); |
| 47 bool isOkGlobalAccess(Operand *Op, SizeT Size); | 47 bool isOkGlobalAccess(Operand *Op, SizeT Size); |
| 48 ConstantRelocatable *instrumentReloc(ConstantRelocatable *Reloc); |
| 48 bool isInstrumentable(Cfg *Func) override; | 49 bool isInstrumentable(Cfg *Func) override; |
| 49 void instrumentFuncStart(LoweringContext &Context) override; | 50 void instrumentFuncStart(LoweringContext &Context) override; |
| 50 void instrumentCall(LoweringContext &Context, InstCall *Instr) override; | 51 void instrumentCall(LoweringContext &Context, InstCall *Instr) override; |
| 51 void instrumentRet(LoweringContext &Context, InstRet *Instr) override; | 52 void instrumentRet(LoweringContext &Context, InstRet *Instr) override; |
| 52 void instrumentLoad(LoweringContext &Context, InstLoad *Instr) override; | 53 void instrumentLoad(LoweringContext &Context, InstLoad *Instr) override; |
| 53 void instrumentStore(LoweringContext &Context, InstStore *Instr) override; | 54 void instrumentStore(LoweringContext &Context, InstStore *Instr) override; |
| 54 void instrumentAccess(LoweringContext &Context, Operand *Op, SizeT Size, | 55 void instrumentAccess(LoweringContext &Context, Operand *Op, SizeT Size, |
| 55 Constant *AccessFunc); | 56 Constant *AccessFunc); |
| 56 void instrumentStart(Cfg *Func) override; | 57 void instrumentStart(Cfg *Func) override; |
| 57 void finishFunc(Cfg *Func) override; | 58 void finishFunc(Cfg *Func) override; |
| 58 ICE_TLS_DECLARE_FIELD(VarSizeMap *, LocalVars); | 59 ICE_TLS_DECLARE_FIELD(VarSizeMap *, LocalVars); |
| 59 ICE_TLS_DECLARE_FIELD(std::vector<InstStore *> *, LocalDtors); | 60 ICE_TLS_DECLARE_FIELD(std::vector<InstStore *> *, LocalDtors); |
| 60 ICE_TLS_DECLARE_FIELD(CfgNode *, CurNode); | 61 ICE_TLS_DECLARE_FIELD(CfgNode *, CurNode); |
| 61 ICE_TLS_DECLARE_FIELD(VarSizeMap *, CheckedVars); | 62 ICE_TLS_DECLARE_FIELD(VarSizeMap *, CheckedVars); |
| 62 GlobalSizeMap GlobalSizes; | 63 GlobalSizeMap GlobalSizes; |
| 63 std::atomic<uint32_t> RzNum; | 64 std::atomic<uint32_t> RzNum; |
| 64 bool DidProcessGlobals = false; | 65 bool DidProcessGlobals = false; |
| 65 SizeT RzGlobalsNum = 0; | 66 SizeT RzGlobalsNum = 0; |
| 66 std::mutex GlobalsMutex; | 67 std::mutex GlobalsMutex; |
| 67 }; | 68 }; |
| 68 } // end of namespace Ice | 69 } // end of namespace Ice |
| 69 | 70 |
| 70 #endif // SUBZERO_SRC_ICEASANINSTRUMENTATION_H | 71 #endif // SUBZERO_SRC_ICEASANINSTRUMENTATION_H |
| OLD | NEW |