This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Zdenek Dvorak <rakdver@kam.mff.cuni.cz> wrote on 30/06/2011 15:21:43: > From: Zdenek Dvorak <rakdver@kam.mff.cuni.cz> > To: Razya Ladelsky/Haifa/IBM@IBMIL > Cc: gcc-patches@gcc.gnu.org, Richard Guenther <richard.guenther@gmail.com> > Date: 30/06/2011 15:21 > Subject: Re: PATCH] PR 49580 > > Hi, > > > This patch fixes the build failure of gcc spec2006 benchmark. > > The change is in gimple_duplicate_sese_tail(), where we need to subtract > > 1 from the loop's number of iterations. > > The stmt created to change the rhs of the loop's condition, used to be > > inserted right after the defining stmt of the rhs (an ssa name). > > This requires special handling of different cases of the defining stmt: > > 1.gimple_stmt > > 2.gimple_phi > > 3.default_def > > > > Instead of handling each case separately, if we insert the new stmt at the > > begining of the loop's preheader, we're sure that > > it's already been defined. > > > > Bootstrap and testsuite pass successfully (as autopar is not enabled by > > default). > > No new regressions when the testsuite is run with autopar enabled. > > No new regressions for the run of spec2006 with autopar enabled, and gcc > > benchmark now passes successfully.. > > > > OK for trunk? > > actually, I think a better approach would be not to have this kind > of pass-specific > adjustments in gimple_duplicate_sese_tail at all. The code > decreasing the number of > iterations in gimple_duplicate_sese_tail only works because parloops > does induction > variable canonicalization first; should we need it to be used > anywhere else, it will break. > I.e., parloops should first transform the condition so that it does > the comparison with > the adjusted value, and then gimple_duplicate_sese_tail could do > just code copying > and cfg changes, > > Zdenek Hi, I moved the adjustment of the loop's iterations from gimple_duplicate_sese_tail to tree-parloops.c, right before the call to gimple_duplicate_sese_tail. I repeated the bootstrap, regression and spec runs - no new regressions. OK to commit? Thanks, razya
Attachment:
gcc_patch_new.txt
Description: Text document
Attachment:
ChangeLog.txt
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |