Improve splitX passes management
authorUros Bizjak <ubizjak@gmail.com>
Sun, 9 Feb 2020 16:56:38 +0000 (17:56 +0100)
committerUros Bizjak <ubizjak@gmail.com>
Sun, 9 Feb 2020 16:56:38 +0000 (17:56 +0100)
commitf4777088c9fdcf92374e33c6cb5cf8038216e86f
tree85523c7252064a953b0e87b5bdf8a22885332af2
parent38660e87f01dbe15082e83cc4842d66f8d292ba0
Improve splitX passes management

The names of split_before_sched2 ("split4") and split_before_regstack
("split3") do not reflect their insertion point in the sequence of passes,
where split_before_regstack follows split_before_sched2. Reorder the code
and rename the passes to reflect the reality.

split_before_regstack pass does not need to run if split_before_sched2 pass
was already performed. Introduce enable_split_before_sched2 function to
simplify gating functions of these two passes.

There is no need for a separate rest_of_handle_split_before_sched2.
split_all_insns can be called unconditionally from
pass_split_before_sched2::execute, since the corresponding gating function
determines if the pass is executed or not.

* recog.c: Move pass_split_before_sched2 code in front of
pass_split_before_regstack.
(pass_data_split_before_sched2): Rename pass to split3 from split4.
(pass_data_split_before_regstack): Rename pass to split4 from split3.
(rest_of_handle_split_before_sched2): Remove.
(pass_split_before_sched2::execute): Unconditionally call
split_all_insns.
(enable_split_before_sched2): New function.
(pass_split_before_sched2::gate): Use enable_split_before_sched2.
(pass_split_before_regstack::gate): Ditto.
* config/nds32/nds32.c (nds32_split_double_word_load_store_p):
Update name check for renamed split4 pass.
* config/sh/sh.c (register_sh_passes): Update pass insertion
point for renamed split4 pass.
gcc/ChangeLog
gcc/config/nds32/nds32.c
gcc/config/sh/sh.c
gcc/recog.c