diff options
Diffstat (limited to 'gcc/config/sh/sh.c')
-rw-r--r-- | gcc/config/sh/sh.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index d5f7f15..6981ab6 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -720,7 +720,9 @@ got_mode_name:; /* Register SH specific RTL passes. */ extern opt_pass* make_pass_sh_treg_combine (gcc::context* ctx, bool split_insns, - const char* name); + const char* name); +extern opt_pass* make_pass_sh_optimize_sett_clrt (gcc::context* ctx, + const char* name); static void register_sh_passes (void) { @@ -744,6 +746,13 @@ register_sh_passes (void) reordering as this sometimes creates new opportunities. */ register_pass (make_pass_sh_treg_combine (g, true, "sh_treg_combine3"), PASS_POS_INSERT_AFTER, "split4", 1); + + /* Optimize sett and clrt insns, by e.g. removing them if the T bit value + is known after a conditional branch. + This must be done after basic blocks and branch conditions have + stabilized and won't be changed by further passes. */ + register_pass (make_pass_sh_optimize_sett_clrt (g, "sh_optimize_sett_clrt"), + PASS_POS_INSERT_BEFORE, "sched2", 1); } /* Implement TARGET_OPTION_OVERRIDE macro. Validate and override |