]> granicus.if.org Git - clang/commit
TBAA: use the same format for scalar TBAA and struct-path aware TBAA.
authorManman Ren <manman.ren@gmail.com>
Tue, 8 Oct 2013 00:08:49 +0000 (00:08 +0000)
committerManman Ren <manman.ren@gmail.com>
Tue, 8 Oct 2013 00:08:49 +0000 (00:08 +0000)
commitfeba9f2bdc5711894e452dfc67c9679482fbf897
tree660d41e858c1f03e8f89d43b4a205c7cac4a5952
parentaeb87e7ef327905ba1abba879076e9577a2090c4
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192145 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/CodeGenTBAA.cpp
test/CodeGen/may-alias.c
test/CodeGen/tbaa-class.cpp
test/CodeGen/tbaa-for-vptr.cpp
test/CodeGen/tbaa-struct.cpp
test/CodeGen/tbaa-thread-sanitizer.cpp [new file with mode: 0644]
test/CodeGen/tbaa.cpp