[PATCH 1/6]tree-ssa-dom.c: Normalize exprs, starting with ARRAY_REF to MEM_REF
Tue Nov 3 11:13:00 GMT 2015
On 3 November 2015 at 10:27, Alan Lawrence <firstname.lastname@example.org> wrote:
> That is, ssa-dom-cse-7.c passes (and the patch series solves PR/63679) if
> instead of my patch 2 (normalization of MEM_REFs) we have this:
> diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
> index 4327990..2889a96 100644
> --- a/gcc/tree-sra.c
> +++ b/gcc/tree-sra.c
> @@ -1697,7 +1697,7 @@ build_ref_for_offset (location_t loc, tree base, HOST_WIDE_INT offset,
> - off = build_int_cst (reference_alias_ptr_type (base),
> + off = build_int_cst (build_pointer_type (exp_type),
> base_offset + offset / BITS_PER_UNIT);
> base = build_fold_addr_expr (unshare_expr (base));
> ...I'll test that fully but I have to wonder what the right path is here!
So with also changing the other reference_alias_ptr_type in the first
case of build_ref_for_offset, it breaks Ada ACATS (on x86):
c52101a "CHECK THAT ARRAY SUBTYPE CONVERSION IS APPLIED AFTER AN ARRAY
VALUE IS DETERMINED"
cxac004 (stream access, stream functions)
....I'll not dig any further unless you think that change to SRA is
the right avenue to investigate!
More information about the Gcc-patches