From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 6C45640F3A for ; Sun, 12 Jun 2022 08:32:30 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 404F668B3DB; Sun, 12 Jun 2022 11:32:28 +0300 (EEST) Received: from mail8.parnet.fi (mail8.parnet.fi [77.234.108.134]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 41CD168AF21 for ; Sun, 12 Jun 2022 11:32:22 +0300 (EEST) Received: from mail9.parnet.fi (mail9.parnet.fi [77.234.108.21]) by mail8.parnet.fi with ESMTP id 25C8WKOk032529-25C8WKOl032529; Sun, 12 Jun 2022 11:32:20 +0300 Received: from foo.martin.st (host-97-187.parnet.fi [77.234.97.187]) by mail9.parnet.fi (Postfix) with ESMTPS id C8A75A142E; Sun, 12 Jun 2022 11:32:20 +0300 (EEST) Date: Sun, 12 Jun 2022 11:32:19 +0300 (EEST) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: FFmpeg development discussions and patches In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-FE-Policy-ID: 3:14:2:SYSTEM Subject: Re: [FFmpeg-devel] [PATCH] all: Replace if (ARCH_FOO) checks by #if ARCH_FOO X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Sun, 12 Jun 2022, Soft Works wrote: > > >> -----Original Message----- >> From: ffmpeg-devel On Behalf Of >> Andreas Rheinhardt >> Sent: Sunday, June 12, 2022 7:28 AM >> To: ffmpeg-devel@ffmpeg.org >> Cc: Andreas Rheinhardt >> Subject: [FFmpeg-devel] [PATCH] all: Replace if (ARCH_FOO) checks by >> #if ARCH_FOO >> >> This is more spec-compliant because it does not rely >> on dead-code elimination by the compiler. Especially >> MSVC has problems with this, as can be seen in >> https://ffmpeg.org/pipermail/ffmpeg-devel/2022-May/296373.html >> or >> https://ffmpeg.org/pipermail/ffmpeg-devel/2022-May/297022.html >> >> This commit does not eliminate every instance where we rely >> on the dead code elimination: It only tackles branching to >> the initialization of arch-specific dsp code, not e.g. all >> uses of CONFIG_ and HAVE_ checks. But maybe it is already >> enough to compile FFmpeg with MSVC with whole-programm-optimizations >> enabled (if one does not disable too many components). >> >> Signed-off-by: Andreas Rheinhardt >> --- > > LGTM. > > It's not really a story as simple as "poor MSVC is unable > to perform dead-code-elimination". It is actually capable to do that, > but the ffmpeg code was not only requiring the compiler to eliminate > dead code, > it actually required a compiler to ignore dead code blocks > even when those would contain invalid code that cannot be compiled > at all. Can you qualify this statement? This does not match my understanding. (I'm not opposed to the patch itself though.) // Martin _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".