public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: GCC Patches <gcc-patches@gcc.gnu.org>,
	Richard Sandiford <richard.sandiford@arm.com>
Subject: Re: Short-cut generation of simple built-in functions
Date: Sun, 22 Nov 2015 22:19:00 -0000	[thread overview]
Message-ID: <CAMe9rOog3BUBXFDD7QbCWeLQyN5ZsZOTZNr+iMnDj_-Zpkt+BA@mail.gmail.com> (raw)
In-Reply-To: <878u6aos0i.fsf@e105548-lin.cambridge.arm.com>

On Sat, Nov 7, 2015 at 5:31 AM, Richard Sandiford
<richard.sandiford@arm.com> wrote:
> This patch short-circuits the builtins.c expansion code for a particular
> gimple call if:
>
> - the function has an associated internal function
> - the target implements that internal function
> - the call has no side effects
>
> This allows a later patch to remove the builtins.c code, once calls with
> side effects have been handled.
>
> Tested on x86_64-linux-gnu, aarch64-linux-gnu and arm-linux-gnueabi.
> OK to install?
>
> Thanks,
> Richard
>
>
> gcc/
>         * builtins.h (called_as_built_in): Declare.
>         * builtins.c (called_as_built_in): Make external.
>         * internal-fn.h (expand_internal_call): Define a variant that
>         specifies the internal function explicitly.
>         * internal-fn.c (expand_load_lanes_optab_fn)
>         (expand_store_lanes_optab_fn, expand_ANNOTATE, expand_GOMP_SIMD_LANE)
>         (expand_GOMP_SIMD_VF, expand_GOMP_SIMD_LAST_LANE)
>         (expand_GOMP_SIMD_ORDERED_START, expand_GOMP_SIMD_ORDERED_END)
>         (expand_UBSAN_NULL, expand_UBSAN_BOUNDS, expand_UBSAN_VPTR)
>         (expand_UBSAN_OBJECT_SIZE, expand_ASAN_CHECK, expand_TSAN_FUNC_EXIT)
>         (expand_UBSAN_CHECK_ADD, expand_UBSAN_CHECK_SUB)
>         (expand_UBSAN_CHECK_MUL, expand_ADD_OVERFLOW, expand_SUB_OVERFLOW)
>         (expand_MUL_OVERFLOW, expand_LOOP_VECTORIZED)
>         (expand_mask_load_optab_fn, expand_mask_store_optab_fn)
>         (expand_ABNORMAL_DISPATCHER, expand_BUILTIN_EXPECT, expand_VA_ARG)
>         (expand_UNIQUE, expand_GOACC_DIM_SIZE, expand_GOACC_DIM_POS)
>         (expand_GOACC_LOOP, expand_GOACC_REDUCTION, expand_direct_optab_fn)
>         (expand_unary_optab_fn, expand_binary_optab_fn): Add an internal_fn
>         argument.
>         (internal_fn_expanders): Update prototype.
>         (expand_internal_call): Define a variant that specifies the
>         internal function explicitly. Use it to implement the previous
>         interface.
>         * cfgexpand.c (expand_call_stmt): Try to expand calls to built-in
>         functions as calls to internal functions.
>

This caused:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68488


H.J.

      parent reply	other threads:[~2015-11-22 22:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-07 13:31 Richard Sandiford
2015-11-10 11:29 ` Richard Biener
2015-11-10 21:24   ` Richard Sandiford
2015-11-11 10:18     ` Richard Biener
2015-11-13 14:32       ` Richard Sandiford
2015-11-17  9:55         ` Richard Sandiford
2015-11-17 14:34           ` Richard Biener
2015-11-22 22:19 ` H.J. Lu [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=CAMe9rOog3BUBXFDD7QbCWeLQyN5ZsZOTZNr+iMnDj_-Zpkt+BA@mail.gmail.com \
    --to=hjl.tools@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --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).