From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by sourceware.org (Postfix) with ESMTPS id 6732A3858CD1 for ; Mon, 31 Jul 2023 16:05:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6732A3858CD1 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-x433.google.com with SMTP id d2e1a72fcca58-686e29b058cso3334229b3a.1 for ; Mon, 31 Jul 2023 09:05:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690819522; x=1691424322; 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:message-id:reply-to; bh=LswmYn8w8mwtCR5jOYVu+o8+5EBrr/FN2tFP4w2eqcU=; b=IcCq5c1Y7j7pGpl3MKTfUYq8jBdXivbE8Nw8kQ5NJ4D2n18mF9uOkjBzO3whXlyEYx +fy7TjEXoDuP8lx5vC0qKaR4hPIXHILHO7XLgWTRZEYjpfpUd0126eodn7/pJ+uhuB6l Iq32A+9mx3ZgGA6NrwlM1LY3Uuryd57GAL+ygeepmfyYmpmuX00/LKpf04BeoedrTwEI 5cha6ahK4ThtiYxvT8k3SI4Vmo19ruGpxLyvL17s4dwpRlrGZwMqLPyyan2pP9uV024c A305hqTiUftw8k5eg2XP7WTPp5pciiluVfrW68yiVWddE3+LvMRZyfSsyU1Rr1d00EtZ PnFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690819522; x=1691424322; 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:message-id:reply-to; bh=LswmYn8w8mwtCR5jOYVu+o8+5EBrr/FN2tFP4w2eqcU=; b=gs5NHdFueA5K7TKDG30WqQDYKEQ6zw7twdVyQvR23MB7E5CxENG8HN+IavLc2DRz53 peI0Hgv3c7n02P6UTSX5H+WZ4ZZxI/k0fAI7vfe7RgPMhV6TGBPDDVhJpuHIxJSV386I /i+8PV2o2uf4hyS7K2husgEedbicGXkAiBwZEjX45KPz8l7HxjuUeqBPpEroa5tdOR8m RWI1aWetk/Yqe8iweZcQvLgUBsgdAVcVsOTbpCL3HTHlsnEimayge2qrM5etahc8cDGs CerviFZ+ATfvyGpFF9GtPzzkzF6SA5fMR4rkXaXwdGLQ3xu179zrJcs8hZFIbZZYokvC a5TA== X-Gm-Message-State: ABy/qLZG62INuJjovdHNIf6LzMG2fWBNnFSpTrg2YXa8gdAKlEb6dpD9 5b9VzlGnVu/HQVaPqOd5NMo= X-Google-Smtp-Source: APBJJlF/t56hgDUq+8h9Bmj5EzGjFXAKY3GRo1E3Vwz/CStwGqXWnWSfyIzZn5PiGtNQdEgjhjEMaw== X-Received: by 2002:a05:6a20:3d1e:b0:13d:17cc:5bca with SMTP id y30-20020a056a203d1e00b0013d17cc5bcamr8762664pzi.18.1690819521745; Mon, 31 Jul 2023 09:05:21 -0700 (PDT) Received: from [172.31.0.109] ([136.36.130.248]) by smtp.gmail.com with ESMTPSA id u10-20020aa7838a000000b006870814361bsm6413891pfm.114.2023.07.31.09.05.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 31 Jul 2023 09:05:21 -0700 (PDT) Message-ID: <59433d22-ae83-1293-8a88-577aba60b4d5@gmail.com> Date: Mon, 31 Jul 2023 10:05:20 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH] gcse: Extract reg pressure handling into separate file. Content-Language: en-US To: Robin Dapp , gcc-patches References: <805c3845-09e5-7c92-acee-1c4cf5d81a98@gmail.com> From: Jeff Law In-Reply-To: <805c3845-09e5-7c92-acee-1c4cf5d81a98@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.3 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,T_SCC_BODY_TEXT_LINE 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 7/28/23 04:17, Robin Dapp via Gcc-patches wrote: > Hi, > > this patch extracts the hoist-pressure handling from gcse and puts it > into a separate file so it can be used by other passes in the future. > No functional change and I also abstained from c++ifying the code. > The naming with the regpressure_ prefix might be a bit clunky for > now and I'm open to a better scheme. > > Some minor helper functions are added that just encapsulate BB aux > data manipulation. All of this is in preparation for fwprop to > use register pressure data if needed. > > Bootstrapped and regtested on x86, aarch64 and power. > > Regards > Robin > > From 65e69834eeb08ba093786e386ac16797cec4d8a7 Mon Sep 17 00:00:00 2001 > From: Robin Dapp > Date: Mon, 24 Jul 2023 16:25:38 +0200 > Subject: [PATCH] gcse: Extract reg pressure handling into separate file. > > This patch extracts the hoist-pressure handling from gcse into a separate > file so it can be used by other passes in the future. No functional change. > > gcc/ChangeLog: > > * Makefile.in: Add regpressure.o. > * gcse.cc (struct bb_data): Move to regpressure.cc. > (BB_DATA): Ditto. > (get_regno_pressure_class): Ditto. > (get_pressure_class_and_nregs): Ditto. > (record_set_data): Ditto. > (update_bb_reg_pressure): Ditto. > (should_hoist_expr_to_dom): Ditto. > (hoist_code): Ditto. > (change_pressure): Ditto. > (calculate_bb_reg_pressure): Ditto. > (one_code_hoisting_pass): Ditto. > * gcse.h (single_set_gcse): Export single_set_gcse. > * regpressure.cc: New file. > * regpressure.h: New file. OK. Feel free to C++ify if you want now ;-) Having a reasonably well encapculated module to allow us to query register pressure seems like a step forward. jeff