> H.J. Lu wrote: > > >> * reload.c (struct replacement): Remove SUBREG_LOC member. > > >> (push_reload): Do not set it. > > >> (push_replacement): Likewise. > > >> (subst_reload): Remove dead code. > > >> (copy_replacements): Remove assertion. > > >> (copy_replacements_1): Do not handle SUBREG_LOC. > > >> (move_replacements): Likewise. > > >> (find_replacement): Remove dead code. Use > > >> reload_adjust_reg_for_mode. > > >> Detect subregs via recursive descent instead of via SUBREG_LOC. > > >> > > > > > > It works much better. I am testing it now. > > > > > > > It works. There are no regressions on Linux/ia32 nor Linux/x86-64. > > Can you check it in and mention PR rtl-optimization/49114 ChangeLog? > > OK, I've checked the patch in now. Thanks for testing!
Pat points out that this breaks the build on platforms that do not define LIMIT_RELOAD_CLASS due to a -Werror unused variable warning: /home/gccbuild/gcc_trunk_anonsvn/gcc/gcc/reload.c: In function 'push_reload': /home/gccbuild/gcc_trunk_anonsvn/gcc/gcc/reload.c:926:28: error: variable 'out_subreg_loc' set but not used [-Werror=unused-but-set-variable] /home/gccbuild/gcc_trunk_anonsvn/gcc/gcc/reload.c:926:8: error: variable 'in_subreg_loc' set but not used [-Werror=unused-but-set-variable] Fixed by placing the variable under #ifdef LIMIT_RELOAD_CLASS as well. Committed to mainline. Bye, Ulrich ChangeLog: PR rtl-optimization/49114 * reload.c (push_reload): Define in_subreg_loc and out_subreg_loc only if LIMIT_RELOAD_CLASS to avoid -Werror build breaks. Index: gcc/reload.c =================================================================== *** gcc/reload.c (revision 175631) --- gcc/reload.c (working copy) *************** push_reload (rtx in, rtx out, rtx *inloc *** 923,929 **** --- 923,931 ---- int i; int dont_share = 0; int dont_remove_subreg = 0; + #ifdef LIMIT_RELOAD_CLASS rtx *in_subreg_loc = 0, *out_subreg_loc = 0; + #endif int secondary_in_reload = -1, secondary_out_reload = -1; enum insn_code secondary_in_icode = CODE_FOR_nothing; enum insn_code secondary_out_icode = CODE_FOR_nothing; *************** push_reload (rtx in, rtx out, rtx *inloc *** 1068,1074 **** --- 1070,1078 ---- #endif )) { + #ifdef LIMIT_RELOAD_CLASS in_subreg_loc = inloc; + #endif inloc = &SUBREG_REG (in); in = *inloc; #if ! defined (LOAD_EXTEND_OP) && ! defined (WORD_REGISTER_OPERATIONS) *************** push_reload (rtx in, rtx out, rtx *inloc *** 1163,1169 **** --- 1167,1175 ---- #endif )) { + #ifdef LIMIT_RELOAD_CLASS out_subreg_loc = outloc; + #endif outloc = &SUBREG_REG (out); out = *outloc; #if ! defined (LOAD_EXTEND_OP) && ! defined (WORD_REGISTER_OPERATIONS) -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE ulrich.weig...@de.ibm.com