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]

Re: bug with biv increment -> giv transformation


This looks reasonable to me, if it fixes Marc Espie's problem.

The code for setting biv_dead_after_loop was apparently copied from the
code for setting bl->eliminable, except that you dropped the final_biv_value
check.  Why?  It would be useful to document in a comment that the code is a
duplicate of code taken from elswhere, and to explain why the final_biv_value
check isn't here.

You should also add a comment explaining why you need the biv_dead_after_loop
and no_jumps_between_p checks, i.e. so that early exits from the loop don't
leave bivs live after the loop with incorrect values.

Jim


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