diff options
author | Martin Jambor <mjambor@suse.cz> | 2011-11-03 14:53:29 +0100 |
---|---|---|
committer | Martin Jambor <jamborm@gcc.gnu.org> | 2011-11-03 14:53:29 +0100 |
commit | 290ebcb77f6fb6033d3aa1ed3c8807cb86a30c6f (patch) | |
tree | e661722751a83456ce47c31c36a8cf188d06b2aa /gcc/tree.h | |
parent | 969d578c2df1fd86ad6a29347ddbaa8ff248df75 (diff) | |
download | gcc-290ebcb77f6fb6033d3aa1ed3c8807cb86a30c6f.zip gcc-290ebcb77f6fb6033d3aa1ed3c8807cb86a30c6f.tar.gz gcc-290ebcb77f6fb6033d3aa1ed3c8807cb86a30c6f.tar.bz2 |
ipa-prop.c (type_change_info): New fields offset, object, known_current_type and multiple_types_encountered.
2011-11-03 Martin Jambor <mjambor@suse.cz>
* ipa-prop.c (type_change_info): New fields offset, object,
known_current_type and multiple_types_encountered.
(extr_type_from_vtbl_ptr_store): New function.
(check_stmt_for_type_change): Use it, set multiple_types_encountered if
the result is different from the previous one.
(detect_type_change): Renamed to detect_type_change_1. New parameter
comp_type. Set up new fields in tci, build known type jump
functions if the new type can be identified.
(detect_type_change): New function.
* tree.h (DECL_CONTEXT): Comment new use.
* testsuite/g++.dg/ipa/devirt-c-1.C: Add dump scans.
* testsuite/g++.dg/ipa/devirt-c-2.C: Likewise.
* testsuite/g++.dg/ipa/devirt-c-7.C: New test.
* testsuite/g++.dg/ipa/devirt-c-8.C: Likewise.
From-SVN: r180825
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2686,7 +2686,9 @@ struct function; nodes, this points to either the FUNCTION_DECL for the containing function, the RECORD_TYPE or UNION_TYPE for the containing type, or NULL_TREE or a TRANSLATION_UNIT_DECL if the given decl has "file - scope". */ + scope". In particular, for VAR_DECLs which are virtual table pointers + (they have DECL_VIRTUAL set), we use DECL_CONTEXT to determine the type + they belong to. */ #define DECL_CONTEXT(NODE) (DECL_MINIMAL_CHECK (NODE)->decl_minimal.context) #define DECL_FIELD_CONTEXT(NODE) \ (FIELD_DECL_CHECK (NODE)->decl_minimal.context) |