This is the mail archive of the gcc-patches@gcc.gnu.org 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: [PATCH] Make CCP effectively remove UNDEFINED defs


On Wed, 4 Nov 2015, Richard Biener wrote:

The following patch makes sure that CCP when it computes a lattice
value to UNDEFINED ends up replacing uses with default defs (and thus
removes such UNDEFINED producing defs).  This optimizes the testcase
below to

 <bb 2>:
 return _6(D);

in the first CCP.  Note this patch isn't mainly for the optimization
it does but for making it easier to discover cases where CCP gets
UNDEFINED wrong (similar to VRP2 re-using the range-info that is
still live on SSA names - that's to catch bogus range-info).

If the experiment works out (read: bootstrap / test completes
successfully) I'm going to enhance VRP and will also look at
how value-numbering could do a similar job.

Cool, the VN part might help with https://gcc.gnu.org/ml/gcc-patches/2015-05/msg01556.html
:-)

It might also help removing unreachable (undefined) code earlier
of course.

--
Marc Glisse


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