From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by sourceware.org (Postfix) with ESMTPS id 283B8385828B for ; Sun, 12 Jun 2022 17:58:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 283B8385828B Received: by mail-pf1-x42d.google.com with SMTP id x138so3874605pfc.12 for ; Sun, 12 Jun 2022 10:58:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=UlL/n7awyFRAHc4l51advAptcAoVN//TMiDBtyTPjRE=; b=D82zK7lpJt5c3UPRqTRWEaL2QtYWLSp6CA00OP9IAcbHOxPyNKH4LenLEwokqxcuak LFWWEWEFz1B+SOPl/9JbXKOJhvzgEcZ5M620vvECIrXLiGLWH3XOoHKSIed1pCztpCLE uAR9E74hkuIsJwRO7oDcje1yUfPS7Mgeoi/RA8B8Cmm0ojouKAxdZBibvA36qkroxTEP r4KoRHrLOhFhHwtF8LwQje9XMTUvanmfuSYB7HgVfd+PRUXF4OMcuO7XKuEJatvRkcPN BacTQu15YC+vBBVc/a6conIWqI++7JETn+cyAYOiUUUNTCNkFT/88IlMVFPW+aRlVvBG 2wDA== X-Gm-Message-State: AOAM532HaHyjRu+xV6YhWJBp91ufxnCzfotF9o6YNQOYcmen/pdTgBy9 2i3WjJzYz67lE2KysVSbWxqybvVzcZSveA== X-Google-Smtp-Source: ABdhPJx2hZ8sKu1s69tavqMCk5CLvw3W5Cv3Ol87wI1QWlXXZymuL253YLGXpNY3SbT5kRw9dr8WRg== X-Received: by 2002:a63:3193:0:b0:3fe:3f57:35fd with SMTP id x141-20020a633193000000b003fe3f5735fdmr20604940pgx.232.1655056729827; Sun, 12 Jun 2022 10:58:49 -0700 (PDT) Received: from [172.31.0.204] (c-73-63-24-84.hsd1.ut.comcast.net. [73.63.24.84]) by smtp.gmail.com with ESMTPSA id b2-20020a170902650200b00168ba5ac8adsm3327172plk.163.2022.06.12.10.58.49 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Jun 2022 10:58:49 -0700 (PDT) Message-ID: <2c8b7c5c-9276-84fd-b912-2c74097cef84@gmail.com> Date: Sun, 12 Jun 2022 11:58:48 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH/RFC take #2] cprop_hardreg... Third time's a charm. Content-Language: en-US To: gcc-patches@gcc.gnu.org References: <006c01d8776f$2c67b960$85372c20$@nextmovesoftware.com> From: Jeff Law In-Reply-To: <006c01d8776f$2c67b960$85372c20$@nextmovesoftware.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 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, SCC_BODY_URI_ONLY, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jun 2022 17:58:52 -0000 On 6/3/2022 11:27 AM, Roger Sayle wrote: > Hi Richard, > Here's a revised version of my patch incorporating both your suggestions. > The algorithm now uses two worklist vectors, and pointers to them, > alternating between them on each iteration, which allows the code to > handle an arbitrary number of passes without the previous code duplication. > This then allows a "for (pass=2; pass<=passes; pass++)"-like idiom, that allows > it to try two passes (the current behaviour) at -O1, but three passes with > -O2 and higher. This also provides a convenient point, should someone > wish to control the number of cprop_hardreg pass iterations from the > command line (or a backend) in future. > > This patch has been retested on x86_64-pc-linux-gnu, both with an without > the proposed i386 backend patch for reduced register shuffling, with > make bootstrap and make -k check, both with/without target_board= > unix{-m32}, with no new failures. Is this what you had in mind? > > 2022-06-03 Roger Sayle > Richard Biener > > gcc/ChangeLog > * regcprop.cc (pass_cprop_hardreg::execute): Perform a third > iteration over each basic block that was updated by the second > iteration. OK jeff