This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH RFA] Implement register pressure directed hoist pass
- From: "Bin Cheng" <bin dot cheng at arm dot com>
- To: "'Jeff Law'" <law at redhat dot com>
- Cc: "'Steven Bosscher'" <stevenb dot gcc at gmail dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 19 Oct 2012 14:08:07 +0800
- Subject: RE: [PATCH RFA] Implement register pressure directed hoist pass
- References: <50655073.e54c420a.651e.ffffac0fSMTPIN_ADDED@mx.google.com> <CABu31nNuq-971KN8UhHbDvGP9gGNRQL5JSrw0au9Oev8oMZyXA@mail.gmail.com> <506AE4F1.5030807@redhat.com> <50766d69.a853420a.2475.fffffbafSMTPIN_ADDED@mx.google.com> <CABu31nP18DoE_zs4AyAwSs=oSmaYi9aOok0CfyYXYdhTy_j75w@mail.gmail.com> <000c01cda850$d6fa2460$84ee6d20$@cheng@arm.com> <001f01cdab72$0979efa0$1c6dcee0$@cheng@arm.com> <507D930D.5090703@redhat.com>
> -----Original Message-----
> From: Jeff Law [mailto:law@redhat.com]
> Sent: Wednesday, October 17, 2012 1:02 AM
> To: Bin Cheng
> Cc: 'Steven Bosscher'; gcc-patches@gcc.gnu.org
> Subject: Re: [PATCH RFA] Implement register pressure directed hoist pass
>
> On 10/16/2012 01:44 AM, Bin Cheng wrote:
> > Hi Steven, Jeff,
> > I found a flaw in original patch, which results in inaccurate register
> > pressure.
> > Here comes the updated patches, improving code size a little bit on
> > Thumb2/powerpc comparing to original patches.
> > Please review.
> >
> > Thanks
> >
> > 2012-10-16 Bin Cheng<bin.cheng@arm.com>
> >
> > * gcse.c: Update copyright dates.
> > (hoist_expr_reaches_here_p): Change parameter type from char *
> > to sbitmap.
> >
> > 2012-10-16 Bin Cheng<bin.cheng@arm.com>
> >
> > * common.opt (flag_ira_hoist_pressure): New.
> > * doc/invoke.texi (-fira-hoist-pressure): Describe.
> > * ira-costs.c (ira_set_pseudo_classes): New parameter.
> > * ira.h: Update copyright dates.
> > (ira_set_pseudo_classes): Update prototype.
> > * haifa-sched.c (sched_init): Update call.
> > * ira.c (ira): Update call.
> > * regmove.c: Update copyright dates.
> > (regmove_optimize): Update call.
> > * loop-invariant.c: Update copyright dates.
> > (move_loop_invariants): Update call.
> > * gcse.c: (struct bb_data): New structure.
> > (BB_DATA): New macro.
> > (curr_bb, curr_reg_pressure): New static variables.
> > (should_hoist_expr_to_dom): Rename from hoist_expr_reaches_here_p.
> > Change parameter expr_index to expr.
> > New parameters pressure_class, nregs and hoisted_bbs.
> > Use reg pressure to determine the distance expr can be hoisted.
> > (hoist_code): Use reg pressure to direct the hoist process.
> > (get_regno_pressure_class, get_pressure_class_and_nregs)
> > (change_pressure, calculate_bb_reg_pressure): New.
> > (one_code_hoisting_pass): Calculate register pressure. Allocate
> > and free data.
>
>
>
> > +
> > + /* Currently register pressure for each pressure class. */ static
> > + int curr_reg_pressure[N_REG_CLASSES];
> "Currently" -> "Current"
>
> OK for the mainline sources.
>
Committed to trunk as r192603/r192604, after re-testing against recent trunk
codes.
Thanks.