From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by sourceware.org (Postfix) with ESMTPS id B818338582A1 for ; Wed, 23 Nov 2022 00:37:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B818338582A1 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-pj1-x1034.google.com with SMTP id q96-20020a17090a1b6900b00218b8f9035cso435149pjq.5 for ; Tue, 22 Nov 2022 16:37:24 -0800 (PST) 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:subject:date:message-id:reply-to; bh=rTLK5X/d45LNhaozgcHm8b9F8xivA/sfyuuI8eMz49U=; b=ASew1GVxD+hXfu4VtRPLDaAcaJbAvOZrcdGVKs5KDYWdki33Kc2oImXkyfyhvM+XES jXYvZyDUtepNGJpfIh1P1YtpNKMzvZkvZqES/mADwuVXPXoAl38mZHjU0Sf/tzn/08Gk XBH28oo/WScDd+R5Cj9jcumfIgrnVhp7aBV8A7RMkwFvHxzcp2GgIqIiSWvE/JBQLcRJ oCI15NkJ3F69xfBgqh7u+GNsjN3dYpvf6Pra4o06khTKWMhtOHry1uzVzC+OXzjfTKDt 1W85VrvrY0MzdrRIbQJapqwgf6HiKXrATK+Jd50hgXLmkPCr35GniEMdBk7sVMX+Y7ej LJ0w== 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:subject:date:message-id:reply-to; bh=rTLK5X/d45LNhaozgcHm8b9F8xivA/sfyuuI8eMz49U=; b=hBbvlojC3eds6HK43pkAbDyefNRhEhNxOyWjrHMR7t+uMKbZwl4o2+KmUCaGOWOhO1 kB61WSg6uOYr+eKF94BQKNg6VmG3jl7L2sleupRbTIwWhJMabxb38kupbr+fHXjIqmiL crYx9oBSqu2xdhRF6A7FPWMd0SasGWsdlm+WV4caDsaWSsiICaslKpdSdjjRfSVeGb0u /yVxXPhjdPWMd78/d4ypSBEXsh2BMJg1TJK9fnHPxXz0ywg65h3W8hSDCbJ+7iQD7MT7 5ggo6PhEG1b6mxL1moCeTlVI8v3uvFmlkv7lEKim/+n3gPnvqZyCrBuW1Y9rGKXem3yS 6Svw== X-Gm-Message-State: ANoB5pkMNB4ImSKTcJfgygUuDQcKRGQHSMv/0qOL7/FV+oL9lZRSF91O c/OPpfNTcv1NECFxYbWoc80= X-Google-Smtp-Source: AA0mqf6MrszLoxkTop7nmRg/Vynp3iVOz2Da46428QRymJbDWHICLUz538on8x8bIRX+GUQQjXk6hg== X-Received: by 2002:a17:90a:4e41:b0:218:a971:d847 with SMTP id t1-20020a17090a4e4100b00218a971d847mr14108569pjl.91.1669163843592; Tue, 22 Nov 2022 16:37:23 -0800 (PST) Received: from ?IPV6:2601:681:8600:13d0::99f? ([2601:681:8600:13d0::99f]) by smtp.gmail.com with ESMTPSA id ij27-20020a170902ab5b00b001885d15e3c1sm12617227plb.26.2022.11.22.16.37.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Nov 2022 16:37:22 -0800 (PST) Message-ID: <25d9b95d-06c0-adf0-01cf-2156523b819b@gmail.com> Date: Tue, 22 Nov 2022 17:37:21 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH][RFC] Unify MAX_NUM_CHAINS and MAX_CHAIN_LEN to --param uninit-max-predicate-size Content-Language: en-US To: Richard Biener , gcc-patches@gcc.gnu.org References: <20220905132513.C7928139C7@imap2.suse-dmz.suse.de> From: Jeff Law In-Reply-To: <20220905132513.C7928139C7@imap2.suse-dmz.suse.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.7 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 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 9/5/22 07:25, Richard Biener via Gcc-patches wrote: > The following exposes the MAX_NUM_CHAINS and MAX_CHAIN_LEN to the user > by adding a --param uninit-max-predicate-size and re-doing the > limits on the whole predicate expression size rather than limiting > the number of OR and AND elements separately. The following goes > a step further and for a single AND chain allows an arbitrary size, > limiting that only with the computational --param > uninit-control-dep-attempts parameter. That might be a bit high > in practice, but it seems odd to continue searching for smaller and > smaller paths until we exhaust the search space or > uninit-control-dep-attempts. > > I'm testing this on x86_64-unknown-linux-gnu at the moment. > > Any comments? > > Thanks, > Richard. > > * params.opt (uninit-max-predicate-size): New. > * doc/invoke.texi (--param uninit-max-predicate-size): Document. > * gimple-predicate-analysis.h > (predicate::init_from_control_deps): Adjust. > * gimple-predicate-analysis.cc (MAX_NUM_CHAINS, MAX_CHAIN_LEN): > Remove. > (format_edge_vecs): Adjust. > (simple_control_dep_chain): Do not limit. > (compute_control_dep_chain): Adjust limiting to the overall > predicate expression size _after_ adding an element to the > vector of AND chains. > (predicate::init_from_control_deps): Adjust. > (uninit_analysis::init_use_preds): Likewise. > (uninit_analysis::init_from_phi_def): Likewise. I think we probably have too many knobs already, though magic numbers are even worse.  I suspect we (gcc develoeprs) will be the biggest user of this if we go forward.  Essentially given a testcase we can crank up the limits to see if the test is hitting limits or exposing a deeper problem. So based on removal of the magic #s, it looks good to me. jeff