diff options
| author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-07-05 21:21:10 +0000 |
|---|---|---|
| committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-07-05 21:21:10 +0000 |
| commit | 73bb980c6811a3fca154b58f1a66e793ba15622d (patch) | |
| tree | b8b99cf6b54105440df3df5219090d25018ce180 | |
| parent | 9debde43309405086d179b84b7b1aca9c06ea0b1 (diff) | |
| download | ppe42-gcc-73bb980c6811a3fca154b58f1a66e793ba15622d.tar.gz ppe42-gcc-73bb980c6811a3fca154b58f1a66e793ba15622d.zip | |
2007-07-05 Richard Guenther <rguenther@suse.de>
PR middle-end/32639
* alias.c (get_alias_set): Tread METHOD_TYPE the same as
FUNCTION_TYPE.
* tree-ssa.c (useless_type_conversion_p): Check canonical
types early.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126389 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 8 | ||||
| -rw-r--r-- | gcc/alias.c | 3 | ||||
| -rw-r--r-- | gcc/tree-ssa.c | 10 |
3 files changed, 15 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f661697718f..5a55a9cca84 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2007-07-05 Richard Guenther <rguenther@suse.de> + + PR middle-end/32639 + * alias.c (get_alias_set): Tread METHOD_TYPE the same as + FUNCTION_TYPE. + * tree-ssa.c (useless_type_conversion_p): Check canonical + types early. + 2007-07-05 Anatoly Sokolov <aesok@post.ru> * config/avr/avr.md (zero_extendqihi2, zero_extendqisi2, diff --git a/gcc/alias.c b/gcc/alias.c index 7c258c7470e..a47e2916a46 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -620,7 +620,8 @@ get_alias_set (tree t) /* There are no objects of FUNCTION_TYPE, so there's no point in using up an alias set for them. (There are, of course, pointers and references to functions, but that's different.) */ - else if (TREE_CODE (t) == FUNCTION_TYPE) + else if (TREE_CODE (t) == FUNCTION_TYPE + || TREE_CODE (t) == METHOD_TYPE) set = 0; /* Unless the language specifies otherwise, let vector types alias diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index 005d3fdcbdd..5e166525883 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -920,6 +920,11 @@ useless_type_conversion_p (tree outer_type, tree inner_type) if (inner_type == outer_type) return true; + /* If we know the canonical types, compare them. */ + if (TYPE_CANONICAL (inner_type) + && TYPE_CANONICAL (inner_type) == TYPE_CANONICAL (outer_type)) + return true; + /* Changes in machine mode are never useless conversions. */ if (TYPE_MODE (inner_type) != TYPE_MODE (outer_type)) return false; @@ -1029,11 +1034,6 @@ useless_type_conversion_p (tree outer_type, tree inner_type) if (TREE_CODE (inner_type) != TREE_CODE (outer_type)) return false; - /* If we know the canonical types, compare them. */ - if (TYPE_CANONICAL (inner_type) - && TYPE_CANONICAL (inner_type) == TYPE_CANONICAL (outer_type)) - return true; - /* ??? Add structural equivalence check. */ /* ??? This should eventually just return false. */ |

