diff options
author | Richard Sandiford <richard.sandiford@linaro.org> | 2017-12-20 12:56:50 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2017-12-20 12:56:50 +0000 |
commit | 8a91d5455313fb3c4fc07935d848921012cb297f (patch) | |
tree | c67e2c4060eba6622d9a7853ef5030b77da88297 /gcc/expr.h | |
parent | 7df9b6f12abfa68c13d9485855dbe22da3167d49 (diff) | |
download | gcc-8a91d5455313fb3c4fc07935d848921012cb297f.zip gcc-8a91d5455313fb3c4fc07935d848921012cb297f.tar.gz gcc-8a91d5455313fb3c4fc07935d848921012cb297f.tar.bz2 |
poly_int: store merging
This patch makes pass_store_merging track polynomial sizes
and offsets. store_immediate_info remains restricted to stores
with a constant offset and size.
2017-12-20 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
gcc/
* poly-int-types.h (round_down_to_byte_boundary): New macro.
(round_up_to_byte_boundary): Likewise.
* expr.h (get_bit_range): Add temporary shim.
* gimple-ssa-store-merging.c (store_operand_info): Change the
bitsize, bitpos, bitregion_start and bitregion_end fields from
unsigned HOST_WIDE_INT to poly_uint64.
(merged_store_group): Likewise load_align_base.
(compatible_load_p, compatible_load_p): Update accordingly.
(imm_store_chain_info::coalesce_immediate_stores): Likewise.
(split_group, imm_store_chain_info::output_merged_store): Likewise.
(mem_valid_for_store_merging): Return the bitsize, bitpos,
bitregion_start and bitregion_end as poly_uint64s rather than
unsigned HOST_WIDE_INTs. Track polynomial offsets internally.
(handled_load): Take the bitsize, bitpos,
bitregion_start and bitregion_end as poly_uint64s rather than
unsigned HOST_WIDE_INTs.
(pass_store_merging::process_store): Update call to
mem_valid_for_store_merging.
Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>
From-SVN: r255894
Diffstat (limited to 'gcc/expr.h')
-rw-r--r-- | gcc/expr.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -243,6 +243,15 @@ extern bool emit_push_insn (rtx, machine_mode, tree, rtx, unsigned int, extern void get_bit_range (unsigned HOST_WIDE_INT *, unsigned HOST_WIDE_INT *, tree, HOST_WIDE_INT *, tree *); +/* Temporary. */ +inline void +get_bit_range (poly_uint64_pod *bitstart, poly_uint64_pod *bitend, tree exp, + poly_int64_pod *bitpos, tree *offset) +{ + get_bit_range (&bitstart->coeffs[0], &bitend->coeffs[0], exp, + &bitpos->coeffs[0], offset); +} + /* Expand an assignment that stores the value of FROM into TO. */ extern void expand_assignment (tree, tree, bool); |