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

Side by Side Diff: src/IceInstrumentation.cpp

Issue 2095763002: Instrumented local variables and implemented runtime. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Organizational Fixes Created 4 years, 5 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
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 instrumentInst(Context); 44 instrumentInst(Context);
45 // go to next undeleted instruction 45 // go to next undeleted instruction
46 Context.advanceCur(); 46 Context.advanceCur();
47 Context.advanceNext(); 47 Context.advanceNext();
48 } 48 }
49 } 49 }
50 50
51 std::string FuncName = Func->getFunctionName().toStringOrEmpty(); 51 std::string FuncName = Func->getFunctionName().toStringOrEmpty();
52 if (FuncName == "_start") 52 if (FuncName == "_start")
53 instrumentStart(Func); 53 instrumentStart(Func);
54
55 finishFunc(Func);
54 } 56 }
55 57
56 void Instrumentation::instrumentInst(LoweringContext &Context) { 58 void Instrumentation::instrumentInst(LoweringContext &Context) {
57 assert(!Context.atEnd()); 59 assert(!Context.atEnd());
58 Inst *Instr = iteratorToInst(Context.getCur()); 60 Inst *Instr = iteratorToInst(Context.getCur());
59 switch (Instr->getKind()) { 61 switch (Instr->getKind()) {
60 case Inst::Alloca: 62 case Inst::Alloca:
61 instrumentAlloca(Context, llvm::cast<InstAlloca>(Instr)); 63 instrumentAlloca(Context, llvm::cast<InstAlloca>(Instr));
62 break; 64 break;
63 case Inst::Arithmetic: 65 case Inst::Arithmetic:
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 instrumentUnreachable(Context, llvm::cast<InstUnreachable>(Instr)); 111 instrumentUnreachable(Context, llvm::cast<InstUnreachable>(Instr));
110 break; 112 break;
111 default: 113 default:
112 // Only instrument high-level ICE instructions 114 // Only instrument high-level ICE instructions
113 assert(false && "Instrumentation encountered an unexpected instruction"); 115 assert(false && "Instrumentation encountered an unexpected instruction");
114 break; 116 break;
115 } 117 }
116 } 118 }
117 119
118 } // end of namespace Ice 120 } // end of namespace Ice
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698