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.129.124]) by sourceware.org (Postfix) with ESMTPS id EFEE0385020D for ; Wed, 12 Oct 2022 14:39:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EFEE0385020D 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=1665585559; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SFh7WOuq7BKHLFZrf65+Nal1sC5G3p04/GXSbpLa7Vc=; b=g7LZkYfgAPUxbrVHLhJziuiK1U7F81F7Zh+wfXlh5s2EJHabN8X52LTGobOj/jhsqe1Zup M7wzklaDCD1u8qQBrn6mL4dCUIhBpxEcsQ3GFsh+5sbmhJF7TFkIOW5eUreiIUWTL1Objy nwb/LHA8ZjCyVp6iOsvXxDV8DN+o7AI= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-581-7E_QO0w4MyaK8W2JnObgfw-1; Wed, 12 Oct 2022 10:39:16 -0400 X-MC-Unique: 7E_QO0w4MyaK8W2JnObgfw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0EA04959743; Wed, 12 Oct 2022 14:39:16 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.55]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BF749218013E; Wed, 12 Oct 2022 14:39:15 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 29CEdCu2860653 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 12 Oct 2022 16:39:13 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 29CEdBAN860651; Wed, 12 Oct 2022 16:39:11 +0200 Date: Wed, 12 Oct 2022 16:39:11 +0200 From: Jakub Jelinek To: Andrew MacLeod Cc: Richard Biener , Jan Hubicka , Aldy Hernandez , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] middle-end IFN_ASSUME support [PR106654] Message-ID: Reply-To: Jakub Jelinek References: <244e087a-8680-9c21-0774-c7b6621e2eda@redhat.com> <144534bb-c25e-5303-47e5-cf56beb98261@redhat.com> MIME-Version: 1.0 In-Reply-To: <144534bb-c25e-5303-47e5-cf56beb98261@redhat.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=WINDOWS-1252 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,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: On Wed, Oct 12, 2022 at 10:31:00AM -0400, Andrew MacLeod wrote: > I presume you are looking to get this working for this release, making the > priority high? :-) Yes. So that we can claim we actually support C++23 Portable Assumptions and OpenMP assume directive's hold clauses for something non-trivial so people won't be afraid to actually use it. Of course, first the posted patch needs to be reviewed and only once it gets in, the ranger/GORI part can follow. As the latter is only an optimization, it can be done incrementally. > Intersection I believe...?  I think the value from the assume's should add > restrictions to the range.. Sure, sorry. > I figured as much, I was just wondering if there might be some way to > "simplify" certain things by processing it and turning each parameter query > into a smaller function returning the range we determined from the main > one...   but perhaps that is more complicated. We don't really know what the condition is, it can be pretty arbitrary expression (well, e.g. for C++ conditional expression, so say [[assume (var = foo ())]]; is not valid but [[assume ((var = foo ()))]]; is. And with GNU statement expressions it can do a lot of stuff and until we e.g. inline into it and optimize it a little, we don't really know what it will be like. Jakub