From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by sourceware.org (Postfix) with ESMTPS id 1ADCA3858D1E for ; Sat, 1 Oct 2022 01:27:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1ADCA3858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-pg1-x52b.google.com with SMTP id u69so5515226pgd.2 for ; Fri, 30 Sep 2022 18:27:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:from:to:cc:subject:date; bh=UMM8HtQy6bDylcfc9/3FLIVgBXofHFwiV7tj1RUx4H8=; b=QDSCqvWbYMNdIReNWQV4UDP/nF3a7PKYXB+9nXzrjfVVOQh2mH88huofwcxsCUd4ru iCRBZlt49oVDygQErIIua26W+SBd0MoWNYBdc7yOCLYDOhuPQQzhOlRxt6HEsw9cobEM So9MFh8ur0ypT3uEK+ZXloHcOwxrRMX0tfeJXlTo5FPT/d8hSmrIQtnYJ7vjwVMP1jBJ 1sR/xzAABdFmrWO/960tRQxbTixOYvVVm+X2Ss6AUPQXh9JUtQ7BOybyIuwil071YxoL 3A6XA5VNVCBaLv4lE1hNFXw1ZbUWsvJrtZpj5LBWdhka6s/aIbKsKRaSJ0/KdGcK5xuY G+Og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:to:from:cc :in-reply-to:subject:date:x-gm-message-state:from:to:cc:subject:date; bh=UMM8HtQy6bDylcfc9/3FLIVgBXofHFwiV7tj1RUx4H8=; b=hHzBBtkmqQI9/+y55QRpjVI2xHP5p0j6e1UYuZFlUx+r5PBdd3uqdS13SSdCJZbzsg 1emPey2rv27YK938YHHb6laH2P0z0dvl8lDqfmSgBsUzeR/U1ZvGHMPXXenhmqL49iDo yrFkdFMzpcSvbnm+OqC60lq5/d4cR3umIWxvrRye7bA5lvAzFRH3vV/FrmOOd87zs+RT o7k/+dhoDyvQ1FCwN+z3GmEBc7N8fJYRlvbmsOA2MfvhfuMQy0kozcGbDjcw7shF0pQY n/xJTHRhsQsJggcrPzoWnLvRLa2YSW4qKqtjDm3a/cnLNuns+yupbaEYTFHkjhOTCjRZ cBow== X-Gm-Message-State: ACrzQf1Lr4b9Q2LBHHxRa7LKna7Qx1wMYxENei6qk9iqG0JyzNEPv1wm HmPkl2ZR+TeCz6sn2qn857es/b4x3NYZ5g== X-Google-Smtp-Source: AMsMyM5vPOPr808rtZLTc07RjCdFBF5Y0c8VYmA287D8KrVcc2sATnfK1sMfBJEzHILkjJBCf7wTCA== X-Received: by 2002:a63:1258:0:b0:439:c1e0:fab6 with SMTP id 24-20020a631258000000b00439c1e0fab6mr9978112pgs.377.1664587633833; Fri, 30 Sep 2022 18:27:13 -0700 (PDT) Received: from localhost (76-210-143-223.lightspeed.sntcca.sbcglobal.net. [76.210.143.223]) by smtp.gmail.com with ESMTPSA id i62-20020a626d41000000b0053e468a78a8sm2489868pfc.158.2022.09.30.18.27.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Sep 2022 18:27:13 -0700 (PDT) Date: Fri, 30 Sep 2022 18:27:13 -0700 (PDT) X-Google-Original-Date: Fri, 30 Sep 2022 18:27:03 PDT (-0700) Subject: Re: [PATCH] Fix the build of record_edge_info() In-Reply-To: CC: gcc-patches@gcc.gnu.org From: Palmer Dabbelt To: jeffreyalaw@gmail.com Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,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: On Fri, 30 Sep 2022 18:01:00 PDT (-0700), jeffreyalaw@gmail.com wrote: > > On 9/30/22 18:57, Palmer Dabbelt wrote: >> As of 1214196da79 ("More gimple const/copy propagation opportunities"), >> I'm getting some build failures during bootstrap >> >> ../../gcc/tree-ssa-dom.cc: In function ‘void record_edge_info(basic_block)’: >> ../../gcc/tree-ssa-dom.cc:689:27: error: ‘dst’ was not declared in this scope; did you mean ‘dse’? >> 689 | if (dst == PHI_ARG_DEF (phi, !alternative)) >> | ^~~ >> | dse >> In file included from ../../gcc/gimple-ssa.h:24, >> from ../../gcc/ssa.h:27, >> from ../../gcc/tree-ssa-dom.cc:28: >> ../../gcc/tree-ssa-dom.cc:689:47: error: ‘phi’ was not declared in this scope; did you mean ‘gphi’? >> 689 | if (dst == PHI_ARG_DEF (phi, !alternative)) >> | ^~~ >> ../../gcc/tree-ssa-operands.h:82:54: note: in definition of macro ‘PHI_ARG_DEF’ >> 82 | #define PHI_ARG_DEF(PHI, I) gimple_phi_arg_def ((PHI), (I)) >> | >> >> I've never looked at this stuff before so I've sort of just pattern >> matched this, it at least fixes the build. Happy to go try and >> understand what's going on here, but I'm in the middle of a few things >> so I figured it'd be better to just send it along in case anyone else is >> running into the same issue -- it's more of a bug report than a fix, >> though. >> >> gcc/ChangeLog >> >> * tree-ssa-dom.c (record_edge_info): Move the alternative check >> below the phi definition. >> --- > > You got it right, but it's already fixed on the trunk (I pushed the > wrong version of the patch). Thanks, I must have just had some unlucky timing ;)