EricWF marked 2 inline comments as done.
EricWF added inline comments.

================
Comment at: lib/CodeGen/CGBuiltin.cpp:1674
+    Value *Ptr = EmitScalarExpr(E->getArg(0));
+    Ptr = Builder.CreateInvariantGroupBarrier(Ptr);
+    return RValue::get(Ptr);
----------------
rsmith wrote:
> It would be nice to avoid this for types that contain no const subobjects / 
> reference subobjects / vptrs. I think we can also omit this entirely if 
> `-fstrict-vtable-ptrs` is disabled, since in that case we don't generate any 
> `invariant.group` metadata.
> 
> I'd be OK with the former being left to a future change, but the latter 
> should be part of this change so we don't generate unnecessarily-inefficient 
> code in the default mode for uses of `std::launder`.
I'll put it in this change set.


https://reviews.llvm.org/D40218



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to