Re: [PATCH 1/2] Implementation of new RISCV optimizations pass: fold-mem-offsets.

2023-06-15 Thread Manolis Tsamis
The new target-independant implementation of fold-mem-offsets pass can be found in the list (link is https://gcc.gnu.org/pipermail/gcc-patches/2023-June/621920.html) Aside from now being target independent, I have fixed a number of new bugs that emerged when running this on other targets and a min

Re: [PATCH 1/2] Implementation of new RISCV optimizations pass: fold-mem-offsets.

2023-06-12 Thread Jeff Law via Gcc-patches
On 6/12/23 01:32, Manolis Tsamis wrote: + for (ref_link = ref_chain; ref_link; ref_link = ref_link->next) +{ + /* Problem getting some definition for this instruction. */ + if (ref_link->ref == NULL) + return NULL; + if (DF_REF_INSN_INFO (ref_link->ref) == NULL) +

Re: [PATCH 1/2] Implementation of new RISCV optimizations pass: fold-mem-offsets.

2023-06-12 Thread Jeff Law via Gcc-patches
On 6/12/23 01:41, Manolis Tsamis wrote: I also think that's where this should end up since most of the pass is target independent anyway. I just couldn't figure out what would be a proper way to model the propagation rules for each target. Is a target hook necessary for that? No hook should

Re: [PATCH 1/2] Implementation of new RISCV optimizations pass: fold-mem-offsets.

2023-06-12 Thread Jeff Law via Gcc-patches
On 6/12/23 01:36, Manolis Tsamis wrote: Even if late, one question for the dynamic instruction numbers. Was this measured just with f-m-o or with the stack pointer fold patch applied too? I remember I was getting better improvements in the past, but most of the cases had to do with the sta

Re: [PATCH 1/2] Implementation of new RISCV optimizations pass: fold-mem-offsets.

2023-06-12 Thread Manolis Tsamis
On Sat, Jun 10, 2023 at 6:49 PM Jeff Law wrote: > > > > On 5/25/23 06:35, Manolis Tsamis wrote: > > Implementation of the new RISC-V optimization pass for memory offset > > calculations, documentation and testcases. > > > > gcc/ChangeLog: > > > > * config.gcc: Add riscv-fold-mem-offsets.o to

Re: [PATCH 1/2] Implementation of new RISCV optimizations pass: fold-mem-offsets.

2023-06-12 Thread Manolis Tsamis
On Thu, Jun 8, 2023 at 8:37 AM Jeff Law wrote: > > > > On 5/25/23 06:35, Manolis Tsamis wrote: > > Implementation of the new RISC-V optimization pass for memory offset > > calculations, documentation and testcases. > > > > gcc/ChangeLog: > > > > * config.gcc: Add riscv-fold-mem-offsets.o to

Re: [PATCH 1/2] Implementation of new RISCV optimizations pass: fold-mem-offsets.

2023-06-12 Thread Manolis Tsamis
On Fri, Jun 9, 2023 at 3:57 AM Jeff Law wrote: > > > > On 5/25/23 06:35, Manolis Tsamis wrote: > > Implementation of the new RISC-V optimization pass for memory offset > > calculations, documentation and testcases. > > > > gcc/ChangeLog: > > > > * config.gcc: Add riscv-fold-mem-offsets.o to

Re: [PATCH 1/2] Implementation of new RISCV optimizations pass: fold-mem-offsets.

2023-06-10 Thread Jeff Law via Gcc-patches
On 5/25/23 06:35, Manolis Tsamis wrote: Implementation of the new RISC-V optimization pass for memory offset calculations, documentation and testcases. gcc/ChangeLog: * config.gcc: Add riscv-fold-mem-offsets.o to extra_objs. * config/riscv/riscv-passes.def (INSERT_PASS_AFTER)

Re: [PATCH 1/2] Implementation of new RISCV optimizations pass: fold-mem-offsets.

2023-06-08 Thread Jeff Law via Gcc-patches
On 5/25/23 06:35, Manolis Tsamis wrote: Implementation of the new RISC-V optimization pass for memory offset calculations, documentation and testcases. gcc/ChangeLog: * config.gcc: Add riscv-fold-mem-offsets.o to extra_objs. * config/riscv/riscv-passes.def (INSERT_PASS_AFTER)

Re: [PATCH 1/2] Implementation of new RISCV optimizations pass: fold-mem-offsets.

2023-06-07 Thread Jeff Law via Gcc-patches
On 5/25/23 06:35, Manolis Tsamis wrote: Implementation of the new RISC-V optimization pass for memory offset calculations, documentation and testcases. gcc/ChangeLog: * config.gcc: Add riscv-fold-mem-offsets.o to extra_objs. * config/riscv/riscv-passes.def (INSERT_PASS_AFTER)

Re: [PATCH 1/2] Implementation of new RISCV optimizations pass: fold-mem-offsets.

2023-05-31 Thread Jeff Law via Gcc-patches
On 5/31/23 06:19, Manolis Tsamis wrote: On Tue, May 30, 2023 at 2:30 AM Jeff Law wrote: On 5/25/23 08:02, Manolis Tsamis wrote: On Thu, May 25, 2023 at 4:53 PM Richard Biener via Gcc-patches wrote: On Thu, May 25, 2023 at 3:32 PM Jeff Law via Gcc-patches wrote: On 5/25/23 07:01,

Re: [PATCH 1/2] Implementation of new RISCV optimizations pass: fold-mem-offsets.

2023-05-31 Thread Manolis Tsamis
On Tue, May 30, 2023 at 2:30 AM Jeff Law wrote: > > > > On 5/25/23 08:02, Manolis Tsamis wrote: > > On Thu, May 25, 2023 at 4:53 PM Richard Biener via Gcc-patches > > wrote: > >> > >> On Thu, May 25, 2023 at 3:32 PM Jeff Law via Gcc-patches > >> wrote: > >>> > >>> > >>> > >>> On 5/25/23 07:01, R

Re: [PATCH 1/2] Implementation of new RISCV optimizations pass: fold-mem-offsets.

2023-05-29 Thread Jeff Law via Gcc-patches
On 5/25/23 08:02, Manolis Tsamis wrote: On Thu, May 25, 2023 at 4:53 PM Richard Biener via Gcc-patches wrote: On Thu, May 25, 2023 at 3:32 PM Jeff Law via Gcc-patches wrote: On 5/25/23 07:01, Richard Biener via Gcc-patches wrote: On Thu, May 25, 2023 at 2:36 PM Manolis Tsamis wrote:

Re: [PATCH 1/2] Implementation of new RISCV optimizations pass: fold-mem-offsets.

2023-05-25 Thread Philipp Tomsich
On Thu, 25 May 2023 at 16:14, Jeff Law via Gcc-patches wrote: > > > > On 5/25/23 07:50, Richard Biener wrote: > > On Thu, May 25, 2023 at 3:32 PM Jeff Law via Gcc-patches > > wrote: > >> > >> > >> > >> On 5/25/23 07:01, Richard Biener via Gcc-patches wrote: > >>> On Thu, May 25, 2023 at 2:36 PM M

Re: [PATCH 1/2] Implementation of new RISCV optimizations pass: fold-mem-offsets.

2023-05-25 Thread Jeff Law via Gcc-patches
On 5/25/23 07:50, Richard Biener wrote: On Thu, May 25, 2023 at 3:32 PM Jeff Law via Gcc-patches wrote: On 5/25/23 07:01, Richard Biener via Gcc-patches wrote: On Thu, May 25, 2023 at 2:36 PM Manolis Tsamis wrote: Implementation of the new RISC-V optimization pass for memory offset ca

Re: [PATCH 1/2] Implementation of new RISCV optimizations pass: fold-mem-offsets.

2023-05-25 Thread Manolis Tsamis
On Thu, May 25, 2023 at 4:53 PM Richard Biener via Gcc-patches wrote: > > On Thu, May 25, 2023 at 3:32 PM Jeff Law via Gcc-patches > wrote: > > > > > > > > On 5/25/23 07:01, Richard Biener via Gcc-patches wrote: > > > On Thu, May 25, 2023 at 2:36 PM Manolis Tsamis > > > wrote: > > >> > > >> Imp

Re: [PATCH 1/2] Implementation of new RISCV optimizations pass: fold-mem-offsets.

2023-05-25 Thread Richard Biener via Gcc-patches
On Thu, May 25, 2023 at 3:32 PM Jeff Law via Gcc-patches wrote: > > > > On 5/25/23 07:01, Richard Biener via Gcc-patches wrote: > > On Thu, May 25, 2023 at 2:36 PM Manolis Tsamis > > wrote: > >> > >> Implementation of the new RISC-V optimization pass for memory offset > >> calculations, document

Re: [PATCH 1/2] Implementation of new RISCV optimizations pass: fold-mem-offsets.

2023-05-25 Thread Jeff Law via Gcc-patches
On 5/25/23 07:01, Richard Biener via Gcc-patches wrote: On Thu, May 25, 2023 at 2:36 PM Manolis Tsamis wrote: Implementation of the new RISC-V optimization pass for memory offset calculations, documentation and testcases. Why do fwprop or combine not what you want to do? I think a lot of

Re: [PATCH 1/2] Implementation of new RISCV optimizations pass: fold-mem-offsets.

2023-05-25 Thread Manolis Tsamis
On Thu, May 25, 2023 at 4:03 PM Richard Biener wrote: > > On Thu, May 25, 2023 at 2:36 PM Manolis Tsamis > wrote: > > > > Implementation of the new RISC-V optimization pass for memory offset > > calculations, documentation and testcases. > > Why do fwprop or combine not what you want to do? > H

Re: [PATCH 1/2] Implementation of new RISCV optimizations pass: fold-mem-offsets.

2023-05-25 Thread Richard Biener via Gcc-patches
On Thu, May 25, 2023 at 2:36 PM Manolis Tsamis wrote: > > Implementation of the new RISC-V optimization pass for memory offset > calculations, documentation and testcases. Why do fwprop or combine not what you want to do? > gcc/ChangeLog: > > * config.gcc: Add riscv-fold-mem-offsets.o to