public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "William J. Schmidt" <wschmidt@linux.vnet.ibm.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: Richard Guenther <richard.guenther@gmail.com>,
	gcc-patches@gcc.gnu.org,        bergner@vnet.ibm.com
Subject: Re: [PATCH] Fix PR18589
Date: Thu, 12 Apr 2012 17:15:00 -0000	[thread overview]
Message-ID: <1334250891.6799.2.camel@oc2474580526.ibm.com> (raw)
In-Reply-To: <CAMe9rOpzTpeaH=305MopUOmM0as9KadYpHx+8bpZbvWZ9FdtEQ@mail.gmail.com>

On Thu, 2012-04-12 at 09:50 -0700, H.J. Lu wrote:
> On Thu, Apr 5, 2012 at 6:49 AM, William J. Schmidt
> <wschmidt@linux.vnet.ibm.com> wrote:
> > On Thu, 2012-04-05 at 11:23 +0200, Richard Guenther wrote:
> >> On Wed, Apr 4, 2012 at 9:15 PM, William J. Schmidt
> >> <wschmidt@linux.vnet.ibm.com> wrote:
> >> >
> >> > Unfortunately this seems to be necessary if I name the two passes
> >> > "reassoc1" and "reassoc2".  If I try to name both of them "reassoc" I
> >> > get failures in other tests like gfortran.dg/reassoc_4, where
> >> > -fdump-tree-reassoc1 doesn't work.  Unless I'm missing something
> >> > obvious, I think I need to keep that change.
> >>
> >> Hm, naming them "reassoc1" and "reassoc2" is a hack.  Naming both
> >> "reassoc" will not trigger re-naming them to reassoc1 and reassoc2
> >> I think.  How ugly.  Especially that -fdump-tree-reassoc will no longer
> >> work.  Maybe instead of using two pass structs resort to using
> >> the existing hack with using first_pass_instance and TODO_mark_first_instance.
> >
> > OK, that seems to be the best among evils.  Using the
> > first_pass_instance hack, the patch is transformed as below.
> > Regstrapped on powerpc64-linux, no additional failures.  OK for trunk?
> >
> > Thanks,
> > Bill
> >
> >
> > gcc:
> >
> > 2012-04-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
> >
> >        PR tree-optimization/18589
> >        * tree-ssa-reassoc.c (reassociate_stats): Add two fields.
> >        (operand_entry): Add count field.
> >        (add_repeat_to_ops_vec): New function.
> >        (completely_remove_stmt): Likewise.
> >        (remove_def_if_absorbed_call): Likewise.
> >        (remove_visited_stmt_chain): Remove feeding builtin pow/powi calls.
> >        (acceptable_pow_call): New function.
> >        (linearize_expr_tree): Look for builtin pow/powi calls and add operand
> >        entries with repeat counts when found.
> >        (repeat_factor_d): New struct and associated typedefs.
> >        (repeat_factor_vec): New static vector variable.
> >        (compare_repeat_factors): New function.
> >        (get_reassoc_pow_ssa_name): Likewise.
> >        (attempt_builtin_powi): Likewise.
> >        (reassociate_bb): Call attempt_builtin_powi.
> >        (fini_reassoc): Two new calls to statistics_counter_event.
> >
> 
> It breaks bootstrap on Linux/ia32:
> 
> ../../src-trunk/gcc/tree-ssa-reassoc.c: In function 'void
> attempt_builtin_powi(gimple, VEC_operand_entry_t_heap**,
> tree_node**)':
> ../../src-trunk/gcc/tree-ssa-reassoc.c:3189:41: error: format '%ld'
> expects argument of type 'long int', but argument 3 has type 'long
> long int' [-Werror=format]
>      fprintf (dump_file, ")^%ld\n", power);
>                                          ^
> ../../src-trunk/gcc/tree-ssa-reassoc.c:3222:44: error: format '%ld'
> expects argument of type 'long int', but argument 3 has type 'long
> long int' [-Werror=format]
>         fprintf (dump_file, ")^%ld\n", power);
>                                             ^
> cc1plus: all warnings being treated as errors
> 
> 
> H.J.
> 

Whoops.  Looks like I need to use HOST_WIDE_INT_PRINT_DEC instead of %ld
in those spots.  I'll get a fix prepared.

  reply	other threads:[~2012-04-12 17:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-06 20:49 William J. Schmidt
2012-03-28 13:57 ` Richard Guenther
2012-03-28 16:44   ` William J. Schmidt
2012-04-03 20:25   ` William J. Schmidt
2012-04-04 11:35     ` Richard Guenther
2012-04-04 12:35       ` William J. Schmidt
2012-04-04 13:08         ` Richard Guenther
2012-04-04 19:16           ` William J. Schmidt
2012-04-05  9:24             ` Richard Guenther
2012-04-05 13:50               ` William J. Schmidt
2012-04-12 14:43                 ` Richard Guenther
2012-04-12 16:50                 ` H.J. Lu
2012-04-12 17:15                   ` William J. Schmidt [this message]
2012-04-12 21:19                   ` William J. Schmidt
2012-04-04 22:01       ` William J. Schmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1334250891.6799.2.camel@oc2474580526.ibm.com \
    --to=wschmidt@linux.vnet.ibm.com \
    --cc=bergner@vnet.ibm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hjl.tools@gmail.com \
    --cc=richard.guenther@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).