On Mon, Dec 09, 2013 at 04:06:35PM +0100, Bernd Schmidt wrote:
> Everything after register allocation is currently in pass_postreload
> rather than pass_rest_of_compilation. This seems arbitrary to me, and
> for a target that doesn't do register allocation, pass_postreload isn't
> run, so the very last few passes (at least reorg and final) need to be
> moved up a level.

I think the main reason for doing it that way was that we don't run the
late passes if register allocation fails, they might be confused by it.
E.g. if the source contains some inline asm that can't be reloaded.
Your patch might cause ICEs for that.
Can't you make those passes a subpass of some new pass and just gate
it on no errors or something similar?
> 
>       gcc/
>       * passes.def (pass_compute_alignments, pass_duplicate_computed_gotos,
>       pass_variable_tracking, pass_free_cfg, pass_machine_reorg,
>       pass_cleanup_barriers, pass_delay_slots,
>       pass_split_for_shorten_branches, pass_convert_to_eh_region_ranges,
>       pass_shorten_branches, pass_est_nothrow_function_flags,
>       pass_dwarf2_frame, pass_final): Move outside of pass_postreload and
>       into pass_rest_of_compilation.

        Jakub

Reply via email to