yaxunl added inline comments.
================ Comment at: lib/CodeGen/CGCUDANV.cpp:444 + auto HandleValue = + CtorBuilder.CreateAlignedLoad(GpuBinaryHandle, CGM.getPointerAlign()); + llvm::Constant *Zero = llvm::Constant::getNullValue(HandleValue->getType()); ---------------- rjmccall wrote: > Do you not need to worry about concurrency here? The ctor functions are executed by the dynamic loader before the program gains the control. The dynamic loader cannot excute the ctor functions concurrently since doing that would not gurantee thread safety of the loaded program. Therefore we can assume sequential execution of ctor functions here. https://reviews.llvm.org/D49083 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits