All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>,
	Richard Henderson <richard.henderson@linaro.org>
Cc: Laurent Vivier <lvivier@redhat.com>, Peter Xu <peterx@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Juan Quintela <quintela@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] tcg: Fix complilation with TCG
Date: Thu, 23 Nov 2017 23:08:27 +0100	[thread overview]
Message-ID: <d25e4d2f-2ca2-55fb-f314-8ed17da22b9b@redhat.com> (raw)
In-Reply-To: <CAFEAcA9zwnY5+=Em2gta7HVoKGv2EBS3UVH+zbwCzOCovyUVdg@mail.gmail.com>

On 22/11/2017 13:14, Peter Maydell wrote:
>> We do this all of the time for more regular tests that are obviously
>> compile-time.  I am a really big fan of this, because it makes sure that the
>> (usually 32-bit) else branch continues to compile.
> I'm happy with code that is "we assume the compiler is going to
> be sensible here so we don't have to use #ifdefs in the name
> of performance". I just don't think we should write code that
> can't compile at all if the compiler happens to not identify
> the codepath as dead. There's no guarantee by the compiler
> that it's going to do that.

There's plenty of cases where "if (kvm_enabled())" code would fail to
link if the compiler didn't do that optimization.

(In fact, it's one of the very few optimizations that the compiler
performs at -O0, because it's extremely effective).

Paolo

  reply	other threads:[~2017-11-23 22:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-22  8:41 [Qemu-devel] [PATCH] tcg: Fix complilation with TCG Juan Quintela
2017-11-22  9:09 ` no-reply
2017-11-22 12:01 ` Richard Henderson
2017-11-22 12:03   ` Peter Maydell
2017-11-22 12:08     ` Richard Henderson
2017-11-22 12:14       ` Peter Maydell
2017-11-23 22:08         ` Paolo Bonzini [this message]
2017-11-24 10:07           ` Peter Maydell
2017-11-24 10:09             ` Paolo Bonzini
2017-11-22 12:19       ` Dr. David Alan Gilbert
2017-11-22 12:01 ` Peter Maydell
2017-11-22 12:05   ` Juan Quintela
2017-11-22 12:32 ` Philippe Mathieu-Daudé
2017-11-22 22:45   ` Emilio G. Cota
2017-11-23 10:46 ` Peter Maydell

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=d25e4d2f-2ca2-55fb-f314-8ed17da22b9b@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=richard.henderson@linaro.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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.