Message ID | 1385032930.2438.209.camel@yam-132-YW-E178-FTW |
---|---|
State | New |
Headers | show |
On Thu, 2013-11-21 at 12:22 +0100, Oleg Endo wrote: > Sorry for the confusion. Initially I had it inserted right before > machine dependent reorg, at which point I was getting nullptr from > BLOCK_FOR_INSN all over the place. So not using it was the fix. > However, only after I've noticed that SH's machine dependent reorg > leaves the basic block structure in a 'broken' state (PR 59189) and thus > I moved the pass before sched2. > I'll try using BLOCK_FOR_INSN again. ... which won't work, since it sometimes also adds "unknown" ccreg_value entries where insn is NULL_RTX, but bb is valid. I'd like to keep it that way. It will be useful when moving sett / clrt insns around between basic blocks. I'll fix the confusing comment. Cheers, Oleg
Index: gcc/config/sh/sh_optimize_sett_clrt.cc =================================================================== --- gcc/config/sh/sh_optimize_sett_clrt.cc (revision 205191) +++ gcc/config/sh/sh_optimize_sett_clrt.cc (working copy) @@ -309,9 +309,6 @@ std::vector<ccreg_value>& values_out, basic_block prev_visited_bb) const { - if (start_insn == NULL_RTX) - return; - log_msg ("looking for ccreg values in [bb %d]\n", bb->index); for (rtx i = start_insn; i != NULL_RTX && i != PREV_INSN (BB_HEAD (bb)); @@ -376,9 +373,6 @@ for (edge_iterator ei = ei_start (bb->preds); !ei_end_p (ei); ei_next (&ei)) { basic_block pred_bb = ei_edge (ei)->src; - if (pred_bb->index == ENTRY_BLOCK) - continue; - pred_bb_count += 1; find_last_ccreg_values (BB_END (pred_bb), pred_bb, values_out, bb); }