Mercurial > hg > CbC > CbC_gcc
comparison gcc/postreload-gcse.c @ 55:77e2b8dfacca gcc-4.4.5
update it from 4.4.3 to 4.5.0
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 12 Feb 2010 23:39:51 +0900 |
parents | a06113de4d67 |
children | b7f97abdc517 |
comparison
equal
deleted
inserted
replaced
52:c156f1bd5cd9 | 55:77e2b8dfacca |
---|---|
308 expr_equiv_p (const void *exp1p, const void *exp2p) | 308 expr_equiv_p (const void *exp1p, const void *exp2p) |
309 { | 309 { |
310 const struct expr *const exp1 = (const struct expr *) exp1p; | 310 const struct expr *const exp1 = (const struct expr *) exp1p; |
311 const struct expr *const exp2 = (const struct expr *) exp2p; | 311 const struct expr *const exp2 = (const struct expr *) exp2p; |
312 int equiv_p = exp_equiv_p (exp1->expr, exp2->expr, 0, true); | 312 int equiv_p = exp_equiv_p (exp1->expr, exp2->expr, 0, true); |
313 | 313 |
314 gcc_assert (!equiv_p || exp1->hash == exp2->hash); | 314 gcc_assert (!equiv_p || exp1->hash == exp2->hash); |
315 return equiv_p; | 315 return equiv_p; |
316 } | 316 } |
317 | 317 |
318 | 318 |
347 cur_expr->hash = hash; | 347 cur_expr->hash = hash; |
348 cur_expr->avail_occr = NULL; | 348 cur_expr->avail_occr = NULL; |
349 | 349 |
350 slot = (struct expr **) htab_find_slot_with_hash (expr_table, cur_expr, | 350 slot = (struct expr **) htab_find_slot_with_hash (expr_table, cur_expr, |
351 hash, INSERT); | 351 hash, INSERT); |
352 | 352 |
353 if (! (*slot)) | 353 if (! (*slot)) |
354 /* The expression isn't found, so insert it. */ | 354 /* The expression isn't found, so insert it. */ |
355 *slot = cur_expr; | 355 *slot = cur_expr; |
356 else | 356 else |
357 { | 357 { |
1000 { | 1000 { |
1001 /* Check if the loaded register is not used. */ | 1001 /* Check if the loaded register is not used. */ |
1002 avail_insn = a_occr->insn; | 1002 avail_insn = a_occr->insn; |
1003 avail_reg = get_avail_load_store_reg (avail_insn); | 1003 avail_reg = get_avail_load_store_reg (avail_insn); |
1004 gcc_assert (avail_reg); | 1004 gcc_assert (avail_reg); |
1005 | 1005 |
1006 /* Make sure we can generate a move from register avail_reg to | 1006 /* Make sure we can generate a move from register avail_reg to |
1007 dest. */ | 1007 dest. */ |
1008 extract_insn (gen_move_insn (copy_rtx (dest), | 1008 extract_insn (gen_move_insn (copy_rtx (dest), |
1009 copy_rtx (avail_reg))); | 1009 copy_rtx (avail_reg))); |
1010 if (! constrain_operands (1) | 1010 if (! constrain_operands (1) |
1063 } | 1063 } |
1064 } | 1064 } |
1065 | 1065 |
1066 if (/* No load can be replaced by copy. */ | 1066 if (/* No load can be replaced by copy. */ |
1067 npred_ok == 0 | 1067 npred_ok == 0 |
1068 /* Prevent exploding the code. */ | 1068 /* Prevent exploding the code. */ |
1069 || (optimize_bb_for_size_p (bb) && npred_ok > 1) | 1069 || (optimize_bb_for_size_p (bb) && npred_ok > 1) |
1070 /* If we don't have profile information we cannot tell if splitting | 1070 /* If we don't have profile information we cannot tell if splitting |
1071 a critical edge is profitable or not so don't do it. */ | 1071 a critical edge is profitable or not so don't do it. */ |
1072 || ((! profile_info || ! flag_branch_probabilities | 1072 || ((! profile_info || ! flag_branch_probabilities |
1073 || targetm.cannot_modify_jumps_p ()) | 1073 || targetm.cannot_modify_jumps_p ()) |
1074 && critical_edge_split)) | 1074 && critical_edge_split)) |
1075 goto cleanup; | 1075 goto cleanup; |
1293 fprintf (dump_file, "moves inserted: %d\n", stats.moves_inserted); | 1293 fprintf (dump_file, "moves inserted: %d\n", stats.moves_inserted); |
1294 fprintf (dump_file, "insns deleted: %d\n", stats.insns_deleted); | 1294 fprintf (dump_file, "insns deleted: %d\n", stats.insns_deleted); |
1295 fprintf (dump_file, "\n\n"); | 1295 fprintf (dump_file, "\n\n"); |
1296 } | 1296 } |
1297 } | 1297 } |
1298 | 1298 |
1299 /* We are finished with alias. */ | 1299 /* We are finished with alias. */ |
1300 end_alias_analysis (); | 1300 end_alias_analysis (); |
1301 | 1301 |
1302 free_mem (); | 1302 free_mem (); |
1303 } | 1303 } |