summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/tbaa-struct.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [CodeGen] Decorate aggregate accesses with TBAA tagsIvan A. Kosarev2018-01-251-42/+96
| | | | | | Differential Revision: https://reviews.llvm.org/D41539 llvm-svn: 323421
* Change memcpy/memove/memset to have dest and source alignment attributes ↵Daniel Neilson2018-01-191-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | (Step 1). Summary: Upstream LLVM is changing the the prototypes of the @llvm.memcpy/memmove/memset intrinsics. This change updates the Clang tests for this change. The @llvm.memcpy/memmove/memset intrinsics currently have an explicit argument which is required to be a constant integer. It represents the alignment of the dest (and source), and so must be the minimum of the actual alignment of the two. This change removes the alignment argument in favour of placing the alignment attribute on the source and destination pointers of the memory intrinsic call. For example, code which used to read: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %dest, i8* %src, i32 100, i32 4, i1 false) will now read call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %dest, i8* align 4 %src, i32 100, i1 false) At this time the source and destination alignments must be the same (Step 1). Step 2 of the change, to be landed shortly, will relax that contraint and allow the source and destination to have different alignments. llvm-svn: 322964
* Revert "Change memcpy/memset/memmove to have dest and source alignments."Pete Cooper2015-11-191-5/+5
| | | | | | | | | | This reverts commit r253512. This likely broke the bots in: http://lab.llvm.org:8011/builders/clang-ppc64-elf-linux2/builds/20202 http://bb.pgr.jp/builders/clang-3stage-i686-linux/builds/3787 llvm-svn: 253542
* Change memcpy/memset/memmove to have dest and source alignments.Pete Cooper2015-11-181-5/+5
| | | | | | | | | | | | | | | | | | | | | | This is a follow on from a similar LLVM commit: r253511. Note, this was reviewed (and more details are in) http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20151109/312083.html These intrinsics currently have an explicit alignment argument which is required to be a constant integer. It represents the alignment of the source and dest, and so must be the minimum of those. This change allows source and dest to each have their own alignments by using the alignment attribute on their arguments. The alignment argument itself is removed. The only code change to clang is hidden in CGBuilder.h which now passes both dest and source alignment to IRBuilder, instead of taking the minimum of dest and source alignments. Reviewed by Hal Finkel. llvm-svn: 253512
* IR: Make metadata typeless in assembly, clang sideDuncan P. N. Exon Smith2014-12-151-9/+9
| | | | | | Match LLVM changes from r224257. llvm-svn: 224259
* Misc test cleanups.Rafael Espindola2013-12-161-6/+5
| | | | | | | | * 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
* TBAA: use the same format for scalar TBAA and struct-path aware TBAA.Manman Ren2013-10-081-3/+5
| | | | | | | | | | | | | | | | 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
* Revert r191586 and r191695. They cause crashes when building withRichard Smith2013-10-011-5/+3
| | | | | | -relaxed-aliasing. llvm-svn: 191725
* TBAA: use the same format for scalar TBAA and struct-path aware TBAA.Manman Ren2013-09-271-3/+5
| | | | | | | Struct-path aware TBAA generates tags to specify the access path, while scalar TBAA only generates tags to scalar types. llvm-svn: 191586
* Rewrite record layout for ms_struct structs.Eli Friedman2013-06-261-1/+1
| | | | | | | | | | | | | | 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
* Add triple to tbaa-struct.cpp to appease botsManman Ren2013-04-221-1/+1
| | | | llvm-svn: 180065
* TBAA: make sure zero-length bitfield works for tbaa.struct and path-aware tbaaManman Ren2013-04-221-0/+28
| | | | | | | | 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
* Add more testing cases for tbaa.structManman Ren2013-03-211-0/+29
| | | | | | Testing cases for structs of structs and unions of structs. llvm-svn: 177612
* clang/test/CodeGen/tbaa-struct.cpp: Fix. Be aware of 32 bit pointer.NAKAMURA Takumi2012-09-291-1/+2
| | | | llvm-svn: 164879
* Add basic support for adding !tbaa.struct metadata on llvm.memcpy calls forDan Gohman2012-09-281-0/+16
struct assignment. llvm-svn: 164853
OpenPOWER on IntegriCloud