public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Help on loop peeling
@ 2009-08-13 13:48 Eric Fisher
  2009-08-13 16:05 ` Sebastian Pop
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Fisher @ 2009-08-13 13:48 UTC (permalink / raw)
  To: gcc

Hi,

I'm implementing a loop peeling function used in
tree-ssa-loop-prefetch.c according to the following comment,

/* Step 5: unroll the loop.  TODO -- peeling of first and last few
     iterations so that we do not issue superfluous prefetches.  */

I take the functions slpeel_* in tree-vercterizer.c as a reference.
Firstly generate a loop copy and then reset the niters of the first
loop.
But, a bug occurs during the out-of-ssa pass.  For now I just know it
is caused by reseting the niters (actually, I use the
slpeel_make_loop_iterate_ntimes),
but can't see the deep reason. Who can give me some suggestions?

The original loop looks like this,

loop_9 (header = 51, latch = 52, niter = D.1620_125 + 4294967295,
upper_bound = 4294967295)
{
  bb_51 (preds = {bb_52 bb_50 }, succs = {bb_52 bb_53 })
  {
  <bb 51>:
    # i_298 = PHI <i_163(52), 0(50)>
    # SMT.23_307 = PHI <SMT.23_270(52), SMT.23_263(50)>
    # SMT.24_305 = PHI <SMT.24_266(52), SMT.24_247(50)>
    # SMT.26_303 = PHI <SMT.26_268(52), SMT.26_249(50)>
    # SMT.27_300 = PHI <SMT.27_271(52), SMT.27_264(50)>
    # prephitmp.192_538 = PHI <D.1634_162(52), 0(50)>
    # SMT.244_531 = PHI <SMT.244_606(52), SMT.244_605(50)>
    D.1629_157 = ImageOutPtr_127 + i_298;
    # VUSE <SMT.23_307, SMT.24_305, SMT.26_303, SMT.27_300,
SMT.244_531> { SMT.23 SMT.24 SMT.26 SMT.27 SMT.244 }
    D.1630_158 = *D.1629_157;
    D.1631_159 = (int) D.1630_158;
    D.1633_161 = (int) prephitmp.192_538;
    # SMT.23_265 = VDEF <SMT.23_307>
    # SMT.24_266 = VDEF <SMT.24_305>
    # SMT.26_268 = VDEF <SMT.26_303>
    # SMT.27_269 = VDEF <SMT.27_300>
    # SMT.244_606 = VDEF <SMT.244_531> { SMT.23 SMT.24 SMT.26 SMT.27 SMT.244 }
    D.1634_162 = Calc_crc16 (D.1631_159, D.1633_161);
    # SMT.23_270 = VDEF <SMT.23_265>
    # SMT.27_271 = VDEF <SMT.27_269> { SMT.23 SMT.27 }
    tcdef_129(D)->CRC = D.1634_162;
    i_163 = i_298 + 1;
    if (D.1620_125 > i_163)
      goto <bb 52>;
    else
      goto <bb 53>;

  }
  bb_52 (preds = {bb_51 }, succs = {bb_51 })
  {
  <bb 52>:
    goto <bb 51>;

  }
}

After loop copying and niters reseting,

  loop_10 (header = 56, latch = 57, niter = )
  {
    bb_56 (preds = {bb_57 bb_51 }, succs = {bb_57 bb_53 })
    {
    <bb 56>:
      # i_302 = PHI <i_620(57), i_163(51)>
      # SMT.23_304 = PHI <SMT.23_622(57), SMT.23_270(51)>
      # SMT.24_295 = PHI <SMT.24_506(57), SMT.24_266(51)>
      # SMT.26_109 = PHI <SMT.26_505(57), SMT.26_268(51)>
      # SMT.27_323 = PHI <SMT.27_621(57), SMT.27_271(51)>
      # prephitmp.192_322 = PHI <D.1634_508(57), D.1634_162(51)>
      # SMT.244_174 = PHI <SMT.244_623(57), SMT.244_606(51)>
      D.1629_524 = ImageOutPtr_127 + i_302;
      # VUSE <SMT.23_304, SMT.24_295, SMT.26_109, SMT.27_323,
SMT.244_174> { SMT.23 SMT.24 SMT.26 SMT.27 SMT.244 }
      D.1630_516 = *D.1629_524;
      D.1631_629 = (int) D.1630_516;
      D.1633_509 = (int) prephitmp.192_322;
      # SMT.23_507 = VDEF <SMT.23_304>
      # SMT.24_506 = VDEF <SMT.24_295>
      # SMT.26_505 = VDEF <SMT.26_109>
      # SMT.27_624 = VDEF <SMT.27_323>
      # SMT.244_623 = VDEF <SMT.244_174> { SMT.23 SMT.24 SMT.26 SMT.27 SMT.244 }
      D.1634_508 = Calc_crc16 (D.1631_629, D.1633_509);
      # SMT.23_622 = VDEF <SMT.23_507>
      # SMT.27_621 = VDEF <SMT.27_624> { SMT.23 SMT.27 }
      tcdef_129(D)->CRC = D.1634_508;
      i_620 = i_302 + 1;
      if (D.1620_125 > i_620)
        goto <bb 57>;
      else
        goto <bb 53>;

    }
    bb_57 (preds = {bb_56 }, succs = {bb_56 })
    {
    <bb 57>:
      goto <bb 56>;

    }
  }
  loop_9 (header = 51, latch = 52, niter = , upper_bound = 4294967295)
  {
    bb_51 (preds = {bb_52 bb_50 }, succs = {bb_52 bb_56 })
    {
    <bb 51>:
      # i_298 = PHI <i_163(52), 0(50)>
      # SMT.23_307 = PHI <SMT.23_270(52), SMT.23_263(50)>
      # SMT.24_305 = PHI <SMT.24_266(52), SMT.24_247(50)>
      # SMT.26_303 = PHI <SMT.26_268(52), SMT.26_249(50)>
      # SMT.27_300 = PHI <SMT.27_271(52), SMT.27_264(50)>
      # prephitmp.192_538 = PHI <D.1634_162(52), 0(50)>
      # SMT.244_531 = PHI <SMT.244_606(52), SMT.244_605(50)>
      # ivtmp.245_615 = PHI <ivtmp.245_614(52), 0(50)>
      D.1629_157 = ImageOutPtr_127 + i_298;
      # VUSE <SMT.23_307, SMT.24_305, SMT.26_303, SMT.27_300,
SMT.244_531> { SMT.23 SMT.24 SMT.26 SMT.27 SMT.244 }
      D.1630_158 = *D.1629_157;
      D.1631_159 = (int) D.1630_158;
      D.1633_161 = (int) prephitmp.192_538;
      # SMT.23_265 = VDEF <SMT.23_307>
      # SMT.24_266 = VDEF <SMT.24_305>
      # SMT.26_268 = VDEF <SMT.26_303>
      # SMT.27_269 = VDEF <SMT.27_300>
      # SMT.244_606 = VDEF <SMT.244_531> { SMT.23 SMT.24 SMT.26 SMT.27 SMT.244 }
      D.1634_162 = Calc_crc16 (D.1631_159, D.1633_161);
      # SMT.23_270 = VDEF <SMT.23_265>
      # SMT.27_271 = VDEF <SMT.27_269> { SMT.23 SMT.27 }
      tcdef_129(D)->CRC = D.1634_162;
      i_163 = i_298 + 1;
      ivtmp.245_614 = ivtmp.245_615 + 1;
      if (ivtmp.245_614 < 10)
        goto <bb 52>;
      else
        goto <bb 56>;

    }
    bb_52 (preds = {bb_51 }, succs = {bb_51 })
    {
    <bb 52>:
      goto <bb 51>;

    }
  }

The error is reported in build2_stat, by

gcc_assert (POINTER_TYPE_P (tt) && POINTER_TYPE_P (TREE_TYPE (arg0))
		&& INTEGRAL_TYPE_P (TREE_TYPE (arg1))
		&& useless_type_conversion_p (sizetype, TREE_TYPE (arg1)));

(gdb) bt
#0  fancy_abort (file=0x8747f60 "../../gcc-4.4.0/gcc/tree.c", line=3303,
    function=0x874953d "build2_stat") at ../../gcc-4.4.0/gcc/diagnostic.c:712
#1  0x0849ed4d in build2_stat (code=POINTER_PLUS_EXPR, tt=0xb7d11478,
    arg0=0xb7d10aa8, arg1=0xb7b59840) at ../../gcc-4.4.0/gcc/tree.c:3301
#2  0x0860179f in gimple_assign_rhs_to_tree (stmt=0xb7b60780)
    at ../../gcc-4.4.0/gcc/cfgexpand.c:59
#3  0x083a02b8 in replace_use_variable (map=0x89ba758, p=0xb7b484d4,
    expr=0x89ed7b0) at ../../gcc-4.4.0/gcc/tree-outof-ssa.c:567
#4  0x083a06cb in rewrite_trees (map=0x89ba758, values=0x89ed7b0)
    at ../../gcc-4.4.0/gcc/tree-outof-ssa.c:774
#5  0x083a19d4 in remove_ssa_form (perform_ter=1 '\001')
    at ../../gcc-4.4.0/gcc/tree-outof-ssa.c:1381
#6  0x083a1d9b in rewrite_out_of_ssa ()
    at ../../gcc-4.4.0/gcc/tree-outof-ssa.c:1506

Thanks,
Eric

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help on loop peeling
  2009-08-13 13:48 Help on loop peeling Eric Fisher
@ 2009-08-13 16:05 ` Sebastian Pop
  2009-08-13 18:40   ` Richard Guenther
  2009-08-14 17:02   ` Eric Fisher
  0 siblings, 2 replies; 6+ messages in thread
From: Sebastian Pop @ 2009-08-13 16:05 UTC (permalink / raw)
  To: Eric Fisher; +Cc: gcc

Hi,

On Thu, Aug 13, 2009 at 04:02, Eric Fisher<joefoxreal@gmail.com> wrote:
> The error is reported in build2_stat, by
>
> gcc_assert (POINTER_TYPE_P (tt) && POINTER_TYPE_P (TREE_TYPE (arg0))
>                && INTEGRAL_TYPE_P (TREE_TYPE (arg1))
>                && useless_type_conversion_p (sizetype, TREE_TYPE (arg1)));
>

I also have been bitten by this one in out of Graphite, so I may be able
to remember the solution ;-)  Looks like you insert some code that has
a conversion producing this error.

Could you please send the patch you are working on, together with
a reduced testcase?  This could help to reproduce the error.

Thanks,
Sebastian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help on loop peeling
  2009-08-13 16:05 ` Sebastian Pop
@ 2009-08-13 18:40   ` Richard Guenther
  2009-08-14 17:02   ` Eric Fisher
  1 sibling, 0 replies; 6+ messages in thread
From: Richard Guenther @ 2009-08-13 18:40 UTC (permalink / raw)
  To: Sebastian Pop; +Cc: Eric Fisher, gcc

On Thu, Aug 13, 2009 at 4:41 PM, Sebastian Pop<sebpop@gmail.com> wrote:
> Hi,
>
> On Thu, Aug 13, 2009 at 04:02, Eric Fisher<joefoxreal@gmail.com> wrote:
>> The error is reported in build2_stat, by
>>
>> gcc_assert (POINTER_TYPE_P (tt) && POINTER_TYPE_P (TREE_TYPE (arg0))
>>                && INTEGRAL_TYPE_P (TREE_TYPE (arg1))
>>                && useless_type_conversion_p (sizetype, TREE_TYPE (arg1)));
>>
>
> I also have been bitten by this one in out of Graphite, so I may be able
> to remember the solution ;-)  Looks like you insert some code that has
> a conversion producing this error.
>
> Could you please send the patch you are working on, together with
> a reduced testcase?  This could help to reproduce the error.

Note that Eric is not working on trunk but at most 4.4 ...

Richard.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help on loop peeling
  2009-08-13 16:05 ` Sebastian Pop
  2009-08-13 18:40   ` Richard Guenther
@ 2009-08-14 17:02   ` Eric Fisher
  2009-08-14 18:32     ` Sebastian Pop
  1 sibling, 1 reply; 6+ messages in thread
From: Eric Fisher @ 2009-08-14 17:02 UTC (permalink / raw)
  To: Sebastian Pop; +Cc: gcc

2009/8/13 Sebastian Pop <sebpop@gmail.com>:

> Could you please send the patch you are working on, together with
> a reduced testcase?  This could help to reproduce the error.

Thanks.

I put the patch and a test below. The patch is based on 4.4.0. It's
just a toy, I haven't a nice design for now.

Actually, first_niters shouldn't be calculated in this way.

--- gcc-4.4.0/gcc/tree-ssa-loop-manip.c	2009-02-20 23:20:38.000000000 +0800
+++ new-gcc-4.4.0/gcc/tree-ssa-loop-manip.c	2009-08-14 11:28:44.000000000 +0800
@@ -1089,3 +1089,41 @@ tree_unroll_loop (struct loop *loop, uns
   tree_transform_and_unroll_loop (loop, factor, exit, desc,
 				  NULL, NULL);
 }
+
+/* Peel off the first or last few iterations of the loop. */
+
+struct loop *
+tree_peel_loop (struct loop *loop, unsigned num,
+                edge e, struct tree_niter_desc *desc)
+{
+  struct loop *new_loop, *first_loop, *second_loop;
+  tree first_niters;
+  edge exit_e = single_exit (loop);
+
+  if (!slpeel_can_duplicate_loop_p (loop, e))
+    return NULL;
+
+  new_loop = slpeel_tree_duplicate_loop_to_edge_cfg (loop, e);
+
+  if (e == exit_e)
+    {
+      /* NEW_LOOP was placed after LOOP.  */
+      first_loop = loop;
+      second_loop = new_loop;
+    }
+  else
+    {
+      /* NEW_LOOP was placed before LOOP.  */
+      first_loop = new_loop;
+      second_loop = loop;
+    }
+
+  slpeel_update_phis_for_duplicate_loop (loop, new_loop, e == exit_e);
+  rename_variables_in_loop (new_loop);
+
+  first_niters = build_int_cst (integer_type_node, num);
+
+  slpeel_make_loop_iterate_ntimes (first_loop, first_niters);
+
+  return new_loop;
+}
--- gcc-4.4.0/gcc/tree-ssa-loop-prefetch.c	2009-03-05 01:50:20.000000000 +0800
+++ new-gcc-4.4.0/gcc/tree-ssa-loop-prefetch.c	2009-08-14
11:25:53.000000000 +0800
@@ -1459,7 +1459,7 @@ loop_prefetch_arrays (struct loop *loop)
   unsigned ahead, ninsns, time, unroll_factor;
   HOST_WIDE_INT est_niter;
   struct tree_niter_desc desc;
-  bool unrolled = false, no_other_refs;
+  bool unrolled_or_peeled = false, no_other_refs;

   if (optimize_loop_nest_for_size_p (loop))
     {
@@ -1511,13 +1511,20 @@ loop_prefetch_arrays (struct loop *loop)
   if (!schedule_prefetches (refs, unroll_factor, ahead))
     goto fail;

-  /* Step 5: unroll the loop.  TODO -- peeling of first and last few
+  /* step 5: peel off the last few iterations. */
+  if (ahead > 0)
+    {
+      if (tree_peel_loop (loop, ahead, single_exit (loop), &desc) != NULL)
+        unrolled_or_peeled = true;
+    }
+
+  /* Step 6: unroll the loop.  TODO -- peeling of first and last few
      iterations so that we do not issue superfluous prefetches.  */
   if (unroll_factor != 1)
     {
       tree_unroll_loop (loop, unroll_factor,
 			single_dom_exit (loop), &desc);
-      unrolled = true;
+      unrolled_or_peeled = true;
     }

   /* Step 6: issue the prefetches.  */
@@ -1525,7 +1532,7 @@ loop_prefetch_arrays (struct loop *loop)

 fail:
   release_mem_refs (refs);
-  return unrolled;
+  return unrolled_or_peeled;
 }

 /* Issue prefetch instructions for array references in loops.  */
--- gcc-4.4.0/gcc/tree-vectorizer.c	2009-03-18 23:29:28.000000000 +0800
+++ new-gcc-4.4.0/gcc/tree-vectorizer.c	2009-08-14 11:26:29.000000000 +0800
@@ -253,7 +253,7 @@ rename_variables_in_loop (struct loop *l
    AFTER is true if NEW_LOOP executes after ORIG_LOOP, and false if it
    executes before it.  */

-static void
+void
 slpeel_update_phis_for_duplicate_loop (struct loop *orig_loop,
 				       struct loop *new_loop, bool after)
 {

----------------------------------

#include <stdlib.h>

extern int length;
extern unsigned short calc_crc (unsigned short data, unsigned short crc);

unsigned short
test (void)
{
  int i;
  unsigned short crc = 0;
  char *image;

  image = (char *)malloc (length);

  for (i = 0; i < length; i++)
    {
      crc = calc_crc (image[i], crc);
    }
  return crc;
}

--------------------------------

But, for this test case, it's an another error.

Program received signal SIGSEGV, Segmentation fault.
0x0840a46d in gimple_bb (g=0x0) at ../../gcc-4.4.0/gcc/gimple.h:1070
1070	  return g->gsbase.bb;
(gdb) bt
#0  0x0840a46d in gimple_bb (g=0x0) at ../../gcc-4.4.0/gcc/gimple.h:1070
#1  0x0840b446 in find_uses_to_rename_use (bb=0xb7c5e3c0,
use=0xb7c5a000, use_blocks=0x89befd8, need_phis=0x89b2778)
    at ../../gcc-4.4.0/gcc/tree-ssa-loop-manip.c:246
#2  0x0840b60d in find_uses_to_rename_bb (bb=0xb7c5e3c0,
use_blocks=0x89befd8, need_phis=0x89b2778)
    at ../../gcc-4.4.0/gcc/tree-ssa-loop-manip.c:297
#3  0x0840b7c1 in find_uses_to_rename (changed_bbs=0x0,
use_blocks=0x89befd8, need_phis=0x89b2778)
    at ../../gcc-4.4.0/gcc/tree-ssa-loop-manip.c:327
#4  0x0840b879 in rewrite_into_loop_closed_ssa (changed_bbs=0x0,
update_flag=2048)
    at ../../gcc-4.4.0/gcc/tree-ssa-loop-manip.c:387
#5  0x084983f8 in execute_vrp () at ../../gcc-4.4.0/gcc/tree-vrp.c:7249
#6  0x0828d69c in execute_one_pass (pass=0x898fcd0) at
../../gcc-4.4.0/gcc/passes.c:1278

------------------------------------
Seems that use info is not updated.

Eric

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help on loop peeling
  2009-08-14 17:02   ` Eric Fisher
