This revision was automatically updated to reflect the committed changes.
Closed by commit rL304448: Emit invariant.group.barrier when using union field
(authored by Prazek).
Changed prior to commit:
https://reviews.llvm.org/D31830?vs=100977=101058#toc
Repository:
rL LLVM
rjmccall accepted this revision.
rjmccall added a comment.
Thanks, LGTM.
https://reviews.llvm.org/D31830
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Prazek updated this revision to Diff 100977.
Prazek marked an inline comment as done.
Prazek added a comment.
Extra test
https://reviews.llvm.org/D31830
Files:
lib/CodeGen/CGExpr.cpp
test/CodeGenCXX/strict-vtable-pointers.cpp
Index: test/CodeGenCXX/strict-vtable-pointers.cpp
rjmccall added inline comments.
Comment at: test/CodeGenCXX/strict-vtable-pointers.cpp:263
+
+struct VirtualInVBase : virtual Empty, HoldingVirtuals {
+};
"virtual" applies to an individual base, not to all following bases. You need
"virtual HoldingVirtuals"
Prazek updated this revision to Diff 100621.
Prazek added a comment.
Add test
https://reviews.llvm.org/D31830
Files:
lib/CodeGen/CGExpr.cpp
test/CodeGenCXX/strict-vtable-pointers.cpp
Index: test/CodeGenCXX/strict-vtable-pointers.cpp
rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.
Looks great, thanks. One request for additional tests, but feel free to commit
when that's ready.
Comment at: test/CodeGenCXX/strict-vtable-pointers.cpp:258
+
Prazek marked 2 inline comments as done.
Prazek added inline comments.
Comment at: lib/CodeGen/CGExpr.cpp:3530
+ return false;
+}
+
rjmccall wrote:
> You need to recurse into base classes (to check their fields), and if you
> write this to take a QualType you
Prazek updated this revision to Diff 100533.
Prazek added a comment.
- changed to QualType, now it is much cleaner
https://reviews.llvm.org/D31830
Files:
lib/CodeGen/CGExpr.cpp
test/CodeGenCXX/strict-vtable-pointers.cpp
Index: test/CodeGenCXX/strict-vtable-pointers.cpp
rjmccall added inline comments.
Comment at: lib/CodeGen/CGExpr.cpp:3517
+CGM.getCodeGenOpts().StrictVTablePointers &&
+CGM.getCodeGenOpts().OptimizationLevel > 0)
+ addr = Address(Builder.CreateInvariantGroupBarrier(addr.getPointer()),
Prazek added a reviewer: mehdi_amini.
Prazek added a comment.
Ping
https://reviews.llvm.org/D31830
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Prazek updated this revision to Diff 96312.
Prazek added a comment.
- Inserting barrier with -O0
https://reviews.llvm.org/D31830
Files:
lib/CodeGen/CGExpr.cpp
test/CodeGenCXX/strict-vtable-pointers.cpp
Index: test/CodeGenCXX/strict-vtable-pointers.cpp
Prazek updated this revision to Diff 96255.
Prazek added a comment.
- format
https://reviews.llvm.org/D31830
Files:
lib/CodeGen/CGExpr.cpp
test/CodeGenCXX/strict-vtable-pointers.cpp
Index: test/CodeGenCXX/strict-vtable-pointers.cpp
Prazek marked 6 inline comments as done.
Prazek added a comment.
For now I will check if it has any vptrs. It will be probably soon stored in
the CXXRecordDecl because it will be used much more frequently when generating
barriers for pointer casts.
https://reviews.llvm.org/D31830
Prazek added inline comments.
Comment at: lib/CodeGen/CGExpr.cpp:3517
+CGM.getCodeGenOpts().StrictVTablePointers &&
+CGM.getCodeGenOpts().OptimizationLevel > 0)
+ addr = Address(Builder.CreateInvariantGroupBarrier(addr.getPointer()),
rjmccall added inline comments.
Comment at: lib/CodeGen/CGExpr.cpp:3517
+CGM.getCodeGenOpts().StrictVTablePointers &&
+CGM.getCodeGenOpts().OptimizationLevel > 0)
+ addr = Address(Builder.CreateInvariantGroupBarrier(addr.getPointer()),
Prazek added inline comments.
Comment at: lib/CodeGen/CGExpr.cpp:3517
+CGM.getCodeGenOpts().StrictVTablePointers &&
+CGM.getCodeGenOpts().OptimizationLevel > 0)
+ addr = Address(Builder.CreateInvariantGroupBarrier(addr.getPointer()),
rjmccall added inline comments.
Comment at: lib/CodeGen/CGExpr.cpp:3517
+CGM.getCodeGenOpts().StrictVTablePointers &&
+CGM.getCodeGenOpts().OptimizationLevel > 0)
+ addr = Address(Builder.CreateInvariantGroupBarrier(addr.getPointer()),
Prazek added inline comments.
Comment at: lib/CodeGen/CGExpr.cpp:3517
+CGM.getCodeGenOpts().StrictVTablePointers &&
+CGM.getCodeGenOpts().OptimizationLevel > 0)
+ addr = Address(Builder.CreateInvariantGroupBarrier(addr.getPointer()),
rjmccall added inline comments.
Comment at: lib/CodeGen/CGExpr.cpp:3517
+CGM.getCodeGenOpts().StrictVTablePointers &&
+CGM.getCodeGenOpts().OptimizationLevel > 0)
+ addr = Address(Builder.CreateInvariantGroupBarrier(addr.getPointer()),
Prazek added a comment.
ping
https://reviews.llvm.org/D31830
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Prazek added a comment.
ping
https://reviews.llvm.org/D31830
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Prazek created this revision.
We need to emit barrier if the union field
is CXXRecordDecl because it might have vptrs. The testcode
was wrongly devirtualized. It also proves that having different
groups for different dynamic types is not sufficient.
https://reviews.llvm.org/D31830
Files:
22 matches
Mail list logo