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] |
Oops! The previous revised patch failed. I should really run tests on every seemingly minor change :-). + if(perfect_unrolling) + { + new_exit = exit; <-- the later gimple_duplicate_loop_to_header_edge uses new_exit + new_est_niter = est_niter / factor; <-- just to be consistent with non-perfect loop case and remove need to initialize this var. + } Cheers, Bingfeng > -----Original Message----- > From: fearyourself@gmail.com [mailto:fearyourself@gmail.com] > On Behalf Of Jean Christophe Beyler > Sent: 28 October 2009 15:24 > To: Bingfeng Mei > Cc: gcc-patches@gcc.gnu.org; Zdenek Dvorak > Subject: Re: Patch to handle perfect loop unrolling in > tree_transform_and_unroll_loop > > I am only looking at your patch so I haven't tried your code, so it is > very possible some of these comments are simply stupid: > > - I wonder the usefulness of : > + if(perfect_unrolling) > + { > + new_exit = exit; > + rest = exit->dest; > + new_est_niter = est_niter / factor; > + } > > as far as I can tell, rest is only used in the non perfect case > > - Not important at all: > + gcc_assert(EDGE_COUNT(exit_bb->succs) == 2); > doesn't follow the normal indentation for the '(' > > - More to the point, I did something similar except I added a test to > see if the factor requested by the user was above the limit of > n_iters. If so, I say that the unrolling is perfect and issue a > warning. > > Do you want me to look a bit more? > Jc > > On Wed, Oct 28, 2009 at 10:43 AM, Bingfeng Mei > <bmei@broadcom.com> wrote: > > Hello, > > This patch is to handle perfect loop unrolling as > > discussed in http://gcc.gnu.org/ml/gcc/2009-10/msg00333.html. > > > > I merged the original code into tree_transform_and_unroll_loop, > > and added some code to get probability/frequency right. > > > > This is related to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36712 > > A tree-level unrolling pass will just call this modified function. > > I will submit a separate patch if needed. > > > > 2009-10-28 ?Bingfeng Mei <bmei@broadcom.com> > > > > ? ? ? ?* tree_transform_and_unroll_loop > (tree_transform_and_unroll_loop): > > ? ? ? ?To handle perfect loop unrolling. > (perfect_loop_unrolling_p): New function > > ? ? ? ?to check whether a loop can perfect unrolling. > > > > Cheers, > > Bingfeng Mei > > > > > >
Attachment:
patch_loop_unrolling;size=17536;creation-date="Wed,
Description: patch_loop_unrolling
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |