jlebar added inline comments.
================ Comment at: lib/Basic/Targets.cpp:1784 + // atomics. This matches the defaults for the systems using CUDA. + // TODO: pass the host target CPU + if (HostTriple.getArch() == llvm::Triple::x86) ---------------- Someone else is calling setCPU on the HostTarget. If they're calling it after we call it here, this is obviously not going to work. Since it does work, I presume they are calling it before we get here. In which case, can we not just set `MaxAtomicPromoteWidth=HostTarget->MaxAtomicPromoteWidth` right after we set `MaxAtomicInlineWidth = HostTarget->getMaxAtomicInlineWidth();` below? (Note that as written definitely isn't right because it assumes that HostTarget is non-null.) https://reviews.llvm.org/D29542 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits