[PATCH] D41452: [CodeGen] Fix access sizes in new-format TBAA tags
This revision was automatically updated to reflect the committed changes. Closed by commit rL321250: [CodeGen] Fix access sizes in new-format TBAA tags (authored by kosarev, committed by ). Changed prior to commit: https://reviews.llvm.org/D41452?vs=127724&id=127834#toc Repository: rL LLVM https://reviews.llvm.org/D41452 Files: cfe/trunk/lib/CodeGen/CGExpr.cpp Index: cfe/trunk/lib/CodeGen/CGExpr.cpp === --- cfe/trunk/lib/CodeGen/CGExpr.cpp +++ cfe/trunk/lib/CodeGen/CGExpr.cpp @@ -3801,8 +3801,10 @@ FieldTBAAInfo.Offset += Layout.getFieldOffset(field->getFieldIndex()) / CharWidth; -// Update the final access type. +// Update the final access type and size. FieldTBAAInfo.AccessType = CGM.getTBAATypeInfo(FieldType); +FieldTBAAInfo.Size = +getContext().getTypeSizeInChars(FieldType).getQuantity(); } Address addr = base.getAddress(); Index: cfe/trunk/lib/CodeGen/CGExpr.cpp === --- cfe/trunk/lib/CodeGen/CGExpr.cpp +++ cfe/trunk/lib/CodeGen/CGExpr.cpp @@ -3801,8 +3801,10 @@ FieldTBAAInfo.Offset += Layout.getFieldOffset(field->getFieldIndex()) / CharWidth; -// Update the final access type. +// Update the final access type and size. FieldTBAAInfo.AccessType = CGM.getTBAATypeInfo(FieldType); +FieldTBAAInfo.Size = +getContext().getTypeSizeInChars(FieldType).getQuantity(); } Address addr = base.getAddress(); ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D41452: [CodeGen] Fix access sizes in new-format TBAA tags
hfinkel accepted this revision. hfinkel added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D41452#961710, @rjmccall wrote: > LGTM. Me too. Repository: rL LLVM https://reviews.llvm.org/D41452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D41452: [CodeGen] Fix access sizes in new-format TBAA tags
rjmccall added a comment. LGTM. Repository: rL LLVM https://reviews.llvm.org/D41452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D41452: [CodeGen] Fix access sizes in new-format TBAA tags
kosarev created this revision. kosarev added reviewers: rjmccall, hfinkel. kosarev added a project: clang. The new format requires to specify both the type of the access and its size. This patch fixes setting access sizes for TBAA tags that denote accesses to structure members. This fix affects all future TBAA metadata tests for the new format, so I guess we don't need any special tests for this fix. Repository: rL LLVM https://reviews.llvm.org/D41452 Files: lib/CodeGen/CGExpr.cpp Index: lib/CodeGen/CGExpr.cpp === --- lib/CodeGen/CGExpr.cpp +++ lib/CodeGen/CGExpr.cpp @@ -3790,8 +3790,10 @@ FieldTBAAInfo.Offset += Layout.getFieldOffset(field->getFieldIndex()) / CharWidth; -// Update the final access type. +// Update the final access type and size. FieldTBAAInfo.AccessType = CGM.getTBAATypeInfo(FieldType); +FieldTBAAInfo.Size = +getContext().getTypeSizeInChars(FieldType).getQuantity(); } Address addr = base.getAddress(); Index: lib/CodeGen/CGExpr.cpp === --- lib/CodeGen/CGExpr.cpp +++ lib/CodeGen/CGExpr.cpp @@ -3790,8 +3790,10 @@ FieldTBAAInfo.Offset += Layout.getFieldOffset(field->getFieldIndex()) / CharWidth; -// Update the final access type. +// Update the final access type and size. FieldTBAAInfo.AccessType = CGM.getTBAATypeInfo(FieldType); +FieldTBAAInfo.Size = +getContext().getTypeSizeInChars(FieldType).getQuantity(); } Address addr = base.getAddress(); ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits