This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Is nonoverlapping_memrefs_p wrong for unknown offsets?
- From: Steven Bosscher <stevenb dot gcc at gmail dot com>
- To: Mat Hostetter <mhostetter at tilera dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 12 Apr 2010 19:18:09 +0200
- Subject: Re: Is nonoverlapping_memrefs_p wrong for unknown offsets?
- References: <7usk701ucw.fsf@tilera.com>
On Mon, Apr 12, 2010 at 6:57 PM, Mat Hostetter <mhostetter@tilera.com> wrote:
> try_crossjump_bb identifies some common insns in SPEC2000.eon and uses
> merge_memattrs to merge them. ?To do so, it has to unify their
> aliasing data such that any insn that aliased either of the original
> insns aliases the merged insn. ?In our case we have two
> identical-looking insns that are actually referencing different stack
> spill slots, so their MEM_OFFSETs are different. ?merge_memattrs
> correctly NULLs out the MEM_OFFSET of the merged insn to indicate it's
> not sure what the offset is, although it leaves a non-NULL MEM_SIZE:
>
> ? ? ? ? ?else if (MEM_OFFSET (x) != MEM_OFFSET (y))
> ? ? ? ? ? ?{
> ? ? ? ? ? ? ?set_mem_offset (x, 0);
> ? ? ? ? ? ? ?set_mem_offset (y, 0);
> ? ? ? ? ? ?}
>
> Later, nonoverlapping_memrefs_p decides that this merged insn does not
> alias another spill slot insn (one which has a valid MEM_OFFSET), but
> in fact they do alias. The scheduler then creates an incorrect schedule.
Sounds like http://gcc.gnu.org/PR42509 -- does that help?
Ciao!
Steven