diff options
author | Tom de Vries <tom@codesourcery.com> | 2011-04-05 10:33:13 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2011-04-05 10:33:13 +0000 |
commit | c201ac946de2f3021570f8866523f36983d7aa83 (patch) | |
tree | a1651715e0e566e2e9b0346607e7b83ea41a7c70 /gcc | |
parent | 4c029f40bd39f49cb2748fb685d18e5dc97c90a6 (diff) | |
download | gcc-c201ac946de2f3021570f8866523f36983d7aa83.zip gcc-c201ac946de2f3021570f8866523f36983d7aa83.tar.gz gcc-c201ac946de2f3021570f8866523f36983d7aa83.tar.bz2 |
re PR target/43920 (Choosing conditional execution over conditional branches for code size in some cases.)
2011-04-05 Tom de Vries <tom@codesourcery.com>
PR target/43920
* config/arm/arm.h (BRANCH_COST): Set to 1 for Thumb-2 when optimizing
for size.
From-SVN: r171978
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/arm/arm.h | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 15e1b86..3676c54 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,12 @@ 2011-04-05 Tom de Vries <tom@codesourcery.com> PR target/43920 + * config/arm/arm.h (BRANCH_COST): Set to 1 for Thumb-2 when optimizing + for size. + +2011-04-05 Tom de Vries <tom@codesourcery.com> + + PR target/43920 * function.c (emit_use_return_register_into_block): New function. (thread_prologue_and_epilogue_insns): Use emit_use_return_register_into_block. diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index 5c3f2f8..f302de2 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -2019,7 +2019,8 @@ typedef struct /* Try to generate sequences that don't involve branches, we can then use conditional instructions */ #define BRANCH_COST(speed_p, predictable_p) \ - (TARGET_32BIT ? 4 : (optimize > 0 ? 2 : 0)) + (TARGET_32BIT ? (TARGET_THUMB2 && !speed_p ? 1 : 4) \ + : (optimize > 0 ? 2 : 0)) /* Position Independent Code. */ /* We decide which register to use based on the compilation options and |