[PATCH] D26266: [tsan] Cast floating-point types correctly when instrumenting atomic accesses

Dmitry Vyukov via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 6 19:42:56 PST 2016


dvyukov accepted this revision.
dvyukov added a comment.
This revision is now accepted and ready to land.

LGTM with a nit



================
Comment at: lib/Transforms/Instrumentation/ThreadSanitizer.cpp:551-552
 }
 
 static Value *createIntOrPtrToIntCast(Value *V, Type* Ty, IRBuilder<> &IRB) {
+  return IRB.CreateBitOrPointerCast(V, Ty);
----------------
It does not look worthwhile to keep this helper function around at all now. Especially that you call CreateBitOrPointerCast directly in instrumentAtomic, so now it's not even a single point of extension. Just replace calls with CreateBitOrPointerCast and remove this function.


https://reviews.llvm.org/D26266





More information about the llvm-commits mailing list