[PATCH] D32401: [Devirtualization] insert placement new barrier with -O0
Piotr Padlewski via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat May 20 02:09:47 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL303488: [Devirtualization] insert placement new barrier with -O0 (authored by Prazek).
Changed prior to commit:
https://reviews.llvm.org/D32401?vs=96313&id=99667#toc
Repository:
rL LLVM
https://reviews.llvm.org/D32401
Files:
cfe/trunk/lib/CodeGen/CGExprCXX.cpp
Index: cfe/trunk/lib/CodeGen/CGExprCXX.cpp
===================================================================
--- cfe/trunk/lib/CodeGen/CGExprCXX.cpp
+++ cfe/trunk/lib/CodeGen/CGExprCXX.cpp
@@ -1658,8 +1658,9 @@
// Passing pointer through invariant.group.barrier to avoid propagation of
// vptrs information which may be included in previous type.
+ // To not break LTO with different optimizations levels, we do it regardless
+ // of optimization level.
if (CGM.getCodeGenOpts().StrictVTablePointers &&
- CGM.getCodeGenOpts().OptimizationLevel > 0 &&
allocator->isReservedGlobalPlacementOperator())
result = Address(Builder.CreateInvariantGroupBarrier(result.getPointer()),
result.getAlignment());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32401.99667.patch
Type: text/x-patch
Size: 752 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170520/b1a59f7f/attachment.bin>
More information about the cfe-commits
mailing list