From: weiyu Date: Tue, 2 Jul 2019 23:39:03 +0000 (-0700) Subject: enable the instrumentation of non-atomic loads and stores X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1b9d40620be8be192b28e61c3856354c24a5555c;p=c11llvm.git enable the instrumentation of non-atomic loads and stores --- 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);