public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 2/2] Add a general mapping from internal fns to target insns
Date: Sun, 12 Jun 2022 12:09:01 -0600	[thread overview]
Message-ID: <4708f986-c910-9eb9-d475-c9256f59666c@gmail.com> (raw)
In-Reply-To: <mptr13wev8l.fsf@arm.com>



On 6/10/2022 3:14 AM, Richard Sandiford via Gcc-patches wrote:
> Several existing internal functions map directly to an instruction
> defined in target-insns.def.  This patch makes it easier to define
> more such functions in future.
>
> This should help to reduce cut-&-paste, but more importantly, it allows
> the difference between optab functions and target-insns.def functions
> to be abstracted away; both are now treated as “directly-mapped”.
>
> Tested on aarch64-linux-gnu and x86_64-linux-gnu.  OK to install?
>
> Richard
>
>
> gcc/
> 	* internal-fn.def (DEF_INTERNAL_INSN_FN): New macro.
> 	(GOMP_SIMT_ENTER_ALLOC, GOMP_SIMT_EXIT, GOMP_SIMT_LANE)
> 	(GOMP_SIMT_LAST_LANE, GOMP_SIMT_ORDERED_PRED, GOMP_SIMT_VOTE_ANY)
> 	(GOMP_SIMT_XCHG_BFLY, GOMP_SIMT_XCHG_IDX): Use it.
> 	* internal-fn.h (direct_internal_fn_info::directly_mapped): New
> 	member variable.
> 	(direct_internal_fn_info::vectorizable): Reduce to 1 bit.
> 	(direct_internal_fn_p): Also return true for internal functions
> 	that map directly to instructions defined target-insns.def.
> 	(direct_internal_fn): Adjust comment accordingly.
> 	* internal-fn.c (direct_insn, optab1, optab2, vectorizable_optab1)
> 	(vectorizable_optab2): New local macros.
> 	(not_direct): Initialize directly_mapped.
> 	(mask_load_direct, load_lanes_direct, mask_load_lanes_direct)
> 	(gather_load_direct, len_load_direct, mask_store_direct)
> 	(store_lanes_direct, mask_store_lanes_direct, vec_cond_mask_direct)
> 	(vec_cond_direct, scatter_store_direct, len_store_direct)
> 	(vec_set_direct, unary_direct, binary_direct, ternary_direct)
> 	(cond_unary_direct, cond_binary_direct, cond_ternary_direct)
> 	(while_direct, fold_extract_direct, fold_left_direct)
> 	(mask_fold_left_direct, check_ptrs_direct): Use the macros above.
> 	(expand_GOMP_SIMT_ENTER_ALLOC, expand_GOMP_SIMT_EXIT): Delete
> 	(expand_GOMP_SIMT_LANE, expand_GOMP_SIMT_LAST_LANE): Likewise;
> 	(expand_GOMP_SIMT_ORDERED_PRED, expand_GOMP_SIMT_VOTE_ANY): Likewise.
> 	(expand_GOMP_SIMT_XCHG_BFLY, expand_GOMP_SIMT_XCHG_IDX): Likewise.
> 	(direct_internal_fn_types): Handle functions that map to instructions
> 	defined in target-insns.def.
> 	(direct_internal_fn_types): Likewise.
> 	(direct_internal_fn_supported_p): Likewise.
> 	(internal_fn_expanders): Likewise.
OK.
jeff


      parent reply	other threads:[~2022-06-12 18:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-10  9:14 Richard Sandiford
2022-06-10 11:35 ` David Malcolm
2022-06-12 18:09 ` Jeff Law [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=4708f986-c910-9eb9-d475-c9256f59666c@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    /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).