This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Question about apparently obsolete comment in gcse.c
- From: Steven Bosscher <stevenb at suse dot de>
- To: jh at suse dot cz, rth at redhat dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 7 Jun 2004 12:32:52 +0200 (CEST)
- Subject: Question about apparently obsolete comment in gcse.c
- Organization: SuSE Linux AG
Hi,
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)
continue;
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
(cf. http://gcc.gnu.org/ml/gcc-patches/2001-07/msg00403.html).
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?
Gr.
Steven