diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-28 20:32:32 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-28 20:32:32 +0000 |
commit | 644c6d4c1622cda8b9ca8b63e1f3f91de7c920a9 (patch) | |
tree | 27bc737b856ed5e38f37234fa34ae7886bec905b /gcc/gimple.h | |
parent | 9fce640768a4702ae9e94338f6adc802e56b46ec (diff) | |
download | gcc-644c6d4c1622cda8b9ca8b63e1f3f91de7c920a9.tar.gz |
2008-07-28 Richard Guenther <rguenther@suse.de>
PR tree-optimization/36957
* tree-flow.h (tree_ssa_useless_type_conversion): Remove.
(useless_type_conversion_p): Remove.
(types_compatible_p): Remove.
* gimple.h (tree_ssa_useless_type_conversion): Declare.
(useless_type_conversion_p): Declare.
(types_compatible_p): Declare.
(gimple_expr_type): Return the base type only if it is
trivially convertible to the subtype.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@138217 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple.h')
-rw-r--r-- | gcc/gimple.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/gimple.h b/gcc/gimple.h index 744461d7310..0c11f3ebfa7 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -1007,6 +1007,11 @@ extern bool validate_gimple_arglist (const_gimple, ...); /* In tree-ssa-operands.c */ extern void gimple_add_to_addresses_taken (gimple, tree); +/* In tree-ssa.c */ +extern bool tree_ssa_useless_type_conversion (tree); +extern bool useless_type_conversion_p (tree, tree); +extern bool types_compatible_p (tree, tree); + /* Return the code for GIMPLE statement G. */ static inline enum gimple_code @@ -1394,7 +1399,9 @@ gimple_expr_type (const_gimple stmt) convertible to one of its sub-types. So always return the base type here. */ if (INTEGRAL_TYPE_P (type) - && TREE_TYPE (type)) + && TREE_TYPE (type) + /* But only if they are trivially convertible. */ + && useless_type_conversion_p (type, TREE_TYPE (type))) type = TREE_TYPE (type); return type; } |