This is the mail archive of the gcc@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]

Re: number_of_iterations_in_loop and a non-constant loop bound start



On Aug 25, 2004, at 11:23 PM, Andrew Pinski wrote:


While working on a loop pass I found that number_of_iterations_in_loop reported
that a loop with a non constant start as being undetermined which is wrong for
this case as we know that the initializer will always before the end.


Take for an example:


void g(int init, int max, char *a) { int i; for (i = init; i < max; i++) a[i] = 0; }

in the loop we know that init < max as the tree looks like:


Is there someway to get this fixed as this looks very wrong. It looks like
it will also hurt the vectorizer also.



You need range info, which Diego is working on :)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]