diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-13 14:14:17 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-13 14:14:17 +0000 |
commit | 09eb10edf9eb3f69a4337a4f4793b6f20feea37e (patch) | |
tree | 35daaa9972d65e4f2ede54da386f2214ce5ac3cb /gcc/tree.h | |
parent | 15f3e5412c3859e9a58ce9e5238c24e68f714c1b (diff) | |
download | gcc-09eb10edf9eb3f69a4337a4f4793b6f20feea37e.tar.gz |
2010-06-13 Richard Guenther <rguenther@suse.de>
* lto-streamer-in.c (lto_input_ts_type_tree_pointers):
Do not stream but initialize TYPE_CANONICAL to NULL.
(lto_output_ts_type_tree_pointers): Do not stream TYPE_CANONICAL.
* gimple.c (gimple_types_compatible_p): Disregard
TYPE_STRUCTURAL_EQUALITY_P.
(gimple_register_type): Use TYPE_CANONICAL as cache.
* lto-streamer.c (lto_record_common_node): Zero TYPE_CANONICAL
before registering common types.
* config/i386/i386.c (ix86_function_arg_boundary): Do not
use TYPE_CANONICAL, instead use TYPE_MAIN_VARIANT.
* tree.h (TYPE_CANONICAL): Clarify documentation.
lto/
* lto.c (lto_fixup_type): Do not register or fixup TYPE_CANONICAL.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160679 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/gcc/tree.h b/gcc/tree.h index 683eaea4da9..bd86f44e1e0 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2090,26 +2090,34 @@ extern enum machine_mode vector_type_mode (const_tree); #define SET_TYPE_MODE(NODE, MODE) \ (TYPE_CHECK (NODE)->type.mode = (MODE)) -/* The "canonical" type for this type node, which can be used to - compare the type for equality with another type. If two types are +/* The "canonical" type for this type node, which is used by frontends to + compare the type for equality with another type. If two types are equal (based on the semantics of the language), then they will have equivalent TYPE_CANONICAL entries. - As a special case, if TYPE_CANONICAL is NULL_TREE, then it cannot - be used for comparison against other types. Instead, the type is + As a special case, if TYPE_CANONICAL is NULL_TREE, and thus + TYPE_STRUCTURAL_EQUALITY_P is true, then it cannot + be used for comparison against other types. Instead, the type is said to require structural equality checks, described in - TYPE_STRUCTURAL_EQUALITY_P. */ + TYPE_STRUCTURAL_EQUALITY_P. + + For unqualified aggregate and function types the middle-end relies on + TYPE_CANONICAL to tell whether two variables can be assigned + to each other without a conversion. The middle-end also makes sure + to assign the same alias-sets to the type partition with equal + TYPE_CANONICAL of their unqualified variants. */ #define TYPE_CANONICAL(NODE) (TYPE_CHECK (NODE)->type.canonical) /* Indicates that the type node requires structural equality - checks. The compiler will need to look at the composition of the + checks. The compiler will need to look at the composition of the type to determine whether it is equal to another type, rather than - just comparing canonical type pointers. For instance, we would need + just comparing canonical type pointers. For instance, we would need to look at the return and parameter types of a FUNCTION_TYPE - node. */ + node. */ #define TYPE_STRUCTURAL_EQUALITY_P(NODE) (TYPE_CANONICAL (NODE) == NULL_TREE) /* Sets the TYPE_CANONICAL field to NULL_TREE, indicating that the - type node requires structural equality. */ + type node requires structural equality. */ #define SET_TYPE_STRUCTURAL_EQUALITY(NODE) (TYPE_CANONICAL (NODE) = NULL_TREE) + #define TYPE_LANG_SPECIFIC(NODE) (TYPE_CHECK (NODE)->type.lang_specific) #define TYPE_IBIT(NODE) (GET_MODE_IBIT (TYPE_MODE (NODE))) #define TYPE_FBIT(NODE) (GET_MODE_FBIT (TYPE_MODE (NODE))) |