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] |
Now gimplify for a for loop is from: for (INIT;COND;INCREMENT) BODY to: INIT if (COND) { while (1) { BODY INCREMENT if (!COND) goto OUTOFLOOP; } OUTOFLOOP: }
Testcase: void temp(int limit, float *x) { int i; for(i=0;i<limit;i++) x[i] = 0; }
ChangeLog: 2003-06-16 Andrew Pinski <pinskia@physics.uc.edu>
* c-simplify.c (gimplify_for_stmt): Add if before loop and move the condition to the end of the loop.
Attachment:
temp1.diff
Description: Binary data
Thanks, Andrew Pinski
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |