On Wed, Jul 12, 2023 at 5:14 PM Jeff Law <jeffreya...@gmail.com> wrote: > > > > On 7/12/23 03:12, Manolis Tsamis wrote: > > On Mon, Jul 10, 2023 at 12:58 AM Hans-Peter Nilsson <h...@bitrange.com> > > wrote: > >> > >> On Sun, 9 Jul 2023, Hans-Peter Nilsson wrote: > >> > >>> On Thu, 15 Jun 2023, Manolis Tsamis wrote: > >>> > >>>> This is a new RTL pass that tries to optimize memory offset calculations > >>>> by moving them from add immediate instructions to the memory > >>>> loads/stores. > >> > >>> It punts on all "use" insns that are not SET. > >>> Why not use single_set there too? > >> > >> Also, I don't see insn costs considered? > >> (Also: typo "immidiate".) > >> > > > > The only change that this pass does is to change offsets where > > possible and then simplify add immediate instructions to register > > moves. > > I don't see how this could result in worse performance and by > > extension I don't see where insn costs could be used. > > Do you have any thoughts about where to use the costs? > If the offset crosses an architectural size boundary such that the > instruction was longer, but still valid, it could affect the cost. > Ok, I haven't thought about that. I will try a prototype in case we want to include it in a next iteration of this.
> That's the most obvious case to me. There may be others. > > Any progress on that m68k issue? I've also got a report of x264 failing > to build on riscv64 with the V2 variant, but I haven't distilled that > down to a testcase yet. > I have sent a V3 which contains a number of fixes and improvements: https://gcc.gnu.org/pipermail/gcc-patches/2023-July/624439.html I tested the new version rebased on master and the m68k issue did not reproduce. I don't know what exactly fixed it; do we need to know why or is it enough that the issue is gone following some general fixes? It is highly possible that this also fixes the x264 failure. Please let me know if the issue persists with v3 once you're able to test. Manolis > jeff