enable the instrumentation of non-atomic loads and stores
authorweiyu <weiyuluo1232@gmail.com>
Tue, 2 Jul 2019 23:39:03 +0000 (16:39 -0700)
committerweiyu <weiyuluo1232@gmail.com>
Tue, 2 Jul 2019 23:39:03 +0000 (16:39 -0700)
CDSPass.cpp

index eef8769..684e03f 100644 (file)
@@ -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);