public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* HIRLAM with -ftree-loop-distribution.
@ 2007-12-16 12:31 Toon Moene
  2007-12-16 17:53 ` Sebastian Pop
  0 siblings, 1 reply; 7+ messages in thread
From: Toon Moene @ 2007-12-16 12:31 UTC (permalink / raw)
  To: Sebastian Pop; +Cc: gcc mailing list

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

Sebastian,
 
 
 
 
 
 
                Here are, in addition, the numbers for compiling and 
running HIRLAM with -ftree-loop-distribution (after applying your patch, 
obviously).

There something weird going on with the count of the "loops not 
vectorized" - every successfully vectorized loop gets an additional 
message:

	note: not vectorized: vectorization may not beprofitable.

which rather defeats the purpose of the "not vectorized" messages.

In short, almost 1900 more loops are vectorized, but that's of course 
certainly due to the fact that loop distribution *makes* more loops.

In run time it has little (but positive) effect.

Kind regards,

-- 
Toon Moene - e-mail: toon@moene.indiv.nluug.nl - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
At home: http://moene.indiv.nluug.nl/~toon/
GNU Fortran's path to Fortran 2003: http://gcc.gnu.org/wiki/Fortran2003

[-- Attachment #2: loop-tests.txt --]
[-- Type: text/plain, Size: 5486 bytes --]

Baseline, no source changes:

Mon Dec 10 17:45:19 UTC 2007 (revision 130746)

Compilation flags:

CCFLAGS := -g -O3 $(MACHINECPP) -ffast-math -fno-associative-math -march=native -mtune=native -ftree-vectorizer-verbose=2
FCFLAGS := -g -O3 -fbacktrace -ffpe-trap=invalid,zero,overflow -ffast-math -fno-associative-math -march=native -mtune=native -ftree-vectorizer-verbose=2

Loops vectorized:
5675
Loops not vectorized:
13705

Timings:
20061201_00/HL_Cycle_2006120100.html: FORECAST TOOK    12.7488 SECONDS
20061201_00/HL_Cycle_2006120100.html: FORECAST TOOK  2445.9609 SECONDS
20061201_06/HL_Cycle_2006120106.html: FORECAST TOOK   259.3362 SECONDS
20061201_06/HL_Cycle_2006120106.html: FORECAST TOOK    12.4408 SECONDS
20061201_06/HL_Cycle_2006120106.html: FORECAST TOOK   305.9351 SECONDS
20061201_12/HL_Cycle_2006120112.html: FORECAST TOOK   262.1124 SECONDS
20061201_12/HL_Cycle_2006120112.html: FORECAST TOOK    12.7448 SECONDS
20061201_12/HL_Cycle_2006120112.html: FORECAST TOOK  2323.3733 SECONDS
20061201_12r/HL_Cycle_2006120112r.html: FORECAST TOOK   412.7058 SECONDS
20061201_18/HL_Cycle_2006120118.html: FORECAST TOOK   264.5685 SECONDS
20061201_18/HL_Cycle_2006120118.html: FORECAST TOOK    12.6648 SECONDS
20061201_18/HL_Cycle_2006120118.html: FORECAST TOOK   306.7352 SECONDS
20061202_00/HL_Cycle_2006120200.html: FORECAST TOOK   261.5164 SECONDS
20061202_00/HL_Cycle_2006120200.html: FORECAST TOOK    12.7688 SECONDS
20061202_00/HL_Cycle_2006120200.html: FORECAST TOOK  2325.3774 SECONDS
20061202_00r/HL_Cycle_2006120200r.html: FORECAST TOOK   413.8739 SECONDS

Baseline, no source changes, with -ftree-loop-linear:

Mon Dec 10 17:45:19 UTC 2007 (revision 130746)

Compilation flags:

CCFLAGS := -g -O3 $(MACHINECPP) -ftree-loop-linear -ffast-math -fno-associative-math -march=native -mtune=native -ftree-vectorizer-verbose=2
FCFLAGS := -g -O3 -ftree-loop-linear -fbacktrace -ffpe-trap=invalid,zero,overflow -ffast-math -fno-associative-math -march=native -mtune=native -ftree-vectorizer-verbose=2

This compilation got one ICE:

rttov_aitosu.f90: In function 'rttov_aitosu':
rttov_aitosu.f90:4: error: definition in block 262 does not dominate use in block 134
for SSA_NAME: pretmp.240_59 in statement:
prephitmp.220_58 = PHI <pretmp.240_59(134), D.1480_1373(138)>
PHI argument
pretmp.240_59
for PHI node
prephitmp.220_58 = PHI <pretmp.240_59(134), D.1480_1373(138)>
rttov_aitosu.f90:4: internal compiler error: verify_ssa failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Worked around by compiling this file without -ftree-loop-linear

Loops vectorized:
5671
Loops not vectorized:
13655

Timings:
20061201_00/HL_Cycle_2006120100.html: FORECAST TOOK    12.5648 SECONDS
20061201_00/HL_Cycle_2006120100.html: FORECAST TOOK  2444.1208 SECONDS
20061201_06/HL_Cycle_2006120106.html: FORECAST TOOK   259.3402 SECONDS
20061201_06/HL_Cycle_2006120106.html: FORECAST TOOK    12.4728 SECONDS
20061201_06/HL_Cycle_2006120106.html: FORECAST TOOK   307.8672 SECONDS
20061201_12/HL_Cycle_2006120112.html: FORECAST TOOK   260.0323 SECONDS
20061201_12/HL_Cycle_2006120112.html: FORECAST TOOK    12.8608 SECONDS
20061201_12/HL_Cycle_2006120112.html: FORECAST TOOK  2310.2485 SECONDS
20061201_12r/HL_Cycle_2006120112r.html: FORECAST TOOK   411.3977 SECONDS
20061201_18/HL_Cycle_2006120118.html: FORECAST TOOK   261.1283 SECONDS
20061201_18/HL_Cycle_2006120118.html: FORECAST TOOK    12.7248 SECONDS
20061201_18/HL_Cycle_2006120118.html: FORECAST TOOK   308.1313 SECONDS
20061202_00/HL_Cycle_2006120200.html: FORECAST TOOK   262.7564 SECONDS
20061202_00/HL_Cycle_2006120200.html: FORECAST TOOK    12.6528 SECONDS
20061202_00/HL_Cycle_2006120200.html: FORECAST TOOK  2336.5620 SECONDS
20061202_00r/HL_Cycle_2006120200r.html: FORECAST TOOK   410.6577 SECONDS

Baseline, with -ftree-loop-distribution changes:

Mon Dec 10 17:45:19 UTC 2007 (revision 130746M)

Compilation flags:

CCFLAGS := -g -O3 $(MACHINECPP) -ftree-loop-distribution -ffast-math -fno-associative-math -march=native -mtune=native -ftree-vectorizer-verbose=2
FCFLAGS := -g -O3 -ftree-loop-distribution -fbacktrace -ffpe-trap=invalid,zero,overflow -ffast-math -fno-associative-math -march=native -mtune=native -ftree-vectorizer-verbose=2

Loops vectorized:
7540
Loops not vectorized:
15982

Timings:
20061201_00/HL_Cycle_2006120100.html: FORECAST TOOK    12.8048 SECONDS
20061201_00/HL_Cycle_2006120100.html: FORECAST TOOK  2433.8242 SECONDS
20061201_06/HL_Cycle_2006120106.html: FORECAST TOOK   258.8722 SECONDS
20061201_06/HL_Cycle_2006120106.html: FORECAST TOOK    12.3848 SECONDS
20061201_06/HL_Cycle_2006120106.html: FORECAST TOOK   306.1311 SECONDS
20061201_12/HL_Cycle_2006120112.html: FORECAST TOOK   265.6286 SECONDS
20061201_12/HL_Cycle_2006120112.html: FORECAST TOOK    13.1528 SECONDS
20061201_12/HL_Cycle_2006120112.html: FORECAST TOOK  2327.9136 SECONDS
20061201_12r/HL_Cycle_2006120112r.html: FORECAST TOOK   412.1057 SECONDS
20061201_18/HL_Cycle_2006120118.html: FORECAST TOOK   261.1963 SECONDS
20061201_18/HL_Cycle_2006120118.html: FORECAST TOOK    12.7888 SECONDS
20061201_18/HL_Cycle_2006120118.html: FORECAST TOOK   308.2473 SECONDS
20061202_00/HL_Cycle_2006120200.html: FORECAST TOOK   262.5524 SECONDS
20061202_00/HL_Cycle_2006120200.html: FORECAST TOOK    12.7728 SECONDS
20061202_00/HL_Cycle_2006120200.html: FORECAST TOOK  2328.3816 SECONDS
20061202_00r/HL_Cycle_2006120200r.html: FORECAST TOOK   414.6779 SECONDS

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

* Re: HIRLAM with -ftree-loop-distribution.
  2007-12-16 12:31 HIRLAM with -ftree-loop-distribution Toon Moene
@ 2007-12-16 17:53 ` Sebastian Pop
  2007-12-16 19:43   ` Toon Moene
  0 siblings, 1 reply; 7+ messages in thread
From: Sebastian Pop @ 2007-12-16 17:53 UTC (permalink / raw)
  To: Toon Moene, Mark Mitchell; +Cc: gcc mailing list

On Dec 16, 2007 4:24 AM, Toon Moene <toon@moene.indiv.nluug.nl> wrote:
>                 Here are, in addition, the numbers for compiling and
> running HIRLAM with -ftree-loop-distribution (after applying your patch,
> obviously).
>
> In short, almost 1900 more loops are vectorized, but that's of course
> certainly due to the fact that loop distribution *makes* more loops.
>
> In run time it has little (but positive) effect.
>

Wow! Thanks for the numbers.  I guess from your message that there
were no ICEs or other problems with the loop distribution patch.

Mark, is the loop distribution patch okay for trunk?

Thanks,
Sebastian
-- 
AMD - GNU Tools

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

* Re: HIRLAM with -ftree-loop-distribution.
  2007-12-16 17:53 ` Sebastian Pop
