Commit Graph

10 Commits

Author SHA1 Message Date
Rafael Espindola c4d672a49d Misc test cleanups.
* tbaa-struct.cpp always has a 64 bit pointer.
* f32:32:32, f64:64:64 and f128:128:128 are defaults, don't assume they are
  printed.

llvm-svn: 197415
2013-12-16 19:53:26 +00:00
Manman Ren 4f755deaf6 TBAA: use the same format for scalar TBAA and struct-path aware TBAA.
An updated version of r191586 with bug fix.

Struct-path aware TBAA generates tags to specify the access path,
while scalar TBAA only generates tags to scalar types.

We should not generate a TBAA tag with null being the first field. When
a TBAA type node is null, the tag should be null too. Make sure we
don't decorate an instruction with a null TBAA tag.

Added a testing case for the bug reported by Richard with -relaxed-aliasing
and -fsanitizer=thread.

llvm-svn: 192145
2013-10-08 00:08:49 +00:00
Richard Smith e4aaac506c Revert r191586 and r191695. They cause crashes when building with
-relaxed-aliasing.

llvm-svn: 191725
2013-10-01 02:20:23 +00:00
Manman Ren 4f04263347 TBAA: use the same format for scalar TBAA and struct-path aware TBAA.
Struct-path aware TBAA generates tags to specify the access path,
while scalar TBAA only generates tags to scalar types.

llvm-svn: 191586
2013-09-27 23:06:41 +00:00
Eli Friedman 2782dacfbc Rewrite record layout for ms_struct structs.
The old implementation of ms_struct in RecordLayoutBuilder was a
complete mess: it depended on complicated conditionals which didn't
really reflect the underlying logic, and placed a burden on users of
the resulting RecordLayout. This commit rips out almost all of the
old code, and replaces it with simple checks in
RecordLayoutBuilder::LayoutBitField.

This commit also fixes <rdar://problem/14252115>, a bug where class
inheritance would cause us to lay out bitfields incorrectly.

llvm-svn: 185018
2013-06-26 20:50:34 +00:00
Manman Ren 4a838160e4 Add triple to tbaa-struct.cpp to appease bots
llvm-svn: 180065
2013-04-22 22:50:27 +00:00
Manman Ren 09a3912b5c TBAA: make sure zero-length bitfield works for tbaa.struct and path-aware tbaa
For ms structs, zero-length bitfields following non-bitfield members are
completely ignored, we should not increase the field index.
Before the fix, we will have an assertion failure.

llvm-svn: 180038
2013-04-22 19:50:07 +00:00
Manman Ren 8aa84081e9 Add more testing cases for tbaa.struct
Testing cases for structs of structs and unions of structs.

llvm-svn: 177612
2013-03-21 00:09:50 +00:00
NAKAMURA Takumi 060cfdc8e9 clang/test/CodeGen/tbaa-struct.cpp: Fix. Be aware of 32 bit pointer.
llvm-svn: 164879
2012-09-29 02:00:04 +00:00
Dan Gohman 22695fcec3 Add basic support for adding !tbaa.struct metadata on llvm.memcpy calls for
struct assignment.

llvm-svn: 164853
2012-09-28 21:58:29 +00:00