From: Martin Sebor <msebor@gmail.com>
To: Gcc Patch List <gcc-patches@gcc.gnu.org>
Cc: Andrew Pinski <pinskia@gmail.com>
Subject: [PATCH] 19705 - -fno-branch-count-reg doesn't prevent decrement and branch instructions on a count register
Date: Thu, 11 Feb 2016 21:58:00 -0000 [thread overview]
Message-ID: <56BD0419.9090702@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 535 bytes --]
The more than decennnial rtl-optimization/19705 - -fno-branch-count-reg
doesn't prevent decrement and branch instructions on a count register
points out that the documentation of the option leads one to expect
that it prevents the decrement and branch instruction from appearing
in the instruction stream. This isn't the case The option prevents
a dedicated pass from running that introduces such instructions, but
it doesn't prevent other passes from introducing it. The attached
updates the documentation to clarify this.
Martin
[-- Attachment #2: gcc-19705.patch --]
[-- Type: text/x-patch, Size: 1561 bytes --]
PR rtl-optimization/19705 - -fno-branch-count-reg doesn't prevent decrement
and branch instructions on a count register
gcc/ChangeLog:
2016-02-11 Martin Sebor <msebor@redhat.com>
PR rtl-optimization/19705
* doc/invoke.texi (Options That Control Optimization): Clarify
-fno-branch-count-reg.
Index: gcc/doc/invoke.texi
===================================================================
--- gcc/doc/invoke.texi (revision 233355)
+++ gcc/doc/invoke.texi (working copy)
@@ -6513,11 +6513,14 @@ life-range analysis. This option is eff
@item -fno-branch-count-reg
@opindex fno-branch-count-reg
-Do not use ``decrement and branch'' instructions on a count register,
-but instead generate a sequence of instructions that decrement a
-register, compare it against zero, then branch based upon the result.
-This option is only meaningful on architectures that support such
-instructions, which include x86, PowerPC, IA-64 and S/390.
+Avoid running a pass scanning for opportunities to use ``decrement and
+branch'' instructions on a count register instead of generating sequences
+of instructions that decrement a register, compare it against zero, and
+then branch based upon the result. This option is only meaningful on
+architectures that support such instructions, which include x86, PowerPC,
+IA-64 and S/390. Note that the @option{-fno-branch-count-reg} option
+doesn't remove the decrement and branch instructions from the generated
+instruction stream introduced by other optimization passes.
Enabled by default at @option{-O1} and higher.
next reply other threads:[~2016-02-11 21:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-11 21:58 Martin Sebor [this message]
2016-02-19 3:39 ` Martin Sebor
2016-02-19 21:46 ` Jeff Law
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=56BD0419.9090702@gmail.com \
--to=msebor@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=pinskia@gmail.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).