aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2011-11-03 14:53:29 +0100
committerMartin Jambor <jamborm@gcc.gnu.org>2011-11-03 14:53:29 +0100
commit290ebcb77f6fb6033d3aa1ed3c8807cb86a30c6f (patch)
treee661722751a83456ce47c31c36a8cf188d06b2aa /gcc/tree.h
parent969d578c2df1fd86ad6a29347ddbaa8ff248df75 (diff)
downloadgcc-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.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 5dc1798..00b6637 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -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)