This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Make CCP effectively remove UNDEFINED defs
- From: Marc Glisse <marc dot glisse at inria dot fr>
- To: Richard Biener <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 4 Nov 2015 10:35:16 +0100 (CET)
- Subject: Re: [PATCH] Make CCP effectively remove UNDEFINED defs
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LSU dot 2 dot 11 dot 1511040954330 dot 10078 at zhemvz dot fhfr dot qr>
- Reply-to: gcc-patches at gcc dot gnu dot org
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