[PATCH, ARM][2 of 2] Enable shrink-wrap for ARM

Kyrylo Tkachov kyrylo.tkachov@arm.com
Mon Jun 17 10:35:00 GMT 2013


Hi Zhenqiang,

This patch causes PR57637 (miscompare in SPEC2000). I'll try to reduce a
testcase.

Thanks,
Kyrill

> The *arm_simple_return is the same as "simple_return" used by
> shrink-wrap. *arm_return and *arm_simple_return are not merged
> since
> *arm_return is for "Often the return insn will be the same as
> loading
> from memory", while *arm_simple_return is for "branch".
> 
> For thumb2, there is only "simple_return" pattern --
> *thumb2_return.
> 
> And this is the reason why the "normal" return generated by
> epilogue
> and "simple" return generated by shrink-wrap can be optimized as
> one,
> which leads to dwarf info issue.
> 
> The rebased patch is attached.
> 
> Thanks!
> -Zhenqiang
> 
> 
> > On Wed, Apr 3, 2013 at 7:50 AM, Zhenqiang Chen
> > <zhenqiang.chen@linaro.org> wrote:
> >> On 2 April 2013 17:55, Ramana Radhakrishnan
> <ramana.gcc@googlemail.com> wrote:
> >>> On Thu, Mar 21, 2013 at 7:03 AM, Zhenqiang Chen
> >>> <zhenqiang.chen@linaro.org> wrote:
> >>>> Hi,
> >>>>
> >>>> The patch is to enable shrink-wrap for TARGET_ARM and
> TARGET_THUMB2.
> >>>>
> >>>> Bootstrapped and no make check regression.
> >>>> All previous Linaro shrink-wrap bugs (http://goo.gl/6fGg5) are
> verified.
> >>>>
> >>>> Is it OK?
> >>>
> >>> The tests should be part of the patch attached and not just
> added as
> >>> separate files in your patch submission.
> >>
> >> Thank you for the comments. The patch is updated.
> >>
> >> -Zhenqiang
> >>
> >>>>
> >>>> Thanks!
> >>>> -Zhenqiang
> >>>>
> >>>> ChangeLog:
> >>>> 2013-03-21 Bernd Schmidt  <bernds@codesourcery.com>
> >>>>            Zhenqiang Chen <zhenqiang.chen@linaro.org>
> >>>>
> >>>>         * config/arm/arm-protos.h: Add and update function
> protos.
> >>>>         * config/arm/arm.c (use_simple_return_p): New added.
> >>>>         (thumb2_expand_return): Check simple_return flag.
> >>>>         * config/arm/arm.md: Add simple_return and conditional
> simple_return.
> >>>>         * config/arm/iterators.md: Add iterator for return and
> simple_return.
> >>>>
> >>>> testsuite/ChangeLog:
> >>>> 2013-03-21 Zhenqiang Chen <zhenqiang.chen@linaro.org>
> >>>>
> >>>>         * gcc.dg/shrink-wrap-alloca.c: New added.
> >>>>         * gcc.dg/shrink-wrap-pretend.c: New added.
> >>>>         * gcc.dg/shrink-wrap-sibcall.c: New added.





More information about the Gcc-patches mailing list