X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fmode-switching.c;h=7ea241cea7bdf57c6549fc7f196c9a70b48698c6;hb=10089e90bd4b103351854568b2463b275a8588a2;hp=d4c7b24b981891c653bd3679da6a8fe597fb527c;hpb=50b15e044e3de278d9190699311f8017ce9c2ed8;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/mode-switching.c b/gcc/mode-switching.c index d4c7b24b981..7ea241cea7b 100644 --- a/gcc/mode-switching.c +++ b/gcc/mode-switching.c @@ -499,6 +499,7 @@ optimize_mode_switching (void) { struct seginfo *ptr; int last_mode = no_mode; + bool any_set_required = false; HARD_REG_SET live_now; REG_SET_TO_HARD_REG_SET (live_now, df_get_live_in (bb)); @@ -527,6 +528,7 @@ optimize_mode_switching (void) if (mode != no_mode && mode != last_mode) { + any_set_required = true; last_mode = mode; ptr = new_seginfo (mode, insn, bb->index, live_now); add_seginfo (info + bb->index, ptr); @@ -548,8 +550,10 @@ optimize_mode_switching (void) } info[bb->index].computing = last_mode; - /* Check for blocks without ANY mode requirements. */ - if (last_mode == no_mode) + /* Check for blocks without ANY mode requirements. + N.B. because of MODE_AFTER, last_mode might still be different + from no_mode. */ + if (!any_set_required) { ptr = new_seginfo (no_mode, BB_END (bb), bb->index, live_now); add_seginfo (info + bb->index, ptr); @@ -772,6 +776,6 @@ struct rtl_opt_pass pass_mode_switching = 0, /* properties_destroyed */ 0, /* todo_flags_start */ TODO_df_finish | TODO_verify_rtl_sharing | - TODO_dump_func /* todo_flags_finish */ + 0 /* todo_flags_finish */ } };