[PATCH][ARM] Restrict MAX_CONDITIONAL_EXECUTE when -mrestrict-it is in place

Kyrill Tkachov kyrylo.tkachov@foss.arm.com
Mon May 18 10:32:00 GMT 2015


Hi all,

When using the short Thumb2 IT blocks we want to also restrict ifcvt so that it will not end up generating a number of back-to-back cond_execs
that will later end up being back to back single-instruction IT blocks. Branching over them should be a better choice.

This patch implements that by setting max_insns_skipped to 1 when arm_restrict_it.

With this patch, I've seen GCC replace a number of sequences in places like SPEC2006 from:
     it    eq
     moveq    r1, r5
     it    ne
     movne    r1, r10
     it    eq
     moveq    r8, r4

to a branch over them.

Bootstrapped and tested on arm.
Ok for trunk?

Thanks,
Kyrill

2015-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

     * config/arm/arm.c (arm_option_params_internal): When optimising
     for speed set max_insns_skipped when arm_restrict_it.

2015-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

     * gcc.target/arm/short-it-ifcvt-1.c: New test.
     * gcc.target/arm/short-it-ifcvt-2.c: Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arm-restrict-it.patch
Type: text/x-patch
Size: 2156 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150518/b58d8182/attachment.bin>


More information about the Gcc-patches mailing list