Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Side by Side Diff: src/IceInstrumentation.cpp

Issue 2054943002: Implemented global redzones. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Finished reformatting Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/IceInstrumentation.h ('k') | tests_lit/asan_tests/globalredzones.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceInstrumentation.cpp - ICE instrumentation framework -===// 1 //===- subzero/src/IceInstrumentation.cpp - ICE instrumentation framework -===//
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 29 matching lines...) Expand all
40 Context.advanceCur(); 40 Context.advanceCur();
41 Context.advanceNext(); 41 Context.advanceNext();
42 } 42 }
43 } 43 }
44 } 44 }
45 45
46 void Instrumentation::instrumentInst(LoweringContext &Context) { 46 void Instrumentation::instrumentInst(LoweringContext &Context) {
47 assert(!Context.atEnd()); 47 assert(!Context.atEnd());
48 Inst *Instr = iteratorToInst(Context.getCur()); 48 Inst *Instr = iteratorToInst(Context.getCur());
49 switch (Instr->getKind()) { 49 switch (Instr->getKind()) {
50 case Inst::Alloca: 50 case Inst::Alloca:
51 instrumentAlloca(Context, llvm::cast<InstAlloca>(Instr)); 51 instrumentAlloca(Context, llvm::cast<InstAlloca>(Instr));
52 break; 52 break;
53 case Inst::Arithmetic: 53 case Inst::Arithmetic:
54 instrumentArithmetic(Context, llvm::cast<InstArithmetic>(Instr)); 54 instrumentArithmetic(Context, llvm::cast<InstArithmetic>(Instr));
55 break; 55 break;
56 case Inst::Br: 56 case Inst::Br:
57 instrumentBr(Context, llvm::cast<InstBr>(Instr)); 57 instrumentBr(Context, llvm::cast<InstBr>(Instr));
58 break; 58 break;
59 case Inst::Call: 59 case Inst::Call:
60 instrumentCall(Context, llvm::cast<InstCall>(Instr)); 60 instrumentCall(Context, llvm::cast<InstCall>(Instr));
61 break; 61 break;
62 case Inst::Cast: 62 case Inst::Cast:
63 instrumentCast(Context, llvm::cast<InstCast>(Instr)); 63 instrumentCast(Context, llvm::cast<InstCast>(Instr));
64 break; 64 break;
65 case Inst::ExtractElement: 65 case Inst::ExtractElement:
66 instrumentExtractElement(Context, llvm::cast<InstExtractElement>(Instr)); 66 instrumentExtractElement(Context, llvm::cast<InstExtractElement>(Instr));
67 break; 67 break;
68 case Inst::Fcmp: 68 case Inst::Fcmp:
69 instrumentFcmp(Context, llvm::cast<InstFcmp>(Instr)); 69 instrumentFcmp(Context, llvm::cast<InstFcmp>(Instr));
70 break; 70 break;
71 case Inst::Icmp: 71 case Inst::Icmp:
72 instrumentIcmp(Context, llvm::cast<InstIcmp>(Instr)); 72 instrumentIcmp(Context, llvm::cast<InstIcmp>(Instr));
73 break; 73 break;
74 case Inst::InsertElement: 74 case Inst::InsertElement:
75 instrumentInsertElement(Context, llvm::cast<InstInsertElement>(Instr)); 75 instrumentInsertElement(Context, llvm::cast<InstInsertElement>(Instr));
76 break; 76 break;
77 case Inst::IntrinsicCall: 77 case Inst::IntrinsicCall:
78 instrumentIntrinsicCall(Context, llvm::cast<InstIntrinsicCall>(Instr)); 78 instrumentIntrinsicCall(Context, llvm::cast<InstIntrinsicCall>(Instr));
79 break; 79 break;
80 case Inst::Load: 80 case Inst::Load:
81 instrumentLoad(Context, llvm::cast<InstLoad>(Instr)); 81 instrumentLoad(Context, llvm::cast<InstLoad>(Instr));
82 break; 82 break;
83 case Inst::Phi: 83 case Inst::Phi:
84 instrumentPhi(Context, llvm::cast<InstPhi>(Instr)); 84 instrumentPhi(Context, llvm::cast<InstPhi>(Instr));
85 break; 85 break;
86 case Inst::Ret: 86 case Inst::Ret:
87 instrumentRet(Context, llvm::cast<InstRet>(Instr)); 87 instrumentRet(Context, llvm::cast<InstRet>(Instr));
88 break; 88 break;
89 case Inst::Select: 89 case Inst::Select:
90 instrumentSelect(Context, llvm::cast<InstSelect>(Instr)); 90 instrumentSelect(Context, llvm::cast<InstSelect>(Instr));
91 break; 91 break;
92 case Inst::Store: 92 case Inst::Store:
93 instrumentStore(Context, llvm::cast<InstStore>(Instr)); 93 instrumentStore(Context, llvm::cast<InstStore>(Instr));
94 break; 94 break;
95 case Inst::Switch: 95 case Inst::Switch:
96 instrumentSwitch(Context, llvm::cast<InstSwitch>(Instr)); 96 instrumentSwitch(Context, llvm::cast<InstSwitch>(Instr));
97 break; 97 break;
98 case Inst::Unreachable: 98 case Inst::Unreachable:
99 instrumentUnreachable(Context, llvm::cast<InstUnreachable>(Instr)); 99 instrumentUnreachable(Context, llvm::cast<InstUnreachable>(Instr));
100 break; 100 break;
101 default: 101 default:
102 // Only instrument high-level ICE instructions 102 // Only instrument high-level ICE instructions
103 assert(false && "Instrumentation encountered an unexpected instruction"); 103 assert(false && "Instrumentation encountered an unexpected instruction");
104 break; 104 break;
105 } 105 }
106 } 106 }
107 107
108 } // end of namespace Ice 108 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceInstrumentation.h ('k') | tests_lit/asan_tests/globalredzones.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698