@ 2007-12-16 19:43   ` Toon Moene
  0 siblings, 0 replies; 7+ messages in thread
From: Toon Moene @ 2007-12-16 19:43 UTC (permalink / raw)
  To: Sebastian Pop; +Cc: Mark Mitchell, gcc mailing list

Sebastian Pop wrote:
 

> Wow! Thanks for the numbers.  I guess from your message that there
> were no ICEs or other problems with the loop distribution patch.

Exactly.

-- 
Toon Moene - e-mail: toon@moene.indiv.nluug.nl - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
At home: http://moene.indiv.nluug.nl/~toon/
GNU Fortran's path to Fortran 2003: http://gcc.gnu.org/wiki/Fortran2003

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

* Re: HIRLAM with -ftree-loop-distribution.
  2007-12-16 14:14   ` Dorit Nuzman
@ 2007-12-16 14:54     ` Dorit Nuzman
  0 siblings, 0 replies; 7+ messages in thread
From: Dorit Nuzman @ 2007-12-16 14:54 UTC (permalink / raw)
  To: Dorit Nuzman; +Cc: GCC, Toon Moene, Uros Bizjak

Here's a tentative patch to do that:
- removes the confusing printing "not vectorized: vectorization may not be
profitable" from REPORT_UNVECTORIZED_LOOPS
- instead print "vectorization may not be profitable" under a new verbosity
level REPORT_COST
- change (hopefully all) other cost-model printings to be printed under
REPORT_COST

I'll test it later this week. I assume this kind of thing is an ok stage 3
material (it's a regression fix cause this confusion in the dump reports
was introduced with the cost model patches during 4.3)

dorit

--- tree-vect-transform.c       2007-12-16 14:09:20.000000000 +0200
+++ tree-vect-transform.cost_verbose.c  2007-12-16 16:07:09.000000000 +0200
@@ -134,7 +134,7 @@
   /* Cost model disabled.  */
   if (!flag_vect_cost_model)
     {
-      if (vect_print_dump_info (REPORT_DETAILS))
+      if (vect_print_dump_info (REPORT_COST))
         fprintf (vect_dump, "cost model disabled.");:
       return 0;
     }
@@ -153,7 +153,7 @@
       /*  FIXME: Make cost depend on complexity of individual check.  */
       vec_outside_cost +=
         VEC_length (tree, LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo));
-      if (vect_print_dump_info (REPORT_DETAILS))
+      if (vect_print_dump_info (REPORT_COST))
         fprintf (vect_dump, "cost model: Adding cost of checks for loop "
                  "versioning to treat misalignment.\n");
     }
@@ -163,7 +163,7 @@
       /*  FIXME: Make cost depend on complexity of individual check.  */
       vec_outside_cost +=
         VEC_length (ddr_p, LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo));.
-      if (vect_print_dump_info (REPORT_DETAILS))
+      if (vect_print_dump_info (REPORT_COST))
         fprintf (vect_dump, "cost model: Adding cost of checks for loop "
                  "versioning aliasing.\n");
     }
@@ -224,14 +224,14 @@
   if (byte_misalign < 0)
     {
       peel_iters_prologue = vf/2;
-      if (vect_print_dump_info (REPORT_DETAILS))
+      if (vect_print_dump_info (REPORT_COST))
         fprintf (vect_dump, "cost model: "
                  "prologue peel iters set to vf/2.");

       /* If peeling for alignment is unknown, loop bound of main loop
becomes
          unknown.  */
       peel_iters_epilogue = vf/2;
-      if (vect_print_dump_info (REPORT_DETAILS))
+      if (vect_print_dump_info (REPORT_COST))
         fprintf (vect_dump, "cost model: "
                  "epilogue peel iters set to vf/2 because "
                  "peeling for alignment is unknown .");
@@ -261,7 +261,7 @@
       if (!LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo))
         {
           peel_iters_epilogue = vf/2;
-          if (vect_print_dump_info (REPORT_DETAILS))
+          if (vect_print_dump_info (REPORT_COST))
             fprintf (vect_dump, "cost model: "
                      "epilogue peel iters set to vf/2 because "
                      "loop iterations are unknown .");
@@ -391,7 +391,7 @@
   /* vector version will never be profitable.  */
   else
     {
-      if (vect_print_dump_info (REPORT_DETAILS))
+      if (vect_print_dump_info (REPORT_COST))
         fprintf (vect_dump, "cost model: vector iteration cost = %d "
                  "is divisible by scalar iteration cost = %d by a factor "
                  "greater than or equal to the vectorization factor =
%d .",
@@ -399,7 +399,7 @@
       return -1;
     }

-  if (vect_print_dump_info (REPORT_DETAILS))
+  if (vect_print_dump_info (REPORT_COST))
     {
       fprintf (vect_dump, "Cost model analysis: \n");
       fprintf (vect_dump, "  Vector inside of loop cost: %d\n",
@@ -425,7 +425,7 @@
        then skip the vectorized loop.  */
   min_profitable_iters--;

-  if (vect_print_dump_info (REPORT_DETAILS))
+  if (vect_print_dump_info (REPORT_COST))
     fprintf (vect_dump, "  Profitability threshold = %d\n",
             min_profitable_iters);

@@ -465,7 +465,7 @@
   vectype = get_vectype_for_scalar_type (TREE_TYPE (reduction_op));
   if (!vectype)
     {
-      if (vect_print_dump_info (REPORT_DETAILS))
+      if (vect_print_dump_info (REPORT_COST))
         {
           fprintf (vect_dump, "unsupported data-type ");
           print_generic_expr (vect_dump, TREE_TYPE (reduction_op),
TDF_SLIM);
@@ -520,7 +520,7 @@

   STMT_VINFO_OUTSIDE_OF_LOOP_COST (stmt_info) = outer_cost;

-  if (vect_print_dump_info (REPORT_DETAILS)))
+  if (vect_print_dump_info (REPORT_COST))
     fprintf (vect_dump, "vect_model_reduction_cost: inside_cost = %d, "
              "outside_cost = %d .", STMT_VINFO_INSIDE_OF_LOOP_COST
(stmt_info),
              STMT_VINFO_OUTSIDE_OF_LOOP_COST (stmt_info));
@@ -541,7 +541,7 @@
   /* prologue cost for vec_init and vec_step.  */
   STMT_VINFO_OUTSIDE_OF_LOOP_COST (stmt_info) = 2 *
TARG_SCALAR_TO_VEC_COST;

-  if (vect_print_dump_info (REPORT_DETAILS)))
+  if (vect_print_dump_info (REPORT_COST))
     fprintf (vect_dump, "vect_model_induction_cost: inside_cost = %d, "
              "outside_cost = %d .", STMT_VINFO_INSIDE_OF_LOOP_COST
(stmt_info),
              STMT_VINFO_OUTSIDE_OF_LOOP_COST (stmt_info));
@@ -570,7 +570,7 @@
        outside_cost += TARG_SCALAR_TO_VEC_COST;
     }

-  if (vect_print_dump_info (REPORT_DETAILS))
+  if (vect_print_dump_info (REPORT_COST))
     fprintf (vect_dump, "vect_model_simple_cost: inside_cost = %d, "
              "outside_cost = %d .", inside_cost, outside_cost);%

@@ -628,7 +628,7 @@
       inside_cost = ncopies * exact_log2(group_size) * group_size,
              * TARG_VEC_STMT_COST;

-      if (vect_print_dump_info (REPORT_DETAILS))
+      if (vect_print_dump_info (REPORT_COST))
         fprintf (vect_dump, "vect_model_store_cost: strided group_size =
%d .",
                  group_size);

@@ -637,7 +637,7 @@
   /* Costs of the stores.  */
   inside_cost += ncopies * TARG_VEC_STORE_COST;

-  if (vect_print_dump_info (REPORT_DETAILS))
+  if (vect_print_dump_info (REPORT_COST))
     fprintf (vect_dump, "vect_model_store_cost: inside_cost = %d, "
              "outside_cost = %d .", inside_cost, outside_cost);

@@ -688,7 +688,7 @@
       inside_cost = ncopies * exact_log2(group_size) * group_size
        * TARG_VEC_STMT_COST;

-      if (vect_print_dump_info (REPORT_DETAILS))
+      if (vect_print_dump_info (REPORT_COST))
         fprintf (vect_dump, "vect_model_load_cost: strided group_size =
%d .",,
                  group_size);

@@ -701,7 +701,7 @@
       {
         inside_cost += ncopies * TARG_VEC_LOAD_COST;

-        if (vect_print_dump_info (REPORT_DETAILS))
+        if (vect_print_dump_info (REPORT_COST))
           fprintf (vect_dump, "vect_model_load_cost: aligned.");

         break;
@@ -711,7 +711,7 @@
         /* Here, we assign an additional cost for the unaligned load.  */
         inside_cost += ncopies * TARG_VEC_UNALIGNED_LOAD_COST;

-        if (vect_print_dump_info (REPORT_DETAILS))
+        if (vect_print_dump_info (REPORT_COST))
           fprintf (vect_dump, "vect_model_load_cost: unaligned supported
by ",,
                    "hardware.");

@@ -731,7 +731,7 @@
       }
     case dr_explicit_realign_optimized:
       {
-        if (vect_print_dump_info (REPORT_DETAILS))
+        if (vect_print_dump_info (REPORT_COST))
           fprintf (vect_dump, "vect_model_load_cost: unaligned software "
                    "pipelined.");

@@ -758,7 +758,7 @@
       gcc_unreachable ();
     }

-  if (vect_print_dump_info (REPORT_DETAILS))
+  if (vect_print_dump_info (REPORT_COST))
     fprintf (vect_dump, "vect_model_load_cost: inside_cost = %d, "
              "outside_cost = %d .", inside_cost, outside_cost);,

@@ -6552,11 +6552,7 @@
           || min_profitable_iters > min_scalar_loop_bound))
     th = (unsigned) min_profitable_iters;

-  if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
-    fprintf (vect_dump, "not vectorized: vectorization may not be"
-            "profitable.");
-
-  if (th && vect_print_dump_info (REPORT_DETAILS))
+  if (th && vect_print_dump_info (REPORT_COST))
     fprintf (vect_dump, "Vectorization may not be profitable.");

   return th;
--- tree-vectorizer.h   2007-12-16 16:08:07.000000000 +0200
+++ tree-vectorizer.cost_verbose.h      2007-12-16 16:08:02.000000000 +0200
@@ -73,6 +73,7 @@
   REPORT_NONE,
   REPORT_VECTORIZED_LOOPS,
   REPORT_UNVECTORIZED_LOOPS,
+  REPORT_COST,
   REPORT_ALIGNMENT,
   REPORT_DR_DETAILS,
   REPORT_BAD_FORM_LOOPS,



                                                                           
             Dorit                                                         
             Nuzman/Haifa/IBM@                                             
             IBMIL                                                      To 
             Sent by:                  Toon Moene                          
             gcc-owner@gcc.gnu         <toon@moene.indiv.nluug.nl>         
             .org                                                       cc 
                                       GCC <gcc@gcc.gnu.org>, Uros Bizjak  
                                       <ubizjak@gmail.com>                 
             16/12/2007 16:02                                      Subject 
                                       Re: HIRLAM with                     
                                       -ftree-loop-distribution.           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




> Uros Bizjak wrote:
>
> >> note: not vectorized: vectorization may not beprofitable.
> >
> > This is due to switching on vector cost model by default for x86.
>
> Ah, but my hidden critique of the message was:
> -ftree-vectorizer-verbose=2 should *only* tell us:
>
> 1. Which loops are vectorized.
> 2. Which are not - and why (in a single sentence).
>
> For more detailed logging, one should use -ftree-vectorizer-verbose=n
> with n>2, IMNSHO.
>

yes, you are right. this printing should be either removed (as it's anyhow
already being printed also under REPORT_DETAILS), or we may want to add a
new verbosity level (lower than REPORT_DETAILS) for cost-model info
("REPORT_COST").

dorit

> Kind regards,
>
> --
> Toon Moene - e-mail: toon@moene.indiv.nluug.nl - phone: +31 346 214290
> Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
> At home: http://moene.indiv.nluug.nl/~toon/
> GNU Fortran's path to Fortran 2003: http://gcc.gnu.org/wiki/Fortran2003



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

* Re: HIRLAM with -ftree-loop-distribution.
  2007-12-16 13:34 ` Toon Moene
