public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Hans-Peter Nilsson <hp@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-281] libgcc CRIS: Define TARGET_HAS_NO_HW_DIVIDE Date: Thu, 27 Apr 2023 00:00:57 +0000 (GMT) [thread overview] Message-ID: <20230427000057.B78AF3858D3C@sourceware.org> (raw) https://gcc.gnu.org/g:d7f0bc05949481048d2fd524ecb2d892f6a04294 commit r14-281-gd7f0bc05949481048d2fd524ecb2d892f6a04294 Author: Hans-Peter Nilsson <hp@axis.com> Date: Thu Apr 27 02:00:33 2023 +0200 libgcc CRIS: Define TARGET_HAS_NO_HW_DIVIDE With this, execution time for e.g. __moddi3 go from 59 to 40 cycles in the "fast" case or from 290 to 200 cycles in the "slow" case (when the !TARGET_HAS_NO_HW_DIVIDE variant calls division and modulus functions for 32-bit SImode), as exposed by gcc.c-torture/execute/arith-rand-ll.c compiled for -march=v10. Unfortunately, it just puts a performance improvement "dent" of 0.07% in a arith-rand-ll.c-based performance test - where all loops are also reduced to 1/10. The size of every affected libgcc function is reduced to less than half and they are all now leaf functions. * config/cris/t-cris (HOST_LIBGCC2_CFLAGS): Add -DTARGET_HAS_NO_HW_DIVIDE. Diff: --- libgcc/config/cris/t-cris | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libgcc/config/cris/t-cris b/libgcc/config/cris/t-cris index b582974a42e..e0020294be9 100644 --- a/libgcc/config/cris/t-cris +++ b/libgcc/config/cris/t-cris @@ -8,3 +8,6 @@ $(LIB2ADD): $(srcdir)/config/cris/arit.c echo "#define L$$name" > tmp-$@ \ && echo '#include "$<"' >> tmp-$@ \ && mv -f tmp-$@ $@ + +# Use an appropriate implementation when implementing DImode division. +HOST_LIBGCC2_CFLAGS += -DTARGET_HAS_NO_HW_DIVIDE
reply other threads:[~2023-04-27 0:00 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230427000057.B78AF3858D3C@sourceware.org \ --to=hp@gcc.gnu.org \ --cc=gcc-cvs@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: linkBe 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).