add support for libcds atomic function calls
[c11llvm.git] / isAtomicCall.hpp
index a127619..99e7532 100644 (file)
@@ -11,10 +11,13 @@ bool isAtomicCall(Instruction *I)
 
                StringRef funName = fun->getName();
 
 
                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;
                        // printArgs(CI);
                        return true;
+               } else if (funName.contains("atomic") ) {
+                       // errs() << "intercepted atomic calls: " << *I << "\n";
+                       return true;
                }
        }
 
                }
        }