This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Is nonoverlapping_memrefs_p wrong for unknown offsets?

Great, thanks -- I should have re-checked bugzilla after we tracked
this down.

We also noticed a few minor performance issues along the way.
It would be better if merge_memattrs did a min/max thing with
offset/size to choose an offset and size that encompass both original
references, rather than giving up on the offset altogether when the
offsets don't match exactly.

Also, flow_find_cross_jump coarsens the aliasing information as it
scans, so even if it gives up because it doesn't find enough insns to
merge, the aliasing data is lost.  We implemented a split of the scan
from the actual destructive merging.


Steven Bosscher <> writes:

> On Mon, Apr 12, 2010 at 6:57 PM, Mat Hostetter <> 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 -- does that help?
> Ciao!
> Steven

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]