X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=CDSPass.cpp;h=684e03f1f3e45ab1b5ece0cf0af71d050c65f5b8;hb=1b9d40620be8be192b28e61c3856354c24a5555c;hp=eef87699e927fbb820880a6dfddbcceea31a987b;hpb=6ecaa6a7810d93c6e682b23c7605968ec347e4ff;p=c11llvm.git diff --git a/CDSPass.cpp b/CDSPass.cpp index eef8769..684e03f 100644 --- a/CDSPass.cpp +++ b/CDSPass.cpp @@ -337,8 +337,7 @@ bool CDSPass::runOnFunction(Function &F) { } for (auto Inst : AllLoadsAndStores) { - // Res |= instrumentLoadOrStore(Inst, DL); - // errs() << "load and store are replaced\n"; + Res |= instrumentLoadOrStore(Inst, DL); } for (auto Inst : AtomicAccesses) { @@ -348,13 +347,13 @@ bool CDSPass::runOnFunction(Function &F) { // only instrument functions that contain atomics if (Res && HasAtomic) { IRBuilder<> IRB(F.getEntryBlock().getFirstNonPHI()); + /* Unused for now Value *ReturnAddress = IRB.CreateCall( Intrinsic::getDeclaration(F.getParent(), Intrinsic::returnaddress), IRB.getInt32(0)); + */ Value * FuncName = IRB.CreateGlobalStringPtr(F.getName()); - - errs() << "function name: " << F.getName() << "\n"; IRB.CreateCall(CDSFuncEntry, FuncName); EscapeEnumerator EE(F, "cds_cleanup", true);