[PATCH] Merge flow-sensitive info in merge_alias_info

Daniel Berlin dberlin@dberlin.org
Fri Nov 23 09:08:00 GMT 2007


On 11/22/07, Diego Novillo <dnovillo@google.com> wrote:
> Richard Guenther wrote:
>
> > This patch makes us merge flow-sensitive alias info in simple propagation
> > cases where we previously failed to do so.  I am not sure if this just
> > increases precision or also fixes correctness, so if it is appropriate
> > for stage3 or not.
>
> It should not affect correctness one way or the other, so I think it
> should be harmless.

It actually will.

Our alias system never really worked okay when you had NMT's for one
thing and SMT's for another (and they were copies of each other). It
just didn't happen in 4.2, they would have both gotten SMT's or both
gotten NMT's.

In 4.3, you can get one with an NMT and one without, the one without
being not dereferenced.

Example

a = b
*a = foo

a will have an NMT
b will not, because we don't create NMT's for undereferenced pointers.
If we propagate b into a, creating *b, but don't copy the NMT from a
to b, we will end up with accesses that should conflict but don't.

In 4.2, it was highly likely neither would end up with NMT's, and
since we propagated SMT info around, it all turned out okay.



More information about the Gcc-patches mailing list