On 15 May 2013 06:36, Ramana Radhakrishnan <ramana....@googlemail.com> wrote: > What happens to the *arm_simple_return pattern that already exists in > the backend ? Can you rebase to trunk ?
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.c...@linaro.org> wrote: >> On 2 April 2013 17:55, Ramana Radhakrishnan <ramana....@googlemail.com> >> wrote: >>> On Thu, Mar 21, 2013 at 7:03 AM, Zhenqiang Chen >>> <zhenqiang.c...@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 <ber...@codesourcery.com> >>>> Zhenqiang Chen <zhenqiang.c...@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.c...@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.
2-enable-shrink-wrap-for-arm.patch
Description: Binary data