Loose the conditions that atomic calls are captured. Need to come up with better...
authorweiyu <weiyuluo1232@gmail.com>
Thu, 20 Jun 2019 22:55:07 +0000 (15:55 -0700)
committerweiyu <weiyuluo1232@gmail.com>
Thu, 20 Jun 2019 22:55:07 +0000 (15:55 -0700)
isAtomicCall.hpp

index a127619..99e7532 100644 (file)
@@ -11,10 +11,13 @@ bool isAtomicCall(Instruction *I)
 
                StringRef funName = fun->getName();
 
-               if ( (CI->isTailCall() && funName.contains("atomic_")) ||
-                       funName.contains("atomic_compare_exchange_") ) {
+               // todo: come up with better rules for function name checking
+               if ( funName.contains("atomic_") ) {
                        // printArgs(CI);
                        return true;
+               } else if (funName.contains("atomic") ) {
+                       // errs() << "intercepted atomic calls: " << *I << "\n";
+                       return true;
                }
        }