aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.h
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2017-12-20 12:56:50 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2017-12-20 12:56:50 +0000
commit8a91d5455313fb3c4fc07935d848921012cb297f (patch)
treec67e2c4060eba6622d9a7853ef5030b77da88297 /gcc/expr.h
parent7df9b6f12abfa68c13d9485855dbe22da3167d49 (diff)
downloadgcc-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.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/expr.h b/gcc/expr.h
index 0603797..9b09271 100644
--- a/gcc/expr.h
+++ b/gcc/expr.h
@@ -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);