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

Re: [patch][gomp4] openacc loops


Hi Ilmir!

On Wed, 4 Jun 2014 17:53:38 +0400, Ilmir Usmanov <i.usmanov@samsung.com> wrote:
> you should update tree-pretty-print.c (I forgot this):
> @@ -675,13 +675,13 @@ dump_omp_clause (pretty_printer *buffer, tree 
> clause, int spc, int flags)
> 
>       case OMP_CLAUSE_WORKER:
>         pp_string (buffer, "worker(");
> -      dump_generic_node (buffer, OMP_CLAUSE_DECL (clause), spc, flags, 
> false);
> +      dump_generic_node (buffer, OMP_CLAUSE_WORKER_EXPR (clause), spc, 
> flags, false);
>         pp_character(buffer, ')');
>         break;
> 
>       case OMP_CLAUSE_VECTOR:
>         pp_string (buffer, "vector(");
> -      dump_generic_node (buffer, OMP_CLAUSE_DECL (clause), spc, flags, 
> false);
> +      dump_generic_node (buffer, OMP_CLAUSE_VECTOR_EXPR (clause), spc, 
> flags, false);
>         pp_character(buffer, ')');
>         break;

I assume, do similar changes also for other clauses, for which we have
more specialized accessors available?  We may not actually need/want
that, but can simplify this later on.  I checked in the following to
gomp-4_0-branch, r211633:

commit 86d4893c435bbcb2bc251aafde11f36e2e703a4c
Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Fri Jun 13 11:16:40 2014 +0000

    Instead of OMP_CLAUSE_DECL, use more specific accessors for some clauses.
    
    	gcc/
    	* tree-pretty-print.c (dump_omp_clause): Instead of
    	OMP_CLAUSE_DECL, use more specific accessors for some clauses.
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_0-branch@211633 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog.gomp      |  6 ++++++
 gcc/tree-pretty-print.c | 16 ++++++++++------
 2 files changed, 16 insertions(+), 6 deletions(-)

diff --git gcc/ChangeLog.gomp gcc/ChangeLog.gomp
index 75e47d0..51bab90 100644
--- gcc/ChangeLog.gomp
+++ gcc/ChangeLog.gomp
@@ -1,4 +1,10 @@
 2014-06-13  Thomas Schwinge  <thomas@codesourcery.com>
+	    Ilmir Usmanov  <i.usmanov@samsung.com>
+
+	* tree-pretty-print.c (dump_omp_clause): Instead of
+	OMP_CLAUSE_DECL, use more specific accessors for some clauses.
+
+2014-06-13  Thomas Schwinge  <thomas@codesourcery.com>
 	    Cesar Philippidis  <cesar@codesourcery.com>
 
 	* omp-low.c (extract_omp_for_data, scan_sharing_clauses): For
diff --git gcc/tree-pretty-print.c gcc/tree-pretty-print.c
index 22b82fe..82b0f7a 100644
--- gcc/tree-pretty-print.c
+++ gcc/tree-pretty-print.c
@@ -652,16 +652,17 @@ dump_omp_clause (pretty_printer *buffer, tree clause, int spc, int flags)
 
     case OMP_CLAUSE_GANG:
       pp_string (buffer, "gang(");
-      dump_generic_node (buffer, OMP_CLAUSE_DECL (clause), spc, flags, false);
+      dump_generic_node (buffer, OMP_CLAUSE_GANG_EXPR (clause),
+			 spc, flags, false);
       pp_character(buffer, ')');
       break;
 
     case OMP_CLAUSE_ASYNC:
       pp_string (buffer, "async");
-      if (OMP_CLAUSE_DECL (clause))
+      if (OMP_CLAUSE_ASYNC_EXPR (clause))
         {
           pp_character(buffer, '(');
-          dump_generic_node (buffer, OMP_CLAUSE_DECL (clause), 
+          dump_generic_node (buffer, OMP_CLAUSE_ASYNC_EXPR (clause),
                              spc, flags, false);
           pp_character(buffer, ')');
         }
@@ -669,19 +670,22 @@ dump_omp_clause (pretty_printer *buffer, tree clause, int spc, int flags)
 
     case OMP_CLAUSE_WAIT:
       pp_string (buffer, "wait(");
-      dump_generic_node (buffer, OMP_CLAUSE_DECL (clause), spc, flags, false);
+      dump_generic_node (buffer, OMP_CLAUSE_WAIT_EXPR (clause),
+			 spc, flags, false);
       pp_character(buffer, ')');
       break;
 
     case OMP_CLAUSE_WORKER:
       pp_string (buffer, "worker(");
-      dump_generic_node (buffer, OMP_CLAUSE_DECL (clause), spc, flags, false);
+      dump_generic_node (buffer, OMP_CLAUSE_WORKER_EXPR (clause),
+			 spc, flags, false);
       pp_character(buffer, ')');
       break;
 
     case OMP_CLAUSE_VECTOR:
       pp_string (buffer, "vector(");
-      dump_generic_node (buffer, OMP_CLAUSE_DECL (clause), spc, flags, false);
+      dump_generic_node (buffer, OMP_CLAUSE_VECTOR_EXPR (clause),
+			 spc, flags, false);
       pp_character(buffer, ')');
       break;
 


GrÃÃe,
 Thomas

Attachment: pgpOTSRvYkKP6.pgp
Description: PGP signature


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