2010-02-23 Julian Brown gcc/ * calls.c (precompute_register_parameters): Avoid generating a register move if optimizing for size. 2010-07-26 Julian Brown Merge from Sourcery G++ 4.4: 2010-02-15 Julian Brown Issue #7486 === modified file 'gcc/calls.c' --- old/gcc/calls.c 2010-04-02 18:54:46 +0000 +++ new/gcc/calls.c 2010-08-13 10:50:45 +0000 @@ -703,7 +703,9 @@ For small register classes, also do this if this call uses register parameters. This is to avoid reload conflicts while - loading the parameters registers. */ + loading the parameters registers. + + Avoid creating the extra move if optimizing for size. */ else if ((! (REG_P (args[i].value) || (GET_CODE (args[i].value) == SUBREG @@ -711,6 +713,7 @@ && args[i].mode != BLKmode && rtx_cost (args[i].value, SET, optimize_insn_for_speed_p ()) > COSTS_N_INSNS (1) + && !optimize_size && ((SMALL_REGISTER_CLASSES && *reg_parm_seen) || optimize)) args[i].value = copy_to_mode_reg (args[i].mode, args[i].value);