-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I had pulled the patch for 37273 during the 4.6 cycle due to exposing several latent problems. I've just reinstalled it and will (of course) keep an eye out for any problems. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJNgmqWAAoJEBRtltQi2kC7rgQH/3IyYYayg+H52UrzyVjG4M4Z p4bIaLrAcHwDc0iYQAQyo3+bnBHK9b8ZDaw6fnAJAOmwbLSqSBy3ensHdxylZseM fJ7e579XfL9DQjdJvoAR70LTVvgqqyAMWqSjZ8Q/1SrXTqLVLcSB/D5y+leN21Bf jYwoS+GKzOV2FHH890AYkRcE4wY33zOB5XLIYOt/WWTju/I3DVCypA0zbvyk7ylv FONAsOdFPnqEn3f+0ZkkS3VpaLFHYvOPqnKGo34Iy3wUjUnk7K3iTAtb9HzAf01V ls1ijzpjW/aJrjbv+NsC2vHtAWP5lpSNrjzcrrhaDEBs+jer0v857e3vnUJ3jSI= =WVh4 -----END PGP SIGNATURE-----
Index: ira-costs.c =================================================================== *** ira-costs.c (revision 171110) --- ira-costs.c (working copy) *************** *** 1,5 **** /* IRA hard register and memory cost calculation for allocnos or pseudos. ! Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. Contributed by Vladimir Makarov <vmaka...@redhat.com>. --- 1,5 ---- /* IRA hard register and memory cost calculation for allocnos or pseudos. ! Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Contributed by Vladimir Makarov <vmaka...@redhat.com>. *************** scan_one_insn (rtx insn) *** 1009,1014 **** --- 1009,1015 ---- enum rtx_code pat_code; rtx set, note; int i, k; + bool counted_mem; if (!NONDEBUG_INSN_P (insn)) return insn; *************** scan_one_insn (rtx insn) *** 1018,1032 **** || pat_code == ADDR_VEC || pat_code == ADDR_DIFF_VEC) return insn; set = single_set (insn); extract_insn (insn); /* If this insn loads a parameter from its stack slot, then it represents a savings, rather than a cost, if the parameter is ! stored in memory. Record this fact. */ if (set != 0 && REG_P (SET_DEST (set)) && MEM_P (SET_SRC (set)) && (note = find_reg_note (insn, REG_EQUIV, NULL_RTX)) != NULL_RTX ! && MEM_P (XEXP (note, 0))) { enum reg_class cl = GENERAL_REGS; rtx reg = SET_DEST (set); --- 1019,1041 ---- || pat_code == ADDR_VEC || pat_code == ADDR_DIFF_VEC) return insn; + counted_mem = false; set = single_set (insn); extract_insn (insn); /* If this insn loads a parameter from its stack slot, then it represents a savings, rather than a cost, if the parameter is ! stored in memory. Record this fact. ! ! Similarly if we're loading other constants from memory (constant ! pool, TOC references, small data areas, etc) and this is the only ! assignment to the destination pseudo. */ if (set != 0 && REG_P (SET_DEST (set)) && MEM_P (SET_SRC (set)) && (note = find_reg_note (insn, REG_EQUIV, NULL_RTX)) != NULL_RTX ! && ((MEM_P (XEXP (note, 0))) ! || (CONSTANT_P (XEXP (note, 0)) ! && LEGITIMATE_CONSTANT_P (XEXP (note, 0)) ! && REG_N_SETS (REGNO (SET_DEST (set))) == 1))) { enum reg_class cl = GENERAL_REGS; rtx reg = SET_DEST (set); *************** scan_one_insn (rtx insn) *** 1038,1043 **** --- 1047,1053 ---- -= ira_memory_move_cost[GET_MODE (reg)][cl][1] * frequency; record_address_regs (GET_MODE (SET_SRC (set)), XEXP (SET_SRC (set), 0), 0, MEM, SCRATCH, frequency * 2); + counted_mem = true; } record_operand_costs (insn, pref); *************** scan_one_insn (rtx insn) *** 1052,1058 **** struct costs *p = COSTS (costs, COST_INDEX (regno)); struct costs *q = op_costs[i]; ! p->mem_cost += q->mem_cost; for (k = 0; k < cost_classes_num; k++) p->cost[k] += q->cost[k]; } --- 1062,1071 ---- struct costs *p = COSTS (costs, COST_INDEX (regno)); struct costs *q = op_costs[i]; ! /* If the already accounted for the memory "cost" above, don't ! do so again. */ ! if (!counted_mem) ! p->mem_cost += q->mem_cost; for (k = 0; k < cost_classes_num; k++) p->cost[k] += q->cost[k]; }