This is the mail archive of the gcc-bugs@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]

[Bug middle-end/17549] [4.0 Regression] 25% increase in codesize (3.3.4 -> 4.0.0 20040917)


------- Additional Comments From rakdver at atrey dot karlin dot mff dot cuni dot cz  2004-09-28 15:15 -------
Subject: Re:  [4.0 Regression] 25% increase in codesize (3.3.4 -> 4.0.0 20040917)

This patch (for quite stupid bug in ivopts) could improve the situation
a bit.  I will post it once it passes regtesting.

Index: tree-ssa-loop-ivopts.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-loop-ivopts.c,v
retrieving revision 2.15
diff -c -3 -p -r2.15 tree-ssa-loop-ivopts.c
*** tree-ssa-loop-ivopts.c	28 Sep 2004 07:59:52 -0000	2.15
--- tree-ssa-loop-ivopts.c	28 Sep 2004 15:08:58 -0000
*************** struct ivopts_data
*** 218,223 ****
--- 218,226 ----
    /* The candidates.  */
    varray_type iv_candidates;
  
+   /* A bitmap of important candidates.  */
+   bitmap important_candidates;
+ 
    /* Whether to consider just related and important candidates when replacing a
       use.  */
    bool consider_all_candidates;
*************** find_best_candidate (struct ivopts_data 
*** 3431,3437 ****
    else
      {
        asol = BITMAP_XMALLOC ();
!       bitmap_a_and_b (asol, sol, use->related_cands);
      }
  
    EXECUTE_IF_SET_IN_BITMAP (asol, 0, c, bi)
--- 3434,3442 ----
    else
      {
        asol = BITMAP_XMALLOC ();
! 
!       bitmap_a_or_b (asol, data->important_candidates, use->related_cands);
!       bitmap_a_and_b (asol, asol, sol);
      }
  
    EXECUTE_IF_SET_IN_BITMAP (asol, 0, c, bi)
*************** find_optimal_iv_set (struct ivopts_data 
*** 3698,3703 ****
--- 3703,3717 ----
    bitmap inv = BITMAP_XMALLOC ();
    struct iv_use *use;
  
+   data->important_candidates = BITMAP_XMALLOC ();
+   for (i = 0; i < n_iv_cands (data); i++)
+     {
+       struct iv_cand *cand = iv_cand (data, i);
+ 
+       if (cand->important)
+ 	bitmap_set_bit (data->important_candidates, i);
+     }
+ 
    /* Set the upper bound.  */
    cost = get_initial_solution (data, set, inv);
    if (cost == INFTY)
*************** find_optimal_iv_set (struct ivopts_data 
*** 3740,3745 ****
--- 3754,3760 ----
      }
  
    BITMAP_XFREE (inv);
+   BITMAP_XFREE (data->important_candidates);
  
    return set;
  }


-- 


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


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