Deleted Added
full compact
tree-ssa-pre.c (237021) tree-ssa-pre.c (237406)
1/* SSA-PRE for trees.
2 Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
3 Contributed by Daniel Berlin <dan@dberlin.org> and Steven Bosscher
4 <stevenb@suse.de>
5
6This file is part of GCC.
7
8GCC is free software; you can redistribute it and/or modify

--- 1062 unchanged lines hidden (view full) ---

1071 tree newop0;
1072 tree newarglist;
1073 tree newop2 = NULL;
1074 tree oldwalker;
1075 tree newwalker;
1076 tree newexpr;
1077 tree vh = get_value_handle (expr);
1078 bool listchanged = false;
1/* SSA-PRE for trees.
2 Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
3 Contributed by Daniel Berlin <dan@dberlin.org> and Steven Bosscher
4 <stevenb@suse.de>
5
6This file is part of GCC.
7
8GCC is free software; you can redistribute it and/or modify

--- 1062 unchanged lines hidden (view full) ---

1071 tree newop0;
1072 tree newarglist;
1073 tree newop2 = NULL;
1074 tree oldwalker;
1075 tree newwalker;
1076 tree newexpr;
1077 tree vh = get_value_handle (expr);
1078 bool listchanged = false;
1079 bool invariantarg = false;
1079 VEC (tree, gc) *vuses = VALUE_HANDLE_VUSES (vh);
1080 VEC (tree, gc) *tvuses;
1081
1082 /* Call expressions are kind of weird because they have an
1083 argument list. We don't want to value number the list
1084 as one value number, because that doesn't make much
1085 sense, and just breaks the support functions we call,
1086 which expect TREE_OPERAND (call_expr, 2) to be a

--- 42 unchanged lines hidden (view full) ---

1129 return NULL;
1130 newval = phi_translate (find_leader (set, oldval),
1131 set, pred, phiblock);
1132 if (newval == NULL)
1133 return NULL;
1134 if (newval != oldval)
1135 {
1136 listchanged = true;
1080 VEC (tree, gc) *vuses = VALUE_HANDLE_VUSES (vh);
1081 VEC (tree, gc) *tvuses;
1082
1083 /* Call expressions are kind of weird because they have an
1084 argument list. We don't want to value number the list
1085 as one value number, because that doesn't make much
1086 sense, and just breaks the support functions we call,
1087 which expect TREE_OPERAND (call_expr, 2) to be a

--- 42 unchanged lines hidden (view full) ---

1130 return NULL;
1131 newval = phi_translate (find_leader (set, oldval),
1132 set, pred, phiblock);
1133 if (newval == NULL)
1134 return NULL;
1135 if (newval != oldval)
1136 {
1137 listchanged = true;
1138 invariantarg |= is_gimple_min_invariant (newval);
1137 TREE_VALUE (newwalker) = get_value_handle (newval);
1138 }
1139 }
1140 }
1139 TREE_VALUE (newwalker) = get_value_handle (newval);
1140 }
1141 }
1142 }
1143
1144 /* In case of new invariant args we might try to fold the call
1145 again. */
1146 if (invariantarg)
1147 {
1148 tree tmp = fold_ternary (CALL_EXPR, TREE_TYPE (expr),
1149 newop0, newarglist, newop2);
1150 if (tmp)
1151 {
1152 STRIP_TYPE_NOPS (tmp);
1153 if (is_gimple_min_invariant (tmp))
1154 return tmp;
1155 }
1156 }
1157
1141 if (listchanged)
1142 vn_lookup_or_add (newarglist, NULL);
1143
1144 tvuses = translate_vuses_through_block (vuses, pred);
1145
1146 if (listchanged || (newop0 != oldop0) || (oldop2 != newop2)
1147 || vuses != tvuses)
1148 {

--- 2852 unchanged lines hidden ---
1158 if (listchanged)
1159 vn_lookup_or_add (newarglist, NULL);
1160
1161 tvuses = translate_vuses_through_block (vuses, pred);
1162
1163 if (listchanged || (newop0 != oldop0) || (oldop2 != newop2)
1164 || vuses != tvuses)
1165 {

--- 2852 unchanged lines hidden ---