Re: docs: document early break support and pragma novector

2024-04-15 Thread Richard Biener
On Tue, 16 Apr 2024, Tamar Christina wrote:

> docs: document early break support and pragma novector

OK.

> ---
> diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html
> index 
> b4c602a523717c1d64333e44aefb60ba0ed02e7a..aceecb86f17443cfae637e90987427b98c42f6eb
>  100644
> --- a/htdocs/gcc-14/changes.html
> +++ b/htdocs/gcc-14/changes.html
> @@ -200,6 +200,34 @@ a work-in-progress.
>  for indicating parameters that are expected to be null-terminated
>  strings.
>
> +  
> +The vectorizer now supports vectorizing loops which contain any number 
> of early breaks.
> +This means loops such as:
> +
> + int z[100], y[100], x[100];
> + int foo (int n)
> + {
> +   int res = 0;
> +   for (int i = 0; i < n; i++)
> + {
> +y[i] = x[i] * 2;
> +res += x[i] + y[i];
> +
> +if (x[i] > 5)
> +  break;
> +
> +if (z[i] > 5)
> +  break;
> +
> + }
> +   return res;
> + }
> +
> +can now be vectorized on a number of targets.  In this first version any
> +input data sources must either have a statically known size at compile 
> time
> +or the vectorizer must be able to determine based on auxillary 
> information
> +that the accesses are aligned.
> +  
>  
>  
>  New Languages and Language specific improvements
> @@ -231,6 +259,9 @@ a work-in-progress.
>previous options -std=c2x, -std=gnu2x
>and -Wc11-c2x-compat, which are deprecated but remain
>supported.
> +  GCC supports a new pragma #pragma GCC novector to
> +  indicate to the vectorizer not to vectorize the loop annotated with the
> +  pragma.
>  
>  
>  C++
> @@ -400,6 +431,9 @@ a work-in-progress.
>warnings are enabled for C++ as well
>The DR 2237 code no longer gives an error, it emits
>a -Wtemplate-id-cdtor warning instead
> +  GCC supports a new pragma #pragma GCC novector to
> +  indicate to the vectorizer not to vectorize the loop annotated with the
> +  pragma.
>  
>  
>  Runtime Library (libstdc++)
> 
> 
> 
> 
> 

-- 
Richard Biener 
SUSE Software Solutions Germany GmbH,
Frankenstrasse 146, 90461 Nuernberg, Germany;
GF: Ivo Totev, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)


docs: document early break support and pragma novector

2024-04-15 Thread Tamar Christina
docs: document early break support and pragma novector

---
diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html
index 
b4c602a523717c1d64333e44aefb60ba0ed02e7a..aceecb86f17443cfae637e90987427b98c42f6eb
 100644
--- a/htdocs/gcc-14/changes.html
+++ b/htdocs/gcc-14/changes.html
@@ -200,6 +200,34 @@ a work-in-progress.
 for indicating parameters that are expected to be null-terminated
 strings.
   
+  
+The vectorizer now supports vectorizing loops which contain any number of 
early breaks.
+This means loops such as:
+
+   int z[100], y[100], x[100];
+   int foo (int n)
+   {
+ int res = 0;
+ for (int i = 0; i < n; i++)
+   {
+  y[i] = x[i] * 2;
+  res += x[i] + y[i];
+
+  if (x[i] > 5)
+break;
+
+  if (z[i] > 5)
+break;
+
+   }
+ return res;
+   }
+
+can now be vectorized on a number of targets.  In this first version any
+input data sources must either have a statically known size at compile time
+or the vectorizer must be able to determine based on auxillary information
+that the accesses are aligned.
+  
 
 
 New Languages and Language specific improvements
@@ -231,6 +259,9 @@ a work-in-progress.
   previous options -std=c2x, -std=gnu2x
   and -Wc11-c2x-compat, which are deprecated but remain
   supported.
+  GCC supports a new pragma #pragma GCC novector to
+  indicate to the vectorizer not to vectorize the loop annotated with the
+  pragma.
 
 
 C++
@@ -400,6 +431,9 @@ a work-in-progress.
   warnings are enabled for C++ as well
   The DR 2237 code no longer gives an error, it emits
   a -Wtemplate-id-cdtor warning instead
+  GCC supports a new pragma #pragma GCC novector to
+  indicate to the vectorizer not to vectorize the loop annotated with the
+  pragma.
 
 
 Runtime Library (libstdc++)




-- 
diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html
index b4c602a523717c1d64333e44aefb60ba0ed02e7a..aceecb86f17443cfae637e90987427b98c42f6eb 100644
--- a/htdocs/gcc-14/changes.html
+++ b/htdocs/gcc-14/changes.html
@@ -200,6 +200,34 @@ a work-in-progress.
 for indicating parameters that are expected to be null-terminated
 strings.
   
+  
+The vectorizer now supports vectorizing loops which contain any number of early breaks.
+This means loops such as:
+
+	int z[100], y[100], x[100];
+	int foo (int n)
+	{
+	  int res = 0;
+	  for (int i = 0; i < n; i++)
+	{
+	   y[i] = x[i] * 2;
+	   res += x[i] + y[i];
+
+	   if (x[i] > 5)
+		 break;
+
+	   if (z[i] > 5)
+		 break;
+
+	}
+	  return res;
+	}
+
+can now be vectorized on a number of targets.  In this first version any
+input data sources must either have a statically known size at compile time
+or the vectorizer must be able to determine based on auxillary information
+that the accesses are aligned.
+  
 
 
 New Languages and Language specific improvements
@@ -231,6 +259,9 @@ a work-in-progress.
   previous options -std=c2x, -std=gnu2x
   and -Wc11-c2x-compat, which are deprecated but remain
   supported.
+  GCC supports a new pragma #pragma GCC novector to
+  indicate to the vectorizer not to vectorize the loop annotated with the
+  pragma.
 
 
 C++
@@ -400,6 +431,9 @@ a work-in-progress.
   warnings are enabled for C++ as well
   The DR 2237 code no longer gives an error, it emits
   a -Wtemplate-id-cdtor warning instead
+  GCC supports a new pragma #pragma GCC novector to
+  indicate to the vectorizer not to vectorize the loop annotated with the
+  pragma.
 
 
 Runtime Library (libstdc++)