summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/tbaa-for-vptr.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Clang] Disable new PM for tests that use optimization level -O1, -O2 and -O3Petr Hosek2019-06-051-5/+5
| | | | | | | | | | Tests that use -O1, -O2 and -O3 would often produce different results with the new pass manager which makes these tests fail. Disable new PM explicitly for these tests. Differential Revision: https://reviews.llvm.org/D58375 llvm-svn: 362580
* Update existed CodeGen TBAA testsDanil Malyshev2018-05-011-5/+11
| | | | | | | | | | Reviewers: hfinkel, kosarev, rjmccall Reviewed By: rjmccall Differential Revision: https://reviews.llvm.org/D44616 llvm-svn: 331292
* Refine generation of TBAA information in clangIvan A. Kosarev2017-10-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is an attempt to clarify and simplify generation and propagation of TBAA information. The idea is to pack all values that describe a memory access, namely, base type, access type and offset, into a single structure. This is supposed to make further changes, such as adding support for unions and array members, easier to prepare and review. DecorateInstructionWithTBAA() is no more responsible for converting types to tags. These implicit conversions not only complicate reading the code, but also suggest assigning scalar access tags while we generally prefer full-size struct-path tags. TBAAPathTag is replaced with TBAAAccessInfo; the latter is now the type of the keys of the cache map that translates access descriptors to metadata nodes. Fixed a bug with writing to a wrong map in getTBAABaseTypeMetadata() (former getTBAAStructTypeInfo()). We now check for valid base access types every time we dereference a field. The original code only checks the top-level base type. See isValidBaseType() / isTBAAPathStruct() calls. Some entities have been renamed to sound more adequate and less confusing/misleading in presence of path-aware TBAA information. Now we do not lookup twice for the same cache entry in getAccessTagInfo(). Refined relevant comments and descriptions. Differential Revision: https://reviews.llvm.org/D37826 llvm-svn: 315048
* [PR26550] Use a different TBAA root for C++ vs C.Manman Ren2016-02-111-1/+1
| | | | | | | | | | | | | | | | | | | This commit changes the root from "Simple C/C++ TBAA" to "Simple C++ TBAA" for C++. The problem is that the type name in the TBAA nodes is generated differently for C vs C++. If we link an IR file for C with an IR file for C++, since they have the same root and the type names are different, accesses to the two type nodes will be considered no-alias, even though the two type nodes are from the same type in a header file. The fix is to use different roots for C and C++. Types from C will be treated conservatively in respect to types from C++. Follow-up commits will change the C root to "Simple C TBAA" plus some mangling change for C types to make it a little more aggresive. llvm-svn: 260567
* IR: Make metadata typeless in assembly, clang sideDuncan P. N. Exon Smith2014-12-151-3/+3
| | | | | | Match LLVM changes from r224257. llvm-svn: 224259
* Kill -faddress-sanitizer, -fthread-sanitizer and -fcatch-undefined-behavior ↵Alexey Samsonov2014-03-201-1/+1
| | | | | | | | | flags. These flags are deprecated since at least Clang 3.3. Users should instead use -fsanitize= with appropriate values. llvm-svn: 204330
* PR19113: Emit 'vtable' TBAA metadata when loading a vptr in a ↵Richard Smith2014-03-121-1/+8
| | | | | | pointer-to-member-function call. llvm-svn: 203691
* Remove the -cxx-abi command-line flag.Hans Wennborg2014-01-141-5/+5
| | | | | | | | | | | | | | | This makes the C++ ABI depend entirely on the target: MS ABI for -win32 triples, Itanium otherwise. It's no longer possible to do weird combinations. To be able to run a test with a specific ABI without constraining it to a specific triple, new substitutions are added to lit: %itanium_abi_triple and %ms_abi_triple can be used to get the current target triple adjusted to the desired ABI. For example, if the test suite is running with the i686-pc-win32 target, %itanium_abi_triple will expand to i686-pc-mingw32. Differential Revision: http://llvm-reviews.chandlerc.com/D2545 llvm-svn: 199250
* Update tests in preparation for using the MS ABI for Win32 targetsHans Wennborg2014-01-131-5/+5
| | | | | | | | | | In preparation for making the Win32 triple imply MS ABI mode, make all tests pass in this mode, or make them use the Itanium mode explicitly. Differential Revision: http://llvm-reviews.chandlerc.com/D2401 llvm-svn: 199130
* TBAA: use the same format for scalar TBAA and struct-path aware TBAA.Manman Ren2013-10-081-1/+2
| | | | | | | | | | | | | | | | 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-2/+1
| | | | | | -relaxed-aliasing. llvm-svn: 191725
* TBAA: use the same format for scalar TBAA and struct-path aware TBAA.Manman Ren2013-09-271-1/+2
| | | | | | | Struct-path aware TBAA generates tags to specify the access path, while scalar TBAA only generates tags to scalar types. llvm-svn: 191586
* Don't pass -O0 to clang_cc1, it is the default.Rafael Espindola2013-09-041-2/+2
| | | | llvm-svn: 189910
* Use the individual -fsanitize=<...> arguments to control which of the UBSanRichard Smith2012-11-051-2/+2
| | | | | | | checks to enable. Remove frontend support for -fcatch-undefined-behavior, -faddress-sanitizer and -fthread-sanitizer now that they don't do anything. llvm-svn: 167413
* fix test/CodeGen/tbaa-for-vptr.cpp: don't hardcode the index of metadataKostya Serebryany2012-10-011-3/+3
| | | | llvm-svn: 164928
* enable TBAA when -fthread-sanitizer is given, even with -O0 or ↵Kostya Serebryany2012-04-241-2/+10
| | | | | | -relaxed-aliasing llvm-svn: 155430
* Use MDBuilder to help with metadata creation.Duncan Sands2012-04-151-1/+1
| | | | llvm-svn: 154767
* [tests] Fix test failure in release mode.Daniel Dunbar2012-03-261-1/+1
| | | | llvm-svn: 153460
* add tbaa metadata to vtable pointer loads/storesKostya Serebryany2012-03-261-0/+19
llvm-svn: 153447
OpenPOWER on IntegriCloud