diff options
author | James Greenhalgh <james.greenhalgh@arm.com> | 2016-12-07 14:01:59 +0000 |
---|---|---|
committer | James Greenhalgh <jgreenhalgh@gcc.gnu.org> | 2016-12-07 14:01:59 +0000 |
commit | da88ea0265af5c877429a0c096cfdc0d4b3fecaa (patch) | |
tree | 624f3840e340fb87117f70858530e01dbb84bc36 /gcc/varasm.c | |
parent | 716c5aced1f3e998df4a5d78eba4e090a332acee (diff) | |
download | gcc-da88ea0265af5c877429a0c096cfdc0d4b3fecaa.zip gcc-da88ea0265af5c877429a0c096cfdc0d4b3fecaa.tar.gz gcc-da88ea0265af5c877429a0c096cfdc0d4b3fecaa.tar.bz2 |
[Patch PR78561 PowerPC] Revert to old behaviour for counting constant pools
gcc/
PR rtl-optimization/78561
* config/rs6000/rs6000.c (rs6000_reg_live_or_pic_offset_p) Use
constant_pool_empty_p in place of get_pool_size_upper_bound.
(rs6000_stack_info): Likewise.
(rs6000_emit_prologue): Likewise.
(rs6000_elf_declare_function_name): Likewise.
(rs6000_set_up_by_prologue): Likewise.
(rs6000_can_eliminate): Likewise.
* output.h (get_pool_size_upper_bound): Delete.
(constant_pool_empty_p): New.
* varasm.c (get_pool_size_upper_bound): Delete
(constant_pool_empty_p): New.
From-SVN: r243345
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index f3cd70a..5b15847 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -3808,12 +3808,14 @@ get_pool_mode (const_rtx addr) return SYMBOL_REF_CONSTANT (addr)->mode; } -/* Return the size of the constant pool. */ +/* Return TRUE if and only if the constant pool has no entries. Note + that even entries we might end up choosing not to emit are counted + here, so there is the potential for missed optimizations. */ -int -get_pool_size_upper_bound (void) +bool +constant_pool_empty_p (void) { - return crtl->varasm.pool->offset; + return crtl->varasm.pool->first == NULL; } /* Worker function for output_constant_pool_1. Emit assembly for X |