public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Marcel Vollweiler <marcel@codesourcery.com>
Cc: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org
Subject: Re: [PATCH] C, C++, Fortran, OpenMP: Add 'has_device_addr' clause to 'target' construct
Date: Wed, 2 Feb 2022 15:24:13 +0100	[thread overview]
Message-ID: <20220202142413.GB2646553@tucnak> (raw)
In-Reply-To: <9668c17d-1baf-9840-3ab1-2b7bebc98312@codesourcery.com>

On Wed, Feb 02, 2022 at 09:19:03AM +0100, Marcel Vollweiler wrote:
> gcc/c-family/ChangeLog:
> 
> 	* c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
> 	* c-pragma.h (enum pragma_kind): Added 5.1 in comment.
> 	(enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
> 
> gcc/c/ChangeLog:
> 
> 	* c-parser.cc (c_parser_omp_clause_name): Parse 'has_device_addr'
> 	clause.
> 	(c_parser_omp_variable_list): Handle array sections.
> 	(c_parser_omp_clause_has_device_addr): Added.
> 	(c_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
> 	case.
> 	(c_parser_omp_target_exit_data): Added HAS_DEVICE_ADDR to 
> 	OMP_CLAUSE_MASK.
> 	* c-typeck.cc (handle_omp_array_sections): Handle clause restrictions.
> 	(c_finish_omp_clauses): Handle array sections.
> 
> gcc/cp/ChangeLog:
> 
> 	* parser.cc (cp_parser_omp_clause_name): Parse 'has_device_addr' clause.
> 	(cp_parser_omp_var_list_no_open): Handle array sections.
> 	(cp_parser_omp_all_clauses): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR
> 	case.
> 	(cp_parser_omp_target_update): Added HAS_DEVICE_ADDR to OMP_CLAUSE_MASK.
> 	* pt.c (tsubst_omp_clauses): Added cases for OMP_CLAUSE_HAS_DEVICE_ADDR.
> 	* semantics.cc (handle_omp_array_sections): Handle clause restrictions.
> 	(finish_omp_clauses): Handle array sections.
> 
> gcc/fortran/ChangeLog:
> 
> 	* dump-parse-tree.cc (show_omp_clauses): Added OMP_LIST_HAS_DEVICE_ADDR
> 	case.
> 	* gfortran.h: Added OMP_LIST_HAS_DEVICE_ADDR.
> 	* openmp.cc (enum omp_mask2): Added OMP_CLAUSE_HAS_DEVICE_ADDR.
> 	(gfc_match_omp_clauses): Parse HAS_DEVICE_ADDR clause.
> 	(resolve_omp_clauses): Same.
> 	* trans-openmp.cc (gfc_trans_omp_variable_list): Added 
> 	OMP_LIST_HAS_DEVICE_ADDR case.
> 	(gfc_trans_omp_clauses): Firstprivatize of array descriptors.
> 
> gcc/ChangeLog:
> 
> 	* gimplify.cc (gimplify_scan_omp_clauses): Added cases for
> 	OMP_CLAUSE_HAS_DEVICE_ADDR
> 	and handle array sections.
> 	(gimplify_adjust_omp_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
> 	* omp-low.cc (scan_sharing_clauses): Handle OMP_CLAUSE_HAS_DEVICE_ADDR.
> 	(lower_omp_target): Same.
> 	* tree-core.h (enum omp_clause_code): Same.
> 	* tree-nested.cc (convert_nonlocal_omp_clauses): Same.
> 	(convert_local_omp_clauses): Same.
> 	* tree-pretty-print.cc (dump_omp_clause): Same.
> 	* tree.cc: Same.
> 
> libgomp/ChangeLog:
> 
> 	* libgomp.texi: Updated entry for HAS_DEVICE_ADDR.
> 	* target.c (copy_firstprivate_data): Copy only if host address is not
> 	NULL.
> 	* testsuite/libgomp.c++/target-has-device-addr-2.C: New test.
> 	* testsuite/libgomp.c++/target-has-device-addr-4.C: New test.
> 	* testsuite/libgomp.c++/target-has-device-addr-5.C: New test.
> 	* testsuite/libgomp.c++/target-has-device-addr-6.C: New test.
> 	* testsuite/libgomp.c-c++-common/target-has-device-addr-1.c: New test.
> 	* testsuite/libgomp.c/target-has-device-addr-3.c: New test.
> 	* testsuite/libgomp.fortran/target-has-device-addr-1.f90: New test.
> 	* testsuite/libgomp.fortran/target-has-device-addr-2.f90: New test.
> 	* testsuite/libgomp.fortran/target-has-device-addr-3.f90: New test.
> 	* testsuite/libgomp.fortran/target-has-device-addr-4.f90: New test.
> 
> gcc/testsuite/ChangeLog:
> 
> 	* c-c++-common/gomp/clauses-1.c: Added has_device_addr to test cases.
> 	* g++.dg/gomp/attrs-1.C: Added has_device_addr to test cases.
> 	* g++.dg/gomp/attrs-2.C: Added has_device_addr to test cases.
> 	* c-c++-common/gomp/target-has-device-addr-1.c: New test.
> 	* c-c++-common/gomp/target-has-device-addr-2.c: New test.
> 	* c-c++-common/gomp/target-is-device-ptr-1.c: New test.
> 	* c-c++-common/gomp/target-is-device-ptr-2.c: New test.
> 	* gfortran.dg/gomp/is_device_ptr-3.f90: New test.
> 	* gfortran.dg/gomp/target-has-device-addr-1.f90: New test.
> 	* gfortran.dg/gomp/target-has-device-addr-2.f90: New test.

Ok, thanks.

	Jakub


      reply	other threads:[~2022-02-02 14:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <b245a935-a1b4-d668-2b47-11ab20f51785@codesourcery.com>
     [not found] ` <20211020123844.GU304296@tucnak>
     [not found]   ` <25633d5a-d94d-0231-b626-97d28159237f@codesourcery.com>
2021-11-24 17:08     ` Marcel Vollweiler
2022-01-11 11:53       ` Jakub Jelinek
2022-01-11 13:27         ` Tobias Burnus
2022-01-11 14:07           ` Jakub Jelinek
2022-02-02  8:19         ` Marcel Vollweiler
2022-02-02 14:24           ` Jakub Jelinek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220202142413.GB2646553@tucnak \
    --to=jakub@redhat.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=marcel@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).