On Mon, Sep 5, 2011 at 9:41 AM, Jan Hubicka <hubi...@ucw.cz> wrote:
> Hi,
> this is patch I comitted fixing ipa-inline-analysis.  Stil I guess we should
> fill in PR for missed optimization and solve the forwprop issue?

I'm looking at it, it seems to be cfgcleanups bug

Richard.

> Honza
>
> Index: ChangeLog
> ===================================================================
> *** ChangeLog   (revision 178523)
> --- ChangeLog   (working copy)
> ***************
> *** 1,3 ****
> --- 1,8 ----
> + 2011-09-04  Jan Hubicka  <j...@suse.cz>
> +
> +       * ipa-inline-analysis.c (set_cond_stmt_execution_predicate): Check 
> that
> +       parameter is SSA name.
> +
>  2011-09-04  Richard Guenther  <rguent...@suse.de>
>
>        Revert
> Index: testsuite/gcc.c-torture/compile/20110902.c
> ===================================================================
> *** testsuite/gcc.c-torture/compile/20110902.c  (revision 0)
> --- testsuite/gcc.c-torture/compile/20110902.c  (revision 0)
> ***************
> *** 0 ****
> --- 1,14 ----
> + static inline __attribute__((always_inline)) int f (unsigned int n, 
> unsigned int size)
> + {
> +  return (__builtin_constant_p (size != 0 && n > ~0 / size)
> +          ? !!(size != 0 && n > ~0 / size)
> +          : ({ static unsigned int count[2] = { 0, 0 };
> +               int r = !!(size != 0 && n > ~0 / size);
> +               count[r]++;
> +               r; }));
> + }
> +
> + int g (unsigned int size)
> + {
> +  return f (size / 4096, 4);
> + }
> Index: testsuite/ChangeLog
> ===================================================================
> *** testsuite/ChangeLog (revision 178523)
> --- testsuite/ChangeLog (working copy)
> ***************
> *** 1,3 ****
> --- 1,7 ----
> + 2011-09-04  Jan Hubicka  <j...@suse.cz>
> +
> +       * gcc.c-torture/compile/20110902.c: new testcase.
> +
>  2011-09-04  Jason Merrill  <ja...@redhat.com>
>
>        PR c++/49267
> Index: ipa-inline-analysis.c
> ===================================================================
> *** ipa-inline-analysis.c       (revision 178523)
> --- ipa-inline-analysis.c       (working copy)
> *************** set_cond_stmt_execution_predicate (struc
> *** 1187,1192 ****
> --- 1187,1194 ----
>        || gimple_call_num_args (set_stmt) != 1)
>      return;
>    op2 = gimple_call_arg (set_stmt, 0);
> +   if (TREE_CODE (op2) != SSA_NAME)
> +     return;
>    if (!SSA_NAME_IS_DEFAULT_DEF (op2))
>      return;
>    index = ipa_get_param_decl_index (info, SSA_NAME_VAR (op2));
>

Reply via email to