This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR tree-optimzation/31081
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Jan Hubicka" <jh at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 31 Dec 2007 12:04:49 +0100
- Subject: Re: PR tree-optimzation/31081
- References: <20071230134549.GD25390@kam.mff.cuni.cz>
On Dec 30, 2007 2:45 PM, Jan Hubicka <jh@suse.cz> wrote:
> Hi,
> this testcase in ICE in out-of-ssa pass because we introduce abnormal
> PHI with overlapping liferange. It however just points to the fact that
> inlining into loops increase lifetime of uninitialized variables of
> function being inlinined.
>
> This patch handle it by initializing to 0 all uninitialized variables
> at the beggining of inlined function body. It is possible to do better
> - we can detect strongly connected regions of CFG and do initialization
> only in those and we can also do initialization to 0 lazilly, but this
> is bit expensive to do (one would need to maintain SCC and dominator
> information during inlining that would need some work) and I am not
> convinced it is worth the extra compilation time - I didn't measured any
> noticeable differences with this patch.
>
> Note that I am not quite convinced that
>
> + = build_gimple_modify_stmt (new,
> + fold_convert (TREE_TYPE (new),
> + integer_zero_node));
>
> is safe way to initialize all gimple regs to 0, but I don't know of
> better alternative.
This should work (it's used in other places as well). I suggested to
create a build_zero_cst () function for this at some point (to get
rid of the special coding in fold_convert), like I introduced
build_one_cst () sometime ago (because that isn't special-cased
in fold_convert ;)).
> Bootstrapped/regtsted i686-linux, OK?
Yes, this look reasonable. Please watch for fallout.
Thanks,
Richard.