From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by sourceware.org (Postfix) with ESMTPS id E8B08381EC9A for ; Thu, 15 Dec 2022 15:22:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E8B08381EC9A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-x1030.google.com with SMTP id js9so10821831pjb.2 for ; Thu, 15 Dec 2022 07:22:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Jl/S2Kn0jT+GjmL9HD/iFi86CHZIAPZY0mODFO6JxtY=; b=Vf9sL1C07urps/Ehb07sDTS2pA0SQY++zbUp28palF1GzrjiQB2wpR91BGEPRdSFu1 ifZWZGACU1x1fG6ykvWCwawFU9InoCY8O4/FRqRkhdL+i8uQET3W2HH0RpE9QfcjHiKD gBxLggi8h8hvaiguSDyKwJZnB8Ns7XqaKZXcvFPdG8CsWZ/L41zQFxSYcFCwuQ8/acDI NQNl8vrNWLV1GR0bMyfMP5DiUc0RswZuHMeJyjt7KkWP363q4937qqzjsGvGKzYP6bre m1nD87u8szOVRb6Ci56XqJ3zCXcPlHD71nwUf1TwlepEhQgzIexr9KO8y69DWnoj241c D8TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Jl/S2Kn0jT+GjmL9HD/iFi86CHZIAPZY0mODFO6JxtY=; b=fCpjAKsMaIxrB5Rm60D+rCzvkfyA9/z+/HWlNiDp52Fl0Y2OQnxDknY0Y5uvy1vc3D dhDuLm6GPMFNGmvr5IFnHTsg+KT/Qj6dg54q+q1UYslnIdG2QTPjlRsJVjegjwSEUxfA e+XtdF2gPL3M7csQ6u2QrE0IRbE7qTVwBkPBblidk3x1U17qlDZynQL7F/cMvn2wYMn5 3IpOL+OoemYPmLN1O+q+NL2vempJ23rPo2f6kDbecqw8XgN8eVNJctsHawo68OqISjyR mWAXkPy1mvAqX5+xiZ4r0NmVT1lL0rMysWtdRiKT6Ufay9vc/W+xOJfpDXdj1uqiwZKF m4DA== X-Gm-Message-State: AFqh2kqcQv7c4FREdpVSPzkHl3LR3UZojZag3HHV0sWLP4AKg/Mgj5M8 nVCXxam5tvLQWivH0bkzWORD53h5D0F4+xBZB5M= X-Google-Smtp-Source: AMrXdXvDsgnwAgNcUJeJ2MHL9ljKDKBfX5bqtMtC+8hr2pmEP9e8CaeHYa0ToAKq8EYaN9GyEw6NkFMg+GFitGyKCfA= X-Received: by 2002:a17:90b:4394:b0:221:6b59:7697 with SMTP id in20-20020a17090b439400b002216b597697mr614088pjb.85.1671117724776; Thu, 15 Dec 2022 07:22:04 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: "G.T." Date: Thu, 15 Dec 2022 10:21:52 -0500 Message-ID: Subject: Re: Possible dead code in file lra-spills.cc To: Richard Biener Cc: gcc@gcc.gnu.org Content-Type: multipart/alternative; boundary="0000000000005cfc9705efdf6ad8" X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --0000000000005cfc9705efdf6ad8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ok. And as you point out it is redundant code rather than dead code, to be precise. On Wed, Dec 14, 2022, 1:47 PM Richard Biener wrote: > > > > Am 14.12.2022 um 18:28 schrieb G.T. via Gcc : > > > > =EF=BB=BFAt line 276, lra_assert (spill_class !=3D NO_REGS); would trig= ger > > whenever execution reached here with spill_class equal to NO_REGS. > > Seems to me that would never happen. Because one of the conditions in > > the if statement right above it (line 265) catches spill_class =3D=3D > > NO_REGS and causes the rest of the for loop to be skipped by executing > > continue in the consequent of the if. So lra_assert never sees > > spill_class =3D=3D NO_REGS. That makes line 276 dead code, right? > > Sometimes this serves as documentation to make the code more obvious to > read. Depends on the distance of the redundant check. > > Richard > > > > Thanks. > > GT. > --0000000000005cfc9705efdf6ad8--