This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH, ira] Miss checks in split_live_ranges_for_shrink_wrap
- From: "Zhenqiang Chen" <zhenqiang dot chen at arm dot com>
- To: "'Jeff Law'" <law at redhat dot com>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 9 Sep 2014 14:23:37 +0800
- Subject: RE: [PATCH, ira] Miss checks in split_live_ranges_for_shrink_wrap
- Authentication-results: sourceware.org; auth=none
- References: <CACgzC7D-f5gmnJP0rTOrWG0aporGcSwY+6yD7HuQSRkySBTEiQ at mail dot gmail dot com> <5400E866 dot 1020204 at redhat dot com> <000001cfc5bc$9876f4d0$c964de70$ at arm dot com> <54093FD4 dot 3040201 at redhat dot com>
> -----Original Message-----
> From: Jeff Law [mailto:law@redhat.com]
> Sent: Friday, September 05, 2014 12:45 PM
> To: Zhenqiang Chen
> Cc: gcc-patches@gcc.gnu.org
> Subject: Re: [PATCH, ira] Miss checks in split_live_ranges_for_shrink_wrap
>
> On 09/01/14 02:13, Zhenqiang Chen wrote:
> >
> > To split live-range of register, split_live_ranges_for_shrink_wrap
> > will introduce additional register copies. If such copies can not be
> > optimized by later optimizations, it will lead to code size and
performance
> regression.
> > My tests on ARM THUMB1 code size show lots of regressions due to
> > additional register copies. Shrink-wrap is not enabled for ARM THUMB1,
> > so I think split_live_ranges_for_shrink_wrap should not be called.
> So has anyone looked at why IRA ends up selecting different registers
> for the source/dest of these copies? Odds are it's just an artifact of
> the heuristics in use, but I'd like to make sure there isn't something
> inherently wrong happening in IRA that's causing it to not tie the
source/dest
> of those copies.
>
>
>
> > ChangeLog:
> > 2014-09-01 Zhenqiang Chen <zhenqiang.chen@arm.com>
> >
> > * shrink-wrap.h: #define SHRINK_WRAPPING_ENABLED.
> > * ira.c: #include "shrink-wrap.h"
> > (split_live_ranges_for_shrink_wrap): Use
> SHRINK_WRAPPING_ENABLED.
> > * ifcvt.c: #include "shrink-wrap.h"
> > (dead_or_predicable): Use SHRINK_WRAPPING_ENABLED.
> >
> > testsuite/ChangeLog:
> > 2014-09-01 Zhenqiang Chen <zhenqiang.chen@arm.com>
> >
> > * gcc.target/arm/split-live-ranges-for-shrink-wrap.c: New test.
> Thanks. OK for the trunk.
Thanks. The patch is installed @r215041.
> As noted above, it'd may be worth spending a little time looking at the
> regressions without this patch installed to see why IRA isn't doing a good
job
> of tying the source/dest of these copies together -- perhaps there's
> something that's been overlooked and fixing it may be beneficial.
I had investigated it. Compared with 4.8, the allocation order and conflict
cost might be the root cause. A bug is submitted: PR63210.
Thanks!
-Zhenqiang
> jeff
>