From: Georg-Johann Lay Date: Mon, 16 Jan 2017 09:48:45 +0000 (+0000) Subject: avr.h (BRANCH_COST): Increase by 4. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1bcd0192bf2b9adbdf0fab7ab8f245d6f68aea71;p=gcc.git avr.h (BRANCH_COST): Increase by 4. gcc/ * config/avr/avr.h (BRANCH_COST) [reload_completed]: Increase by 4. From-SVN: r244488 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cdc423a05e1..0df0bbc3956 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2017-01-16 Georg-Johann Lay + + * config/avr/avr.h (BRANCH_COST) [reload_completed]: Increase by 4. + 2017-01-15 Uros Bizjak * config/i386/i386.c (ix86_legitimate_combined_insn): Do not diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h index c78d4e7bffb..3dfa8c3b00b 100644 --- a/gcc/config/avr/avr.h +++ b/gcc/config/avr/avr.h @@ -360,7 +360,12 @@ typedef struct avr_args } \ } while (0) -#define BRANCH_COST(speed_p, predictable_p) avr_branch_cost +/* We increase branch costs after reload in order to keep basic-block + reordering from introducing out-of-line jumps and to prefer fall-through + edges instead. The default branch costs are 0, mainly because otherwise + do_store_flag might come up with bloated code. */ +#define BRANCH_COST(speed_p, predictable_p) \ + (avr_branch_cost + (reload_completed ? 4 : 0)) #define SLOW_BYTE_ACCESS 0