This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
ifcvt.c question
- From: Steven Bosscher <stevenb at suse dot de>
- To: gcc at gcc dot gnu dot org
- Date: Sun, 29 May 2005 23:23:29 +0200
- Subject: ifcvt.c question
Hi,
ifcvt.c has this code in find_if_block():
2718 /* If the THEN block has no successors, conditional execution can still
2719 make a conditional call. Don't do this unless the ELSE block has
2720 only one incoming edge -- the CFG manipulation is too ugly otherwise.
2721 Check for the last insn of the THEN block being an indirect jump, which
2722 is listed as not having any successors, but confuses the rest of the CE
2723 code processing. ??? we should fix this in the future. */
2724 if (EDGE_COUNT (then_bb->succs) == 0)
2725 {
2726 if (single_pred_p (else_bb))
2727 {
2728 rtx last_insn = BB_END (then_bb);
2729
2730 while (last_insn
2731 && NOTE_P (last_insn)
2732 && last_insn != BB_HEAD (then_bb))
2733 last_insn = PREV_INSN (last_insn);
2734
2735 if (last_insn
2736 && JUMP_P (last_insn)
2737 && ! simplejump_p (last_insn))
2738 return FALSE;
2739
2740 join_bb = else_bb;
2741 else_bb = NULL_BLOCK;
2742 }
2743 else
2744 return FALSE;
2745 }
2746
I don't understand what lines 2728 to 2741 are for. Could someone give
an example of when we can have a then_bb that has no successors, but
still ends in something that satisfies simplejump_p()? What kind of
strange indirect jump would that be? And shouldn't the check just use
computed_jump_p() if that is what it is looking for??
Gr.
Steven