| Index: src/IceInstrumentation.cpp
|
| diff --git a/src/IceInstrumentation.cpp b/src/IceInstrumentation.cpp
|
| index c911a0b449e08d52a56dfbcea06ea7c18d3e4b52..0cd218abcbdbd7df2507cab8808dbcfdb7db5c20 100644
|
| --- a/src/IceInstrumentation.cpp
|
| +++ b/src/IceInstrumentation.cpp
|
| @@ -29,17 +29,18 @@ void Instrumentation::instrumentFunc(Cfg *Func) {
|
| assert(Func);
|
| assert(!Func->getNodes().empty());
|
|
|
| - // TODO(tlively): More selectively instrument functions so that shadow memory
|
| - // represents user accessibility more and library accessibility less.
|
| - bool DidInstrumentStart = false;
|
| + if (!isInstrumentable(Func))
|
| + return;
|
| +
|
| + bool DidInstrumentEntry = false;
|
| LoweringContext Context;
|
| Context.init(Func->getNodes().front());
|
| for (CfgNode *Node : Func->getNodes()) {
|
| Context.init(Node);
|
| while (!Context.atEnd()) {
|
| - if (!DidInstrumentStart) {
|
| + if (!DidInstrumentEntry) {
|
| instrumentFuncStart(Context);
|
| - DidInstrumentStart = true;
|
| + DidInstrumentEntry = true;
|
| }
|
| instrumentInst(Context);
|
| // go to next undeleted instruction
|
|
|