Mercurial > hg > CbC > CbC_gcc
comparison gcc/ipa-cp.c @ 47:3bfb6c00c1e0
update it from 4.4.2 to 4.4.3.
author | kent <kent@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 07 Feb 2010 17:44:34 +0900 |
parents | 58ad6c70ea60 |
children | 77e2b8dfacca |
comparison
equal
deleted
inserted
replaced
46:b85a337e5837 | 47:3bfb6c00c1e0 |
---|---|
189 /* Recompute all local information since node might've got new | 189 /* Recompute all local information since node might've got new |
190 direct calls after cloning. */ | 190 direct calls after cloning. */ |
191 static void | 191 static void |
192 ipcp_update_cloned_node (struct cgraph_node *new_node) | 192 ipcp_update_cloned_node (struct cgraph_node *new_node) |
193 { | 193 { |
194 basic_block bb; | |
195 gimple_stmt_iterator gsi; | |
196 | |
194 /* We might've introduced new direct calls. */ | 197 /* We might've introduced new direct calls. */ |
195 push_cfun (DECL_STRUCT_FUNCTION (new_node->decl)); | 198 push_cfun (DECL_STRUCT_FUNCTION (new_node->decl)); |
196 current_function_decl = new_node->decl; | 199 current_function_decl = new_node->decl; |
197 rebuild_cgraph_edges (); | 200 |
201 FOR_EACH_BB (bb) | |
202 for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi)) | |
203 { | |
204 gimple stmt = gsi_stmt (gsi); | |
205 tree decl; | |
206 | |
207 if (is_gimple_call (stmt) | |
208 && (decl = gimple_call_fndecl (stmt)) | |
209 && !cgraph_edge (new_node, stmt)) | |
210 { | |
211 struct cgraph_edge *new_edge; | |
212 | |
213 new_edge = cgraph_create_edge (new_node, cgraph_node (decl), stmt, | |
214 bb->count, | |
215 compute_call_stmt_bb_frequency (bb), | |
216 bb->loop_depth); | |
217 new_edge->indirect_call = 1; | |
218 } | |
219 } | |
198 | 220 |
199 /* Indirect inlinng rely on fact that we've already analyzed | 221 /* Indirect inlinng rely on fact that we've already analyzed |
200 the body.. */ | 222 the body.. */ |
201 if (flag_indirect_inlining) | 223 if (flag_indirect_inlining) |
202 { | 224 { |
958 bitmap_set_bit (args_to_skip, i); | 980 bitmap_set_bit (args_to_skip, i); |
959 } | 981 } |
960 for (cs = node->callers; cs; cs = next) | 982 for (cs = node->callers; cs; cs = next) |
961 { | 983 { |
962 next = cs->next_caller; | 984 next = cs->next_caller; |
963 if (ipcp_node_is_clone (cs->caller) || !ipcp_need_redirect_p (cs)) | 985 if (!cs->indirect_call |
986 && (ipcp_node_is_clone (cs->caller) | |
987 || !ipcp_need_redirect_p (cs))) | |
964 { | 988 { |
965 gimple new_stmt; | 989 gimple new_stmt; |
966 gimple_stmt_iterator gsi; | 990 gimple_stmt_iterator gsi; |
967 | 991 |
968 current_function_decl = cs->caller->decl; | 992 current_function_decl = cs->caller->decl; |