@ 2009-08-14 18:32     ` Sebastian Pop
  2009-08-17  9:14       ` Eric Fisher
  0 siblings, 1 reply; 6+ messages in thread
From: Sebastian Pop @ 2009-08-14 18:32 UTC (permalink / raw)
  To: Eric Fisher; +Cc: gcc

[-- Attachment #1: Type: text/plain, Size: 224 bytes --]

Hi,

> Seems that use info is not updated.
>

You should put a TODO_update_ssa in the flags of prefetching pass.
With the attached patch I don't see an error.

Also, why don't you use trunk for your developments?

Sebastian

[-- Attachment #2: 1678_unroll_prefetch.diff --]
[-- Type: text/x-diff, Size: 4343 bytes --]

diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h
index 1d2e69a..1320b5a 100644
--- a/gcc/tree-flow.h
+++ b/gcc/tree-flow.h
@@ -782,6 +782,7 @@ bool gimple_duplicate_loop_to_header_edge (struct loop *, edge,
 					 edge, VEC (edge, heap) **,
 					 int);
 struct loop *slpeel_tree_duplicate_loop_to_edge_cfg (struct loop *, edge);
+void slpeel_update_phis_for_duplicate_loop (struct loop *, struct loop *, bool);
 void rename_variables_in_loop (struct loop *);
 void rename_variables_in_bb (basic_block bb);
 struct loop *tree_ssa_loop_version (struct loop *, tree,
diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c
index e43c0bc..2f536df 100644
--- a/gcc/tree-ssa-loop-manip.c
+++ b/gcc/tree-ssa-loop-manip.c
@@ -1104,6 +1104,44 @@ tree_unroll_loop (struct loop *loop, unsigned factor,
 				  NULL, NULL);
 }
 
+/* Peel off the first or last few iterations of the loop. */
+
+struct loop *
+tree_peel_loop (struct loop *loop, unsigned num,
+                edge e, struct tree_niter_desc *desc)
+{
+  struct loop *new_loop, *first_loop, *second_loop;
+  tree first_niters;
+  edge exit_e = single_exit (loop);
+
+  if (!slpeel_can_duplicate_loop_p (loop, e))
+    return NULL;
+
+  new_loop = slpeel_tree_duplicate_loop_to_edge_cfg (loop, e);
+
+  if (e == exit_e)
+    {
+      /* NEW_LOOP was placed after LOOP.  */
+      first_loop = loop;
+      second_loop = new_loop;
+    }
+  else
+    {
+      /* NEW_LOOP was placed before LOOP.  */
+      first_loop = new_loop;
+      second_loop = loop;
+    }
+
+  slpeel_update_phis_for_duplicate_loop (loop, new_loop, e == exit_e);
+  rename_variables_in_loop (new_loop);
+
+  first_niters = build_int_cst (integer_type_node, num);
+
+  slpeel_make_loop_iterate_ntimes (first_loop, first_niters);
+
+  return new_loop;
+}
+
 /* Rewrite the phi node at position PSI in function of the main
    induction variable MAIN_IV and insert the generated code at GSI.  */
 
diff --git a/gcc/tree-ssa-loop-prefetch.c b/gcc/tree-ssa-loop-prefetch.c
index b479707..36f2402 100644
--- a/gcc/tree-ssa-loop-prefetch.c
+++ b/gcc/tree-ssa-loop-prefetch.c
@@ -1548,7 +1548,7 @@ loop_prefetch_arrays (struct loop *loop)
   unsigned ahead, ninsns, time, unroll_factor;
   HOST_WIDE_INT est_niter;
   struct tree_niter_desc desc;
-  bool unrolled = false, no_other_refs;
+  bool unrolled_or_peeled = false, no_other_refs;
   unsigned prefetch_count;
   unsigned mem_ref_count;
 
@@ -1599,13 +1599,20 @@ loop_prefetch_arrays (struct loop *loop)
   if (!schedule_prefetches (refs, unroll_factor, ahead))
     goto fail;
 
-  /* Step 5: unroll the loop.  TODO -- peeling of first and last few
+  /* step 5: peel off the last few iterations. */
+  if (ahead > 0)
+    {
+      if (tree_peel_loop (loop, ahead, single_exit (loop), &desc) != NULL)
+        unrolled_or_peeled = true;
+    }
+
+  /* Step 6: unroll the loop.  TODO -- peeling of first and last few
      iterations so that we do not issue superfluous prefetches.  */
   if (unroll_factor != 1)
     {
       tree_unroll_loop (loop, unroll_factor,
 			single_dom_exit (loop), &desc);
-      unrolled = true;
+      unrolled_or_peeled = true;
     }
 
   /* Step 6: issue the prefetches.  */
@@ -1613,7 +1620,7 @@ loop_prefetch_arrays (struct loop *loop)
 
 fail:
   release_mem_refs (refs);
-  return unrolled;
+  return unrolled_or_peeled;
 }
 
 /* Issue prefetch instructions for array references in loops.  */
diff --git a/gcc/tree-ssa-loop.c b/gcc/tree-ssa-loop.c
index 8f7047f..6adbb7b 100644
--- a/gcc/tree-ssa-loop.c
+++ b/gcc/tree-ssa-loop.c
@@ -626,7 +626,8 @@ struct gimple_opt_pass pass_loop_prefetch =
   0,					/* properties_provided */
   0,					/* properties_destroyed */
   0,					/* todo_flags_start */
-  TODO_dump_func | TODO_verify_loops	/* todo_flags_finish */
+  TODO_dump_func | TODO_verify_loops
+  | TODO_update_ssa			/* todo_flags_finish */
  }
 };
 
diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c
index c0b15cd..c1d7564 100644
--- a/gcc/tree-vect-loop-manip.c
+++ b/gcc/tree-vect-loop-manip.c
@@ -121,7 +121,7 @@ rename_variables_in_loop (struct loop *loop)
    AFTER is true if NEW_LOOP executes after ORIG_LOOP, and false if it
    executes before it.  */
 
-static void
+void
 slpeel_update_phis_for_duplicate_loop (struct loop *orig_loop,
 				       struct loop *new_loop, bool after)
 {

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Help on loop peeling
  2009-08-14 18:32     ` Sebastian Pop
@ 2009-08-17  9:14       ` Eric Fisher
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Fisher @ 2009-08-17  9:14 UTC (permalink / raw)
  To: Sebastian Pop; +Cc: gcc

2009/8/15 Sebastian Pop <sebpop@gmail.com>:

> You should put a TODO_update_ssa in the flags of prefetching pass.
> With the attached patch I don't see an error.

Thanks. Finally, I figure out that it's because that after copying the
loop, I should have created a preheader to ensure that new_loop's
preheader has only one successor.

> Also, why don't you use trunk for your developments?

I will use trunk when it's ready and able to be committed. For now, I
just begin to try implementing and testing. :-)

Eric

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-08-17  8:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-13 13:48 Help on loop peeling Eric Fisher
2009-08-13 16:05 ` Sebastian Pop
2009-08-13 18:40   ` Richard Guenther
2009-08-14 17:02   ` Eric Fisher
2009-08-14 18:32     ` Sebastian Pop
2009-08-17  9:14       ` Eric Fisher

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).