https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93264
rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rsandifo at gcc dot gnu.org --- Comment #4 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> --- (In reply to Richard Biener from comment #3) > In general it's a bad idea to try go "back" to CFG layout mode and the fix is > to not do that. Which probably means scheduling pass_sms earlier and indeed > then best before pass_partition_blocks. I don't see any reason to _not_ do > this, the current pipeline is > > NEXT_PASS (pass_partition_blocks); > NEXT_PASS (pass_outof_cfg_layout_mode); > NEXT_PASS (pass_split_all_insns); > NEXT_PASS (pass_lower_subreg3); > NEXT_PASS (pass_df_initialize_no_opt); > NEXT_PASS (pass_stack_ptr_mod); > NEXT_PASS (pass_mode_switching); > NEXT_PASS (pass_match_asm_constraints); > NEXT_PASS (pass_sms); > NEXT_PASS (pass_live_range_shrinkage); > NEXT_PASS (pass_sched); > NEXT_PASS (pass_early_remat); > NEXT_PASS (pass_ira); > NEXT_PASS (pass_reload); > NEXT_PASS (pass_postreload); > PUSH_INSERT_PASSES_WITHIN (pass_postreload) > > and while I understand sms wants to run as close to RA as possible the > passes between its current position and partitioning should not mess > with the schedule (mode switching might insert code I think). Yeah, it ought to be better to do mode switching first. But I think the more important ones are: NEXT_PASS (pass_split_all_insns); NEXT_PASS (pass_lower_subreg3); Scheduling should happen on the split form of insns rather than the unsplit form. lower_subreg should also improve "schedulability".