This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Regimplify during inlining whenever some ADDR_EXPR loses TREE_INVARIANT because of inlining substitutions (PR middle-end/34018)
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Jakub Jelinek" <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 9 Nov 2007 10:55:37 +0100
- Subject: Re: [PATCH] Regimplify during inlining whenever some ADDR_EXPR loses TREE_INVARIANT because of inlining substitutions (PR middle-end/34018)
- References: <20071109001247.GV5451@devserv.devel.redhat.com>
On 11/9/07, Jakub Jelinek <firstname.lastname@example.org> wrote:
> When &<result>.something is inlined, the <result> in there can
> be replaced by something else which is no longer TREE_INVARIANT
> and thus the whole becomes no longer GIMPLE. copy_bb
> handles one case of this (and recently also copy_his_for_bb),
> but as can be seen on the attached testcase the problem can be seen
> on arbitrary places within GIMPLE expressions.
> Regimplifying everything would be too costly, so fixed by adding
> a floag where copy_body_r can tell the caller copy_bb if regimplification
> should be attempted.
> Tested on x86_64-linux, ok for trunk?
This is ok.
> 2007-11-08 Jakub Jelinek <email@example.com>
> PR middle-end/34018
> * tree-inline.h (copy_body_data): Add regimplify field.
> * tree-inline.c (copy_body_r): Set id->regimplify to true
> if an TREE_INVARIANT ADDR_EXPR is no longer invariant after
> (copy_bb): Clear id->regimplify before walk_tree, if it is
> set afterwards, regimplify the whole statement.
> * g++.dg/opt/inline14.C: New test.