From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by sourceware.org (Postfix) with ESMTPS id 867973858D1E for ; Sat, 1 Oct 2022 01:01:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 867973858D1E 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-pf1-x42f.google.com with SMTP id c198so5595359pfc.13 for ; Fri, 30 Sep 2022 18:01:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=iBJGS7sSjtoV6goofUIk9BcKFxAHt+r/I7S5fVtLx28=; b=RXwihp1pa9oJFaObDY8xhpnDIyqPuwkcHwedDN2Iu5zFlvQIWH2tllhgs33uNZM7NN I353IVAfSopSqKD4D9QAlzanl6oDL16RFwSKLcp7kZKbOFOwlmP5c+tpJ2Mw4sn1ju6Y PrHRVaCDuaK9ipDJW1LbNX0VsTs1looeeLESvUm0C7i+3UWdUHIr4Qn+iS0a8QGJIzw9 jVCGneObYFvVBpZQpR/LoSkGNEbOuL0OHU1WkSVm2agdoDrViVTlDOC5DmvxZbdXd8zo Hu/bwyFwsNzuWvuJvs9i/12hO4Zuj03eQSt4o36XsKfznGZozNxoPHREoIg8hXyaCrGR G8Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=iBJGS7sSjtoV6goofUIk9BcKFxAHt+r/I7S5fVtLx28=; b=J8brRgi0Gd2U6gr8CSgGkvihM/hS/6jdCEzefjbnv5KjbiE5x1l3zLnxwlYRvE3m+7 W2Tp+juRC1CoDqvizweTUp7y8kj5+lLHbHv9wnMzH/IctDIOU6ftNitFJSRo5t5aRJLh 20qBlvhHkKkzcsTSmXQEtQqxJ4fD2hD7IuRo3EGss3PaCkFaxs+x+GalrPkIkYXjg3jY Wd44W6hDptZgGjKj/J8xcAnt8Cn0biTmt/cvdXzv3kR6iZZIz7Q4IrC2+VRB7O+AyHIb p7fmT4kqdpd73HMJU/iA3xlKup6uLkYFNw/UgDFfMZXwq9OenV5TGsofBc+cMO2bE6TA 3NAQ== X-Gm-Message-State: ACrzQf2KfgmisnLMV+nXyLU0prL6m53YCTTIcrtCz1MoJkPu9VkWaPp1 I1cAb6TGlmcnPuQAMpmmilc= X-Google-Smtp-Source: AMsMyM7PDhNBWzqLUqVRss1xrZJWL7ccJDfXs4ZKQYv6ryfcnDo/3ceXo0Hi3OPBEAcStTUd4JsBlw== X-Received: by 2002:a63:120b:0:b0:43c:771b:4c52 with SMTP id h11-20020a63120b000000b0043c771b4c52mr10036946pgl.370.1664586062327; Fri, 30 Sep 2022 18:01:02 -0700 (PDT) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id d66-20020a623645000000b0053725e331a1sm2458228pfa.82.2022.09.30.18.01.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Sep 2022 18:01:01 -0700 (PDT) Message-ID: Date: Fri, 30 Sep 2022 19:01:00 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: [PATCH] Fix the build of record_edge_info() Content-Language: en-US To: Palmer Dabbelt , gcc-patches@gcc.gnu.org References: <20221001005720.28208-1-palmer@rivosinc.com> From: Jeff Law In-Reply-To: <20221001005720.28208-1-palmer@rivosinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,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 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). jeff