llvm-project/clang/lib
Ivan A. Kosarev 383890bad4 Refine generation of TBAA information in clang
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
2017-10-06 08:17:48 +00:00
..
ARCMigrate Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC. 2017-06-03 06:23:19 +00:00
AST [ExprConstant] Allow constexpr ctor to modify non static data members 2017-10-04 00:18:55 +00:00
ASTMatchers Add objcImplementationDecl matcher 2017-09-10 21:00:15 +00:00
Analysis [Analyzer] Avoid copy and modifying passed reference in BodyFarm::create_call_once 2017-10-02 21:01:46 +00:00
Basic [OpenMP] Initial implementation of teams distribute code generation 2017-10-04 14:12:09 +00:00
CodeGen Refine generation of TBAA information in clang 2017-10-06 08:17:48 +00:00
CrossTU Fix implicit-fallthrough warning by adding missing break 2017-09-24 15:17:46 +00:00
Driver Cleanup and generalize -shared-libasan. 2017-10-05 20:14:00 +00:00
Edit [clang] Fix format specifiers fixits for nested macros 2017-06-20 20:46:58 +00:00
Format [clang-format] Fix regression about short functions after #else 2017-10-02 15:53:37 +00:00
Frontend Revert "Add /System/Library/PrivateFrameworks as a header search path." 2017-10-02 18:22:19 +00:00
FrontendTool Update after LLVM change r309087 2017-07-26 09:10:17 +00:00
Headers [CUDA] Fix name of __activemask() 2017-10-02 17:50:11 +00:00
Index [index] Generate class & metaclass manglings for objc 2017-09-22 16:58:57 +00:00
Lex Add parens around the boolean condition of one of the added asserts in r314747 ... 2017-10-03 01:33:36 +00:00
Parse [OPENMP] Allow use of declare target directive inside struct 2017-10-03 20:00:00 +00:00
Rewrite [Analyzer] Add support for displaying cross-file diagnostic paths in HTML output 2017-08-03 18:12:22 +00:00
Sema For dllexport class templates, export specializations of member functions (PR34849) 2017-10-05 21:45:27 +00:00
Serialization PR33924: Merge block-scope anonymous declarations if there are multiple definitions of the enclosing function. 2017-10-05 00:47:24 +00:00
StaticAnalyzer [analyzer] Fix leak false positives on stuff put in C++/ObjC initializer lists. 2017-10-05 08:43:32 +00:00
Tooling [refactor] Simplify the refactoring interface 2017-10-02 18:42:43 +00:00
CMakeLists.txt Add Cross Translation Unit support library 2017-09-22 11:11:01 +00:00