From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nikam.ms.mff.cuni.cz (nikam.ms.mff.cuni.cz [195.113.20.16]) by sourceware.org (Postfix) with ESMTPS id D1BBE38533FC for ; Mon, 12 Dec 2022 21:54:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D1BBE38533FC Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=ucw.cz Authentication-Results: sourceware.org; spf=none smtp.mailfrom=kam.mff.cuni.cz Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id B6F2528088F; Mon, 12 Dec 2022 22:54:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucw.cz; s=gen1; t=1670882074; 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=eolmVjMfWO95SdFiU1LrV3lOLvPhtR2z7ZfrD6UJEPA=; b=Yre2Ch9owAHJJIbSnT6SEow+QxRXQ5tsQavI7rp2G/5bKmJNQ4RNR0LXTZbb/mpRd9O7B8 10t2aqpmll6qDL3r5VTFTWV6duWhP7EcfWGkOaUEyWzXEeU63KBganDqLrjF7P4gLSeq6v JGZO6S6hcFodgrLzsebGIHudaOcmgIA= Date: Mon, 12 Dec 2022 22:54:34 +0100 From: Jan Hubicka To: Martin Jambor Cc: GCC Patches Subject: Re: [PATCH 7/9] ipa-sra: Forward propagation of sizes which are safe to dereference Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP 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: > gcc/ChangeLog: > > 2022-11-11 Martin Jambor > > * ipa-sra.cc (isra_param_desc): New fields safe_size, > conditionally_dereferenceable and safe_size_set. > (struct gensum_param_desc): New field conditionally_dereferenceable. > (struct isra_param_flow): Updated comment of field unit_size. > (ipa_sra_function_summaries::duplicate): Copy the new fields. > (isra_call_summary::dump): Dump unit_size when representing safe_size. > (dump_gensum_param_descriptor): Dump new flag. > (dump_isra_param_descriptor): Dump new fields. > (isra_analyze_call): Fill unit_size when it represents known safe > size. > (check_gensum_access): Instead of disqualifying pointers which are not > always dereference, mark them as conditionally dereferencable if loads > are frequent enough. > (process_scan_results): Copy the conditionally_dereferenceable flag. > (isra_write_node_summary): Stream new fields, or assert they are not > initialized yet. > (isra_read_node_info): Stream new fields. > (update_safe_size): New function. > (propagate_param_hints_accross_call): Propagate safe_sizes. > (propagate_hints_to_all_callees): New function. > (adjust_parameter_descriptions): Check conditionally_dereferenceable > candidates, rework dumping. > (ipa_sra_analysis): Move most of hint propagation for one node to > propagate_hints_to_all_callees. Add another loop to stabilize within > SCCs and another one to verify. > > gcc/testsuite/ChangeLog: > > 2022-11-11 Martin Jambor > > * gcc.dg/ipa/ipa-sra-26.c: New test. > * gcc.dg/ipa/ipa-sra-27.c: Likewise. > * gcc.dg/ipa/ipa-sra-28.c: Likewise. OK, thanks! Honza