From: Marc Glisse <marc.glisse@inria.fr>
To: Jonathan Wakely <jwakely.gcc@gmail.com>
Cc: Johan Alfredsson <sduvan.gcc@gmail.com>, gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: Compiling for single-threaded use (implicit threading support difference in 4.9.1 vs. 4.8.1)
Date: Wed, 15 Oct 2014 11:40:00 -0000 [thread overview]
Message-ID: <alpine.DEB.2.11.1410151327210.8286@stedding.saclay.inria.fr> (raw)
In-Reply-To: <CAH6eHdRBuh7LZr3JaRmFgYuOeF_S5j4aLjtvgdATLvpQtBsKoQ@mail.gmail.com>
On Wed, 15 Oct 2014, Jonathan Wakely wrote:
> On 14 October 2014 18:29, Johan Alfredsson wrote:
>> As my application is single-threaded, I don't want to pay the
>> performance penalty of mutexes etc. Hence, my question is if it is
>> possible to explicitly request gcc to compile my application in
>> single-threaded mode.
>
> It should happen automatically, there's no way to request it because
> there should be no need.
Well, I would quite like a compilation flag
-fI-promise-not-to-use-threads, that would automatically turn atomics into
plain variables with regular operations, turn TLS into regular memory,
remove locks, etc, and perform all the optimizations this enables. It
isn't quite the same as a runtime test that only skips a few mutexes in
the library.
--
Marc Glisse
next prev parent reply other threads:[~2014-10-15 11:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CA+pZiO6XXzJ7y-qu_F167ruqRwvZc8Sxnj4EAH2rXZwiODPbyw@mail.gmail.com>
2014-10-14 17:29 ` Fwd: " Johan Alfredsson
2014-10-15 9:14 ` Jonathan Wakely
2014-10-15 10:44 ` Jonathan Wakely
2014-10-16 14:43 ` Johan Alfredsson
2014-10-16 15:01 ` Marc Glisse
2014-10-16 16:06 ` Jonathan Wakely
2014-10-16 17:51 ` Johan Alfredsson
2014-10-15 11:40 ` Marc Glisse [this message]
2014-10-15 23:15 ` leon zadorin
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=alpine.DEB.2.11.1410151327210.8286@stedding.saclay.inria.fr \
--to=marc.glisse@inria.fr \
--cc=gcc-help@gcc.gnu.org \
--cc=jwakely.gcc@gmail.com \
--cc=sduvan.gcc@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).