This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix PR bootstrap/58509
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 8 Oct 2013 12:11:30 +0200
- Subject: Re: [patch] Fix PR bootstrap/58509
- Authentication-results: sourceware.org; auth=none
- References: <4797238 dot rpsq4UIoxF at polaris>
On Fri, Sep 27, 2013 at 1:17 PM, Eric Botcazou <ebotcazou@adacore.com> wrote:
> Hi,
>
> this fixes the ICE during the build of the Ada runtime on the SPARC, a fallout
> of the recent inliner changes:
> http://gcc.gnu.org/ml/gcc-patches/2013-09/msg01033.html
>
> The ICE is triggered because the ldd peephole merges an MEM with MEM_NOTRAP_P
> and a contiguous MEM without MEM_NOTRAP_P, keeping the MEM_NOTRAP_P flag on
> the result. As a consequence, an EH edge is eliminated and a BB is orphaned.
>
> I think this shows that my above inliner patch was too gross: when you have
> successive inlining, you can quickly end up with a mess of trapping and non-
> trapping memory accesses for the same object. So the attached seriously
> refines it, restricting it to parameters with reference type and leaning
> towards being less conservative. Again, this should only affect Ada.
>
> Tested on x86_64-suse-linux, OK for the mainline?
This is getting somewhat gross ... what about clearing all TREE_NO_TRAPs
on inlining?
Otherwise I think the "proper" way is to teach passes that moving loads/stores
eventually has to clear TREE_NO_TRAP ... (a reason that for example
VRP cannot set TREE_NO_TRAP on dereferences of pointers that have
a non-NULL range...).
Richard.
> 2013-09-27 Eric Botcazou <ebotcazou@adacore.com>
>
> PR bootstrap/58509
> * ipa-prop.h (get_ancestor_addr_info): Declare.
> * ipa-prop.c (get_ancestor_addr_info): Make public.
> * tree-inline.c (is_parm): Rename into...
> (is_ref_parm): ...this.
> (is_based_on_ref_parm): New predicate.
> (remap_gimple_op_r): Do not propagate TREE_THIS_NOTRAP on MEM_REF if
> a parameter with reference type has been remapped and the result is
> not based on another parameter with reference type.
> (copy_tree_body_r): Likewise on INDIRECT_REF and MEM_REF.
>
>
> 2013-09-27 Eric Botcazou <ebotcazou@adacore.com>
>
> * gnat.dg/specs/opt1.ads: New test.
>
>
> --
> Eric Botcazou