enable the instrumentation of non-atomic loads and stores
[c11llvm.git] / CDSPass.cpp
index eef87699e927fbb820880a6dfddbcceea31a987b..684e03f1f3e45ab1b5ece0cf0af71d050c65f5b8 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);