@ 2007-12-16 14:14   ` Dorit Nuzman
  2007-12-16 14:54     ` Dorit Nuzman
  0 siblings, 1 reply; 7+ messages in thread
From: Dorit Nuzman @ 2007-12-16 14:14 UTC (permalink / raw)
  To: Toon Moene; +Cc: GCC, Uros Bizjak

> Uros Bizjak wrote:
>
> >> note: not vectorized: vectorization may not beprofitable.
> >
> > This is due to switching on vector cost model by default for x86.
>
> Ah, but my hidden critique of the message was:
> -ftree-vectorizer-verbose=2 should *only* tell us:
>
> 1. Which loops are vectorized.
> 2. Which are not - and why (in a single sentence).
>
> For more detailed logging, one should use -ftree-vectorizer-verbose=n
> with n>2, IMNSHO.
>

yes, you are right. this printing should be either removed (as it's anyhow
already being printed also under REPORT_DETAILS), or we may want to add a
new verbosity level (lower than REPORT_DETAILS) for cost-model info
("REPORT_COST").

dorit

> Kind regards,
>
> --
> Toon Moene - e-mail: toon@moene.indiv.nluug.nl - phone: +31 346 214290
> Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
> At home: http://moene.indiv.nluug.nl/~toon/
> GNU Fortran's path to Fortran 2003: http://gcc.gnu.org/wiki/Fortran2003

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

