public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rakdver at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/17387] Redundant instructions in loop optimization
Date: Sat, 11 Sep 2004 19:55:00 -0000	[thread overview]
Message-ID: <20040911195537.4958.qmail@sourceware.org> (raw)
In-Reply-To: <20040909235415.17387.hjl@lucon.org>


------- Additional Comments From rakdver at gcc dot gnu dot org  2004-09-11 19:55 -------
ivopts gets rid of the extends once the record_bounds pass is enabled by the 
following patch.  The nonsensical "mov     %eax, %eax" type moves however
still remain in the code.

Zdenek

Index: tree-optimize.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-optimize.c,v
retrieving revision 2.45
diff -c -3 -p -r2.45 tree-optimize.c
*** tree-optimize.c     9 Sep 2004 20:53:36 -0000       2.45
--- tree-optimize.c     11 Sep 2004 19:44:56 -0000
*************** init_tree_optimization_passes (void)
*** 392,397 ****
--- 392,398 ----
    NEXT_PASS (pass_loop_init);
    NEXT_PASS (pass_lim);
    NEXT_PASS (pass_iv_canon);
+   NEXT_PASS (pass_record_bounds);
    NEXT_PASS (pass_if_conversion);
    NEXT_PASS (pass_vectorize);
    NEXT_PASS (pass_linear_transform);
Index: tree-pass.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-pass.h,v
retrieving revision 2.15
diff -c -3 -p -r2.15 tree-pass.h
*** tree-pass.h 9 Sep 2004 20:53:37 -0000       2.15
--- tree-pass.h 11 Sep 2004 19:44:56 -0000
*************** extern struct tree_opt_pass pass_loop;
*** 126,131 ****
--- 126,132 ----
  extern struct tree_opt_pass pass_loop_init;
  extern struct tree_opt_pass pass_lim;
  extern struct tree_opt_pass pass_iv_canon;
+ extern struct tree_opt_pass pass_record_bounds;
  extern struct tree_opt_pass pass_if_conversion;
  extern struct tree_opt_pass pass_vectorize;
  extern struct tree_opt_pass pass_complete_unroll;
Index: tree-ssa-loop.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-loop.c,v
retrieving revision 2.17
diff -c -3 -p -r2.17 tree-ssa-loop.c
*** tree-ssa-loop.c     8 Sep 2004 15:28:56 -0000       2.17
--- tree-ssa-loop.c     11 Sep 2004 19:44:57 -0000
*************** struct tree_opt_pass pass_iv_canon =
*** 263,268 ****
--- 263,297 ----
    0                                   /* letter */
  };

+ /* Record bounds on numbers of iterations of loops.  */
+
+ static void
+ tree_ssa_loop_bounds (void)
+ {
+   if (!current_loops)
+     return;
+
+   estimate_numbers_of_iterations (current_loops);
+   scev_reset ();
+ }
+
+ struct tree_opt_pass pass_record_bounds =
+ {
+   "bounds",                           /* name */
+   NULL,                                       /* gate */
+   tree_ssa_loop_bounds,                       /* execute */
+   NULL,                                       /* sub */
+   NULL,                                       /* next */
+   0,                                  /* static_pass_number */
+   0,                                  /* tv_id */
+   PROP_cfg | PROP_ssa,                        /* properties_required */
+   0,                                  /* properties_provided */
+   0,                                  /* properties_destroyed */
+   0,                                  /* todo_flags_start */
+   0,                                  /* todo_flags_finish */
+   0                                   /* letter */
+ };
+
  /* Complete unrolling of loops.  */

  static void


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17387


  parent reply	other threads:[~2004-09-11 19:55 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-09 23:54 [Bug c/17387] New: " hjl at lucon dot org
2004-09-10  0:36 ` [Bug rtl-optimization/17387] " pinskia at gcc dot gnu dot org
2004-09-10  2:50 ` law at gcc dot gnu dot org
2004-09-10  8:05 ` pinskia at gcc dot gnu dot org
2004-09-10  9:53 ` hubicka at gcc dot gnu dot org
2004-09-10 23:22 ` pinskia at gcc dot gnu dot org
2004-09-11 19:55 ` rakdver at gcc dot gnu dot org [this message]
2004-11-27 20:49 ` pinskia at gcc dot gnu dot org
2005-01-23 13:36 ` steven at gcc dot gnu dot org
2005-01-24 18:17 ` hjl at lucon dot org
2005-01-24 18:53 ` pinskia at gcc dot gnu dot org
2005-01-27  1:27 ` steven at gcc dot gnu dot org
2005-01-27  1:36 ` steven at gcc dot gnu dot org
2005-01-27  1:43 ` steven at gcc dot gnu dot org
2005-01-27  4:03 ` hjl at lucon dot org
2005-01-27  6:05 ` rth at gcc dot gnu dot org
2005-01-27  7:14 ` stevenb at suse dot de
2005-01-27 10:14 ` steven at gcc dot gnu dot org
2005-01-27 10:27 ` steven at gcc dot gnu dot org
2005-01-27 10:28 ` steven at gcc dot gnu dot org
2005-01-27 13:36 ` pinskia at gcc dot gnu dot org
2005-09-29  3:44 ` pinskia at gcc dot gnu dot org
     [not found] <bug-17387-682@http.gcc.gnu.org/bugzilla/>
2006-01-15 20:30 ` pinskia at gcc dot gnu dot org
2006-02-27 23:55 ` hjl at lucon dot org
2007-04-20 20:58 ` steven at gcc dot gnu dot org
2007-04-20 21:10 ` steven at gcc dot gnu dot org
2007-05-25 20:32 ` steven at gcc dot gnu dot org

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=20040911195537.4958.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).