Re: [PATCH] [arm] Implement Armv8.1-M low overhead loops

2020-02-25 Thread Andrea Corallo
Hi all, Third version of the patch here addressing comments. This patch enables the Armv8.1-M Mainline LOB (low overhead branch) extension low overhead loops (LOL) feature by using the 'loop-doloop' pass. Given the following function: void loop (int *a) { for (int i = 0; i < 1000; i++) a[

Re: [PATCH] [arm] Implement Armv8.1-M low overhead loops

2020-02-24 Thread Andrea Corallo
Hi Roman, Roman Zhuykov writes: >> SMS is disabled in tests not to break them when SMS does loop versioning. > > And I'm not really sure about this.  First of all, there are a lot of > scan-assembler-times tests which fail when modulo-scheduler is enabled, > probably the same happens when some u

Re: [PATCH] [arm] Implement Armv8.1-M low overhead loops

2020-02-21 Thread Kyrill Tkachov
Hi Roman, On 2/21/20 3:49 PM, Roman Zhuykov wrote: 11.02.2020 14:00, Richard Earnshaw (lists) wrote: +(define_insn "*doloop_end" +  [(parallel [(set (pc) +   (if_then_else +   (ne (reg:SI LR_REGNUM) (const_int 1)) + (label_ref (match_opera

Re: [PATCH] [arm] Implement Armv8.1-M low overhead loops

2020-02-21 Thread Roman Zhuykov
11.02.2020 14:00, Richard Earnshaw (lists) wrote: > +(define_insn "*doloop_end" > +  [(parallel [(set (pc) > +   (if_then_else > +   (ne (reg:SI LR_REGNUM) (const_int 1)) > + (label_ref (match_operand 0 "" "")) > + (pc))) >

Re: [PATCH] [arm] Implement Armv8.1-M low overhead loops

2020-02-21 Thread Roman Zhuykov
Andrea Corallo writes: > With this patch the first insn of the low loop overhead 'doloop_begin' > is expanded by 'doloop_modify' in loop-doloop.c. The same does not > happen with SMS. That certainly works correct as in your first patch, doloop_begin pattern also have "!flag_modulo_sched" conditi

Re: [PATCH] [arm] Implement Armv8.1-M low overhead loops

2020-02-21 Thread Kyrill Tkachov
Hi Andrea, On 2/19/20 1:01 PM, Andrea Corallo wrote: Hi all, Second version of the patch here addressing comments. This patch enables the Armv8.1-M Mainline LOB (low overhead branch) extension low overhead loops (LOL) feature by using the 'loop-doloop' pass. Given the following function: v

Re: [PATCH] [arm] Implement Armv8.1-M low overhead loops

2020-02-19 Thread Andrea Corallo
Hi all, Second version of the patch here addressing comments. This patch enables the Armv8.1-M Mainline LOB (low overhead branch) extension low overhead loops (LOL) feature by using the 'loop-doloop' pass. Given the following function: void loop (int *a) { for (int i = 0; i < 1000; i++) a

Re: [PATCH] [arm] Implement Armv8.1-M low overhead loops

2020-02-13 Thread Andrea Corallo
Hi Roman, Roman Zhuykov writes: > This patch is stage1 material, right? Yes >> >>> +(define_insn "*doloop_end" >>> + [(parallel [(set (pc) >>> + (if_then_else >>> + (ne (reg:SI LR_REGNUM) (const_int 1)) >>> + (label_ref (match_operan

Re: [PATCH] [arm] Implement Armv8.1-M low overhead loops

2020-02-12 Thread Roman Zhuykov
Hello! 11.02.2020 16:40, Andrea Corallo wrote: > Hi Richard, > > "Richard Earnshaw (lists)" writes: > >>> gcc/ChangeLog: >>> 2020-??-?? Andrea Corallo >>> 2020-??-?? Mihail-Calin Ionescu >>> 2020-??-?? Iain Apreotesei >>> * config/arm/arm.c (TARGET_INVALID_WITHIN_DOLOOP): >>>

Re: [PATCH] [arm] Implement Armv8.1-M low overhead loops

2020-02-11 Thread Andrea Corallo
Hi Richard, "Richard Earnshaw (lists)" writes: >> gcc/ChangeLog: >> 2020-??-?? Andrea Corallo >> 2020-??-?? Mihail-Calin Ionescu >> 2020-??-?? Iain Apreotesei >> * config/arm/arm.c (TARGET_INVALID_WITHIN_DOLOOP): >> (arm_invalid_within_doloop): Implement invalid_within

Re: [PATCH] [arm] Implement Armv8.1-M low overhead loops

2020-02-11 Thread Richard Earnshaw (lists)
On 11/02/2020 10:14, Andrea Corallo wrote: Hi all, This patch enables the Armv8.1-M Mainline LOB (low overhead branch) extension low overhead loops (LOL) feature by using the loop-doloop pass that it shares with the Swing Modulo Scheduler. bootstrapped arm-none-linux-gnueabihf, does not introdu

[PATCH] [arm] Implement Armv8.1-M low overhead loops

2020-02-11 Thread Andrea Corallo
Hi all, This patch enables the Armv8.1-M Mainline LOB (low overhead branch) extension low overhead loops (LOL) feature by using the loop-doloop pass that it shares with the Swing Modulo Scheduler. bootstrapped arm-none-linux-gnueabihf, does not introduce testsuite regressions. Andrea gcc/Change