* Re: HIRLAM with -ftree-loop-distribution.
  2007-12-16 12:44 Uros Bizjak
@ 2007-12-16 13:34 ` Toon Moene
  2007-12-16 14:14   ` Dorit Nuzman
  0 siblings, 1 reply; 7+ messages in thread
From: Toon Moene @ 2007-12-16 13:34 UTC (permalink / raw)
  To: Uros Bizjak; +Cc: GCC

Uros Bizjak wrote:

>> note: not vectorized: vectorization may not beprofitable.
> 
> This is due to switching on vector cost model by default for x86.

Ah, but my hidden critique of the message was: 
-ftree-vectorizer-verbose=2 should *only* tell us:

1. Which loops are vectorized.
2. Which are not - and why (in a single sentence).

For more detailed logging, one should use -ftree-vectorizer-verbose=n 
with n>2, IMNSHO.

Kind regards,

-- 
Toon Moene - e-mail: toon@moene.indiv.nluug.nl - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
At home: http://moene.indiv.nluug.nl/~toon/
GNU Fortran's path to Fortran 2003: http://gcc.gnu.org/wiki/Fortran2003

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

* Re: HIRLAM with -ftree-loop-distribution.
@ 2007-12-16 12:44 Uros Bizjak
  2007-12-16 13:34 ` Toon Moene
  0 siblings, 1 reply; 7+ messages in thread
From: Uros Bizjak @ 2007-12-16 12:44 UTC (permalink / raw)
  To: Toon Moene; +Cc: GCC, GCC Patches

Hello!

> There something weird going on with the count of the "loops not 
> vectorized" - every successfully vectorized loop gets an additional 
> message:
>
> note: not vectorized: vectorization may not beprofitable.

This is due to switching on vector cost model by default for x86.

BTW: Attached patch fixed the message by adding the space between "be" 
and "profitable.". Patch was commited to SVN after bootstrappnig on x86_64.

2007-12-16  Uros Bizjak  <ubizjak@gmail.com>

        * tree-vect-transform.c (conservative_cost_threshold): Add missing
        space to "not vectorized" message.

Uros.

Index: tree-vect-transform.c
===================================================================
--- tree-vect-transform.c       (revision 130987)
+++ tree-vect-transform.c       (working copy)
@@ -6552,7 +6552,7 @@
     th = (unsigned) min_profitable_iters;
 
   if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))             
-    fprintf (vect_dump, "not vectorized: vectorization may not be"
+    fprintf (vect_dump, "not vectorized: vectorization may not be "
             "profitable.");
  
   if (th && vect_print_dump_info (REPORT_DETAILS))

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

end of thread, other threads:[~2007-12-16 18:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-16 12:31 HIRLAM with -ftree-loop-distribution Toon Moene
2007-12-16 17:53 ` Sebastian Pop
2007-12-16 19:43   ` Toon Moene
2007-12-16 12:44 Uros Bizjak
2007-12-16 13:34 ` Toon Moene
2007-12-16 14:14   ` Dorit Nuzman
2007-12-16 14:54     ` Dorit Nuzman

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