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: An aliasing tweak

In message <>, Richard Sandiford writes:
 >then x will be marked as having an unknown base value.  Is there any
 >reason for this?  I can't see why the base value calculated for a
 >second or subsequent set is any less trustworthy than the first.
 >After all, the calculation is based on the register base values
 >from the previous step, which at this point are assumed to be sound.
I think the reason was simply we hadn't bothered with the case you

The code was basically trying to avoid the case where the register is set
to two unrelated values in different places -- we ignore control flow
and thus two unrelated sets must result in "no known base value" for
the target register.

If the multiple sets are from the same related base object, I agree, they
ought to be safe.

 >The patch below extends alias.c:record_set so that a second or subsequent
 >set of a register will not cause the base value to be invalidated if the
 >source of the set has the same base value as the first set had.

 >Tests on proprietary embedded benchmarks showed a nice improvement in a
 >few tests.  Bootstrapped & regression tested on mips64{,el}-linux-gnu.
 >OK to install?
 >	* alias.c (record_set): Detect the case where a register is assigned
 >	a new value that has the same base term as the old one.


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