This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix ifcombine (PR tree-optimization/70586)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 8 Apr 2016 22:00:58 +0200
- Subject: Re: [PATCH] Fix ifcombine (PR tree-optimization/70586)
- Authentication-results: sourceware.org; auth=none
- References: <20160408171648 dot GZ19207 at tucnak dot redhat dot com> <5BCE45D4-6C6E-4B88-BFDD-E4FDA73A1134 at suse dot de>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Apr 08, 2016 at 09:14:33PM +0200, Richard Biener wrote:
> Hmm, I think this means GIMPLE_has_side_effects is to be fixed then.
> Note that honza had plans to compute things like 'uses FP' and 'contains arith with undefined overflow' and propagate that alongside pure/const-ness.
>
> Can you try to asses the impact of fixing no-side-effects?
That sounds extremely risky to me, there are lots of callers of that, and
many really don't care, they e.g. check if they can remove the stmt, or
if it can be moved towards the exit block, etc.
Plus even other side-effects like maybe throwing are not included in
gimple_has_side_effects and are tested separately.
Maybe just return true on all calls in gimple_could_trap_p, but even that
has 5 other callers that would need to be carefully analyzed. Even that
looks too risky for late stage4 to me.
Jakub