On 12/01/2016 08:29 AM, James Greenhalgh wrote:


There's no functional change in this patch, just a rename.

The size recorded in "offset" is only ever incremented as we add new items
to the constant pool. But this information can become stale where those
constant pool entries would not get emitted.

Thus, it is only ever an upper bound on the size of the constant pool.

The only uses of get_pool_size are in rs6000 and there it is only used to
check whether a constant pool might be output - but explicitly renaming the
function to make it clear that you're getting an upper bound rather than the
real size can only be good for programmers using the interface.



2016-12-01  James Greenhalgh  <james.greenha...@arm.com>

        PR rtl-optimization/78561
        * config/rs6000/rs6000.c (rs6000_reg_live_or_pic_offset_p) Rename
        get_pool_size to 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, reformat spaces to tabs.
        * output.h (get_pool_size): Rename to...
        (get_pool_size_upper_bound): ...This.
        * varasm.c (get_pool_size): Rename to...
        (get_pool_size_upper_bound): ...This.

Both parts of the fix for 78561 are OK.


Reply via email to