Vladimir Makarov <vmaka...@redhat.com> wrote: > I don't think it will be easy to solve this problem by following reg > pressure. I guess R0 will be in the same pressure reg class. I > believe some hook is an adequate solution here. > >> -- >> * lra-constraints.c (get_equiv): Don't return memory equivalence >> when targetm.cannot_substitute_mem_equiv_p is true. >> * target.def (cannot_substitute_mem_equiv_p): New hook. >> * config/sh/sh.c (sh_cannot_substitute_mem_equiv_p): New function. >> (TARGET_CANNOT_SUBSTITUTE_MEM_EQUIV_P): Define. >> * doc/tm.texi.in (TARGET_CANNOT_SUBSTITUTE_MEM_EQUIV_P): New hook. >> * doc/tm.texi: Regenerate. >> > > LRA part of the patch is ok. I found one typo in "and the speed on > avarage working sets." (average).
Thanks for looking at the patch. I'll commit it with fixing that typo. > But I'd recommend to try different hook implementation checking r0 in > the address as still equiv memory substitution might be profitable for > SH in some cases. I've seen that the equiv substitution improves the code much on other targets. First I've tried hooks which disable only some addressing related r0 usages but they didn't win CSiBE. I'll try another hook implementaion as you suggested. Regards, kaz