From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by sourceware.org (Postfix) with ESMTPS id 9AEE03858D39 for ; Wed, 31 Aug 2022 16:00:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9AEE03858D39 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-x432.google.com with SMTP id 145so14492830pfw.4 for ; Wed, 31 Aug 2022 09:00:48 -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; bh=/ZlJTB9/2laAXUUnHEqJMmgfmpS9G2QGv10DQFEzuV4=; b=Savvzh9qtipFtdRJBKKvosrxVUDyVz9IZZGb35TIQooc9PiWVUWlZNO6xCdpNq1gow b3ZFU52H0q5ql4Cz8Qn2C6suOZcoWOdxhGtKWq/lA7MEatYANQRGIZQtqFw5snRtGtPe V6z3V7JKeGV7fxVbf3I7hyZH6S+/A/Tw3HpdxHBMtovaw1vmNXGgU/oUg/X7N9PlIqM9 Y1MKlA1SAwxeCMDzEJUsNaYRyUvljv1EJBlseCehnMRCbIEazTJ40UplZBWyOhDvxTW6 evKGat48lppRfhGngJC7lJlGda7UJEX4b76EEj6UI5w+F88wXoZBaAUZwToQkZdIlf5b 9gdA== 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; bh=/ZlJTB9/2laAXUUnHEqJMmgfmpS9G2QGv10DQFEzuV4=; b=ow3GxQr9X722mfhrzMNW44xpQ+BT5zJ/iIbTg2w1h+Ns6ZPvQ1HEhm36MKwkAy6a3r RygGdHKNyF1YwLWIsjtyqwbxB3V2OXBfwF0t9FPfzytj9ehyWhJO+b9l6UGArlJRqriJ dXB4Am/rlTPuZjFbczSHLQQQgicVOiuVkXU04r1C816ndnHr+LNYIfN7tPsJnq+TRTGV X9bsNATyJVhOistnYH1zZzQpxZUd7STIrbTMg98uYDcG8v/Mv0E6bLE1k1UC8AgsdO76 9wsOKw5cngeWHMdQby9XIiFHqhtCP2MhK20u+3BsxcaQd2Zb30JS2bloPJs2OduMt7yW F00A== X-Gm-Message-State: ACgBeo0LGWohwNysX+ZHSrSbm86ozOhSGkVrif+CsBniLRWkSh9K68Bv b/P60RqfVTJbpvNgPbCHZvO7rfgsp40= X-Google-Smtp-Source: AA6agR7b7XRpD6WlNqKqQ8fyuqIg/aoqKeOxptc18Ny2YcfdoJHD10U+D7vKL9nsq/qcSGEDKRHCyA== X-Received: by 2002:a05:6a00:2316:b0:538:6966:80e4 with SMTP id h22-20020a056a00231600b00538696680e4mr11770866pfh.11.1661961646856; Wed, 31 Aug 2022 09:00:46 -0700 (PDT) Received: from [172.31.0.204] (c-73-98-188-51.hsd1.ut.comcast.net. [73.98.188.51]) by smtp.gmail.com with ESMTPSA id pg16-20020a17090b1e1000b001f559e00473sm1489342pjb.43.2022.08.31.09.00.45 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 31 Aug 2022 09:00:46 -0700 (PDT) Message-ID: <321ee62b-3256-c01c-7a27-46dcae41039b@gmail.com> Date: Wed, 31 Aug 2022 10:00:45 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH] Support bitmap_copy across representations Content-Language: en-US To: gcc-patches@gcc.gnu.org References: <20220817111127.E7BC13858C83@sourceware.org> From: Jeff Law In-Reply-To: <20220817111127.E7BC13858C83@sourceware.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 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 8/17/2022 5:11 AM, Richard Biener via Gcc-patches wrote: > The following started as making the backward threader m_imports > use the tree representation. Since that interfaces to a list > representation bitmap in ranger by copying rewriting the tree > to list to perform the copy is inefficient in that it loses > balancing. The following adds bitmap_copy_tree_to_list and > integrates it with the generic bitmap_copy routine. For symmetry > I also added list to tree copy, relying on auto-balancing, and > tree to tree copy which I didn't optimize to preserve the > source balancing but instead use bitmap_copy_tree_to_list and > have the result auto-balanced again. > > I've only exercised the tree to list path and I won't actually > end up using it but it's at least worth posting. > > Bootstrapped and tested on x86_64-unknown-linux-gnu. > > Worth pushing? > > * bitmap.h: Document set_copy aka bitmap_copy as usable > for tree representation. > * bitmap.cc (bitmap_copy_tree_to_list): New helper. > (bitmap_copy): Support copying all bitmap representation > combinations. I'd lean against unless you expect to be using it.   But it's not a strongly held opinion. jeff