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 15FDC42AC6 for ; Sun, 12 Jun 2022 09:09:20 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1AE8B68B3D6; Sun, 12 Jun 2022 12:09:18 +0300 (EEST) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 643ED68B3D2 for ; Sun, 12 Jun 2022 12:09:11 +0300 (EEST) Received: by mail-lf1-f50.google.com with SMTP id y32so4641945lfa.6 for ; Sun, 12 Jun 2022 02:09:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=rKhMt7KESOhMT0yAtfGW9DWpwTNO6ASEuHXZrf8ps/w=; b=g4XTf/JyNBeCLPEYg5zh5mc9eUjDO4z5eEu8avvYfXMhYayQ0q5rtHWdEzbguNExLk uSj/kOKc6Ydu/+a6bcySuSe3OdPYKW2cYjD6ISyByFD5NrnPT3KASUMDRQ4t4ADRrLzw 2LCn+0X7ZeO2dInJjIABAO5zH0uOKkJc6u7YoMVStBfPsPzSQ3gp6JGAKEx8Qu7cPPyt /2DxsbBmX+t8mktAewzz/CXdwdv1E0iRazjNfWhTo5AyGzHr4PIVfZ5MJZvUnfqokKLi CXs2Iz3KpmmoaqzAoJhwBfElakyfydgJ3M9Fb9l6e8XE32nNNrArosxr3Boz6MhXEmSG CW7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=rKhMt7KESOhMT0yAtfGW9DWpwTNO6ASEuHXZrf8ps/w=; b=Z3sfPanw98hGZgwgXiSYSs9sHgwe/+7R65rMHRIuPKf4Of88PYSr9eVwehb5LDim98 eTJqvcAzs9Jg7loIqr6piEgNW9yqjNGnl+gvudOb5M1l9Hsnu0w8MFhxPdj59WfMZwUx LIyOYNIP/ZXUN7WFMPfnUXvbOTx99wOoTDTWtBh0Rx4VfflgULnVsxJI/niEmeAmRFsq 2c3ImSd4DwtE2tulOCxwE5tr+1pe3urQFpu09GCymdkDUJFZVbsD319QzzvdsPyMBtGk cOn+xtJfllG0wOrZcb+/8fD7u8bTBPYQT8A0HxB0WHzvJSGU3Rru8p+Dl3HmX8S47b9F 041A== X-Gm-Message-State: AOAM5339IORa/VaHk/EqpD/D796AnzTjg0NZAjgsaJ7xaoQJHsA4cq4Z UTCFcObCzLbh3izMZx+inZix82M1nAd/K1bWUnHVxzCC X-Google-Smtp-Source: ABdhPJx2TgNsBz1W5SDZuaeSb395kQHAtEsst40j27I7Yltaf9zcPAas9zqdmtpf76aadJWpKfgKo5ijPG5VS5MDfbE= X-Received: by 2002:a05:6512:c23:b0:479:3233:e377 with SMTP id z35-20020a0565120c2300b004793233e377mr22828341lfu.684.1655024949543; Sun, 12 Jun 2022 02:09:09 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Hendrik Leppkes Date: Sun, 12 Jun 2022 11:08:57 +0200 Message-ID: To: FFmpeg development discussions and patches 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Sun, Jun 12, 2022 at 10:17 AM 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. This is inaccurate. This code can compile just fine. It is linking that fails, because the functions are not generated, which would not be a problem if it is removed as part of DCE before the linking stage. - Hendrik _______________________________________________ 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".