public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: James Greenhalgh <james.greenhalgh@arm.com>
To: gcc-patches@gcc.gnu.org, richard.earnshaw@arm.com,
	marcus.shawcroft@arm.com, richard.sandiford@arm.com
Cc: nd@arm.com
Subject: Re: [AArch64] Split built-in function codes into major and minor codes
Date: Wed, 25 Sep 2019 21:23:00 -0000	[thread overview]
Message-ID: <20190925212304.GA32087@arm.com> (raw)
In-Reply-To: <mptblx03hcd.fsf@arm.com>

On Wed, Aug 07, 2019 at 08:28:50PM +0100, Richard Sandiford wrote:
> It was easier to add the SVE ACLE support without enumerating every
> function at build time.  This in turn meant that it was easier if the
> SVE builtins occupied a distinct numberspace from the existing AArch64
> ones, which *are* enumerated at build time.  This patch therefore
> divides the built-in functions codes into "major" and "minor" codes.
> At present the major code is just "general", but the SVE patch will add
> "SVE" as well.
> 
> Also, it was convenient to put the SVE ACLE support in its own file,
> so the patch makes aarch64.c provide the frontline target hooks directly,
> forwarding to the other files for the real work.
> 
> The reason for organising the files this way is that aarch64.c needs
> to define the target hook macros whatever happens, and having aarch64.c
> macros forward to aarch64-builtins.c functions and aarch64-bulitins.c
> functions forward to the SVE file seemed a bit indirect.  Doing things
> the way the patch does them puts aarch64-builtins.c and the SVE code on
> more of an equal footing.
> 
> The aarch64_(general_)gimple_fold_builtin change is mostly just
> reindentation.  I've attached a -b version of the diff as well.
> 
> Tested on aarch64-linux-gnu (with and without SVE) and aarch64_be-elf.
> OK to install when the ACLE patch itself is ready to install?

OK.

Thanks,
James

> 
> Richard
> 
> 
> 2019-08-07  Richard Sandiford  <richard.sandiford@arm.com>
> 
> gcc/
> 	* config/aarch64/aarch64-protos.h (aarch64_builtin_class): New enum.
> 	(AARCH64_BUILTIN_SHIFT, AARCH64_BUILTIN_CLASS): New constants.
> 	(aarch64_gimple_fold_builtin, aarch64_mangle_builtin_type)
> 	(aarch64_fold_builtin, aarch64_init_builtins, aarch64_expand_builtin):
> 	(aarch64_builtin_decl, aarch64_builtin_rsqrt): Delete.
> 	(aarch64_general_mangle_builtin_type, aarch64_general_init_builtins):
> 	(aarch64_general_fold_builtin, aarch64_general_gimple_fold_builtin):
> 	(aarch64_general_expand_builtin, aarch64_general_builtin_decl):
> 	(aarch64_general_builtin_rsqrt): Declare.
> 	* config/aarch64/aarch64-builtins.c (aarch64_general_add_builtin):
> 	New function.
> 	(aarch64_mangle_builtin_type): Rename to...
> 	(aarch64_general_mangle_builtin_type): ...this.
> 	(aarch64_init_fcmla_laneq_builtins, aarch64_init_simd_builtins)
> 	(aarch64_init_crc32_builtins, aarch64_init_builtin_rsqrt)
> 	(aarch64_init_pauth_hint_builtins, aarch64_init_tme_builtins): Use
> 	aarch64_general_add_builtin instead of add_builtin_function.
> 	(aarch64_init_builtins): Rename to...
> 	(aarch64_general_init_builtins): ...this.  Use
> 	aarch64_general_add_builtin instead of add_builtin_function.
> 	(aarch64_builtin_decl): Rename to...
> 	(aarch64_general_builtin_decl): ...this and remove the unused
> 	arguments.
> 	(aarch64_expand_builtin): Rename to...
> 	(aarch64_general_expand_builtin): ...this and remove the unused
> 	arguments.
> 	(aarch64_builtin_rsqrt): Rename to...
> 	(aarch64_general_builtin_rsqrt): ...this.
> 	(aarch64_fold_builtin): Rename to...
> 	(aarch64_general_fold_builtin): ...this.  Take the function subcode
> 	and return type as arguments.  Remove the "ignored" argument.
> 	(aarch64_gimple_fold_builtin): Rename to...
> 	(aarch64_general_gimple_fold_builtin): ...this.  Take the function
> 	subcode and gcall as arguments, and return the new function call.
> 	* config/aarch64/aarch64.c (aarch64_init_builtins)
> 	(aarch64_fold_builtin, aarch64_gimple_fold_builtin)
> 	(aarch64_expand_builtin, aarch64_builtin_decl): New functions.
> 	(aarch64_builtin_reciprocal): Call aarch64_general_builtin_rsqrt
> 	instead of aarch64_builtin_rsqrt.
> 	(aarch64_mangle_type): Call aarch64_general_mangle_builtin_type
> 	instead of aarch64_mangle_builtin_type.
> 

  reply	other threads:[~2019-09-25 21:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-07 20:06 Richard Sandiford
2019-09-25 21:23 ` James Greenhalgh [this message]
2019-09-27  8:49   ` Richard Sandiford

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=20190925212304.GA32087@arm.com \
    --to=james.greenhalgh@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=marcus.shawcroft@arm.com \
    --cc=nd@arm.com \
    --cc=richard.earnshaw@arm.com \
    --cc=richard.sandiford@arm.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).