From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id E0A7E3858410 for ; Tue, 1 Nov 2022 16:33:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E0A7E3858410 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667320406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YdqDgTVVo1HcIBRAcS1Kr6I/jGKXXPKfDDszByict2Y=; b=HsJqtWCK3YccTwnyX7RT09qdDDAZ+xBqqlBm2Gc+AELoQxHnOrfErOwV+VtqgJA9lGE9oN 8Jr+rvSUUQBK/UBSKZvN2PiEOrynnUiu1hoCkZFcox6RA9R43UzMZRyL9IOg0eGKD9TSu+ HhqmdwBK4RDkSZ4U0Op35UbooPzj8Oc= Received: from mail-yb1-f200.google.com (mail-yb1-f200.google.com [209.85.219.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-80-qhUMh2UQMZyTqH-5xTvnYQ-1; Tue, 01 Nov 2022 12:33:25 -0400 X-MC-Unique: qhUMh2UQMZyTqH-5xTvnYQ-1 Received: by mail-yb1-f200.google.com with SMTP id f126-20020a255184000000b006cb2aebd124so13521204ybb.11 for ; Tue, 01 Nov 2022 09:33:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YdqDgTVVo1HcIBRAcS1Kr6I/jGKXXPKfDDszByict2Y=; b=krj+S/5xr5hdLB8emWW2BnX/6qnLeiZK1eRiK3K9YXdXnE2bpM0VgseMxeWicC2oUd +UUWxvN0ZSqnmYieIIQvgxWXDDsVm8+xHHwCrUJaADktGgeVr+jkeGBVGkhyda+7OEZN f/outQkR1rw/o3GMWdj0AnfZen1IEXec8BnEWBU0ehvQnm8rQW24IiwbfX2Cjsa+Mchs udiOMB+ZBzMqdc2U6c4cDOmuOPHPjcYRNCDWry2gxdvWZTMeqmPeXmR7QYjYEJbhkeWo kDn5Om3tPJOmjVEi7XLK2rcUF3/STlnVvOcSDPfrjAfQlkZhKDRPdrV5w+cYOHAWCCmQ E7ZA== X-Gm-Message-State: ACrzQf36GZFJ0jJZVTs4dblmiri5ZJEO5PIHP865ZGfAQ8E311m81qxY x87XAv46Em9RV5I+e4rWi/wUboxVkQ/JG+qwb5FH/TTabNGkbrGYuL19NnoZQISX3M83ByZI/BU sz7fX9e3IFzKepP3zuCzqLQvbo2rW8z+pOg== X-Received: by 2002:a81:1086:0:b0:36f:ce5a:982 with SMTP id 128-20020a811086000000b0036fce5a0982mr19598055ywq.158.1667320404880; Tue, 01 Nov 2022 09:33:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7uVpoauIzo55p9U520jm7UFsMzYpVsCk5//v92Fj2Qe9KLECR3WcI6c81NIymczEICAH7wASv9RV081vkbMVg= X-Received: by 2002:a81:1086:0:b0:36f:ce5a:982 with SMTP id 128-20020a811086000000b0036fce5a0982mr19598035ywq.158.1667320404649; Tue, 01 Nov 2022 09:33:24 -0700 (PDT) MIME-Version: 1.0 References: <20221021131426.308205-1-aldyh@redhat.com> <20221021164533.GW25951@gate.crashing.org> <20221021180029.GY25951@gate.crashing.org> In-Reply-To: <20221021180029.GY25951@gate.crashing.org> From: Aldy Hernandez Date: Tue, 1 Nov 2022 17:33:13 +0100 Message-ID: Subject: Re: [PATCH] Rename nonzero_bits to known_zero_bits. To: Segher Boessenkool Cc: Jakub Jelinek , GCC patches , "MacLeod, Andrew" , Richard Biener X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,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: Folks. I have decided to put this aside until the next release. I originally wanted a simple rename, and reimplementing things to align with rtl, etc, is beyond what I want to tackle on this late. I'll archive this away, and revisit it when we implement the irange::known_ones mask. Thanks for your input. Aldy On Fri, Oct 21, 2022 at 8:01 PM Segher Boessenkool wrote: > > On Fri, Oct 21, 2022 at 06:54:32PM +0200, Jakub Jelinek wrote: > > On Fri, Oct 21, 2022 at 06:51:19PM +0200, Jakub Jelinek wrote: > > > Agreed. > > > > > > I think maybe_nonzero_bits would be fine. > > > > Or yet another option is to change what we track and instead of > > having just one bitmask have 2 as tree-ssa-ccp.cc does, > > one bitmask says which bits are known to be always the same > > and the other which specifies the values of those bits. > > "For X with a CONSTANT lattice value X & ~mask == value & ~mask. The > > zero bits in the mask cover constant values. The ones mean no > > information." > > I am still working on making the RTL nonzero_bits use DF (and indeed I > do a known_zero instead :-) ). This makes the special version in > combine unnecessary: instead of working better than the generic version > it is strictly weaker then. This change then makes it possible to use > nonzero_bits in instruction conditions (without causing ICEs as now -- > passes after combine return a subset of the nonzero_bits the version in > combine does, which can make insns no longer match in later passes). > > My fear is tracking twice as many bits might become expensive. OTOH > ideally we can get rid of combine's reg_stat completely at some point > in the future (which has all the same problems as combine's version of > nonzero_bits: the values it returns depend on the order combine tried > possible combinations). > > Storage requirements are the same for known_zero_bits and known_one_bits > vs. known_bits and known_bit_values, but the latter is a bit more > costly to compute, but more importantly it is usually a lot less > convenient in use. (A third option is known_bits and known_zero_bits?) > > > Segher >