This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Allow tree-ssa Forward Prop to produce VIEW_CONVERT_EXPR in some cases


On Mon, May 5, 2008 at 6:40 AM, Andrew Pinski <pinskia@gmail.com> wrote:
> On Fri, May 2, 2008 at 4:12 AM, Andrew Pinski <pinskia@gmail.com> wrote:
>  >  Hmm, yes to both the above.  Guess I have to look more into this than
>  >  just that.  I will add both of these testcases.
>
>  So there was a change between 4.1.1 and the trunk I did not notice
>  until now which caused volatile checks needed to be added.  Before in
>  4.1.1, we used to not look at volatile use statements but now on the
>  trunk we do.
>
>
>  >  >  Also if you cannot use fold_build1 because of the invalid gimple issue,
>  >  >  won't you run into this problem with fold_stmt as well?
>  >
>  >  For some reason fold_stmt does not change it, I think it tries but
>  >  rejects it as invalid gimple.
>
>  Here is the new patch which fixes all three problems; we also fold the
>  VCE now and regimplify the statement when needed.
>
>
>  OK? Bootstrapped and tested on i686-linux-gnu with no regressions.

This is ok for trunk.  Please have an eye on possible fallouts (we'll now create
a V_C_E if we get trees with wrong types rather than not doing the substitution
in some cases).

Thanks,
Richard.

>  Thanks,
>  Andrew Pinski
>
>
>  * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): If we have the
>  same size types for the indirect reference on the rhs, then create a VCE.
>
>  * gcc.dg/tree-ssa/forwprop-5.c: New testcase.
>  * gcc.dg/tree-ssa/forwprop-6.c: New testcase.
>  * gcc.dg/tree-ssa/forwprop-7.c: New testcase.
>  * gcc.dg/tree-ssa/forwprop-8.c: New testcase.
>  * gcc.dg/tree-ssa/forwprop-9.c: New testcase.
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]