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

Question about apparently obsolete comment in gcse.c


Here's something interesting I found while trying to understand the following
code+comment in gcse.c:compute_transpout():

  FOR_EACH_BB (bb)
      /* Note that flow inserted a nop a the end of basic blocks that
         end in call instructions for reasons other than abnormal
         control flow.  */
      if (GET_CODE (BB_END (bb)) != CALL_INSN)

This was added by rth in revision 1.64 of flow.c and 1.16 of gcse.c, in
October 1998 (!), along with a hack to the rest of gcc to emit a NOP after
a call that cannot trap (iiuc).

Later, a patch was submitted by Honza to not emit that NOP, but that
patch was not approved, or at least I can't find where it was approved
In any case, that patch shows up in CVS in flow.c revision 1.420.

I don't know if the same objections against the patch are still relevant, but
it would be interesting to find out (unfortunately Honza is offline...).  For example.
should gcse, in the code mentioned above, be looking at the successors of bb
and do nothing if there are no abnormal edges there?


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