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 EB42A3858D3C for ; Thu, 25 May 2023 08:00:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EB42A3858D3C 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=1685001634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=r9NBTRrhjHJzpIZz5+xQwg/4w1J+Y28VQfECTPLn5r8=; b=XG9tHwsUfMYZnXdt4JropWoNWLlt09f0KDFppM6N15Im73rr2FIT6ylAf5ffbzNz3mBR3i Vj3vC22X5Yp+cbJZNFElfruxGj3TX5bnZ/6oXJg5/BPAOhQydMXAWUjTqvDyscH3+1Rb8f gPrJ7uo+jkL5dlLAVtvYJol7bn+map4= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-170-yM82Z7x1NN2zAMy8IJe28A-1; Thu, 25 May 2023 04:00:33 -0400 X-MC-Unique: yM82Z7x1NN2zAMy8IJe28A-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-3f60911a417so1145635e9.2 for ; Thu, 25 May 2023 01:00:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685001632; x=1687593632; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=r9NBTRrhjHJzpIZz5+xQwg/4w1J+Y28VQfECTPLn5r8=; b=Tetc0zjCC31dCjgdkY1rs/oYVbNfD4/Zy/OhtgSFovSPyr5jv4aQ4yl7kAEzwXmBc6 mjlfa6PsyUsXGTJeexvwDdVjoyatyhYKvqYBvYHVdIeXKLFggWejI6g3Bkd0dMOtJj7J RJndA9ZvH8AU/95OqRiol8iot0+ieRr4EOgqqhsLBjt3TkwgRfbNvZqbrcpCACqC9x5H i3vctCZ8WifaTSfvjPS0cX1FLppNZ+PVbseOxb4CPCs0d+jIDrS/FmrG6T76W6pNhxOK BVBfW5gAJ0tUgQ+NzDwF2yI/y2AO39Z38VY+eUJNhapPs3ntp80E00L2dif0rnnDP5nM 9d0g== X-Gm-Message-State: AC+VfDwAaNJ8S7XRAl2V7GVbA2+lsST9a0+Dng6//JLzNzyM31O5bPUO 8LdSMkYiCaBm7KZ7TXmagrPglLRhAGIhiv8pB3QEmfCgEUXxJCFOXi0bddbpabjLUjuOTlVqze0 S71C2+azNP1ANoFiGCQ== X-Received: by 2002:a1c:7706:0:b0:3f6:6c0:7c9b with SMTP id t6-20020a1c7706000000b003f606c07c9bmr1538717wmi.15.1685001631764; Thu, 25 May 2023 01:00:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4JWYL0KJUGdFJ2iHognNgDr8T4UrK7IOQ+s8goZ5DkPmPxVvo2yQIjwFhL1ePZ8v+TDYUK1w== X-Received: by 2002:a1c:7706:0:b0:3f6:6c0:7c9b with SMTP id t6-20020a1c7706000000b003f606c07c9bmr1538688wmi.15.1685001631411; Thu, 25 May 2023 01:00:31 -0700 (PDT) Received: from [192.168.1.201] ([139.47.42.170]) by smtp.gmail.com with ESMTPSA id i1-20020a05600c354100b003f61177faffsm7681279wmq.0.2023.05.25.01.00.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 May 2023 01:00:31 -0700 (PDT) Message-ID: <401f35cd-a0e2-33ee-520e-b721500cb021@redhat.com> Date: Thu, 25 May 2023 10:00:30 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [COMMITTED 4/4] - Gimple range PHI analyzer and testcases To: Andrew MacLeod , gcc-patches References: <6a24c0bf-aa0d-5e13-6852-705605db15ec@redhat.com> From: Aldy Hernandez In-Reply-To: <6a24c0bf-aa0d-5e13-6852-705605db15ec@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,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 List-Id: Some minor nits. > +// There can be only one running at a time. > +static phi_analyzer *phi_analysis_object = NULL; Shouldn't this be phi_analyzer_object to be more consistent? Similarly throughout. > +// Create a new phi_group with members BM, initialvalue INIT_VAL, modifier > +// statement MOD, and resolve values using query Q. > +// Calculate the range for the gropup if possible, otherwise set it to > +// VARYING. > + > +phi_group::phi_group (bitmap bm, tree init_val, edge e, gimple *mod, > + range_query *q) Could you document what this edge refers to? > + // we dont expect a modifer and no inital value, so trap to have a look. > + // perhaps they are dead cycles and we can just used UNDEFINED. "We don't"... "Perhaps..." s/used/use > +// Return 0 if S is not a modifier statment for group members BM. > +// If it could be a modifier, return which operand position (1 or 2) > +// the phi member occurs in. > +unsigned > +phi_group::is_modifier_p (gimple *s, const bitmap bm) "not" a modifier? Or *is* a modifier? s/statment/statement > + // Look at the modifier for any relation Missing final period. > + for (unsigned x = 0; x< 10; x++) Space before "<" > + // Never converged, so bail for now. we could examine the pattern > + // from m_initial to m_vr as an extension Especially if we had a way > + // to project the actual number of iterations (SCEV?) s/we/We/ s/extension Especially/extension, especially/ > +// IF the modifier statement has a relation K between the modifier and the s/IF/If/ > + // If the type wraps, then relations dont tell us much. s/dont/don't/ > +// m_tab.safe_grow_cleared (num_ssa_names + 100); why is this commented out? > + // Other non-ssa names that arent constants are not understood s/arent/aren't/ > + // Try to create a group based on m_current. If a result comes back Two spaces after period. > + // If this dpoesn;t form a group, all members are instead simple phis. doesn't > +// their arguemnts contain nothing but other PHI defintions, with at most arguments definitions > +// These are the APIs to start and stop a phi analyzerin a SCEV like manner. analyzer Thanks for working on this. Aldy