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 713463851A95 for ; Thu, 20 Oct 2022 08:23:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 713463851A95 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=1666254190; 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=f05WRYJ8VOgfXZtI8GFohMyms2Leb7N18YXNiV8ugRI=; b=JIl7lApXPpQCNz4C9KE/OV+65j3QRH5cxyGAcnPuwQjKNcw8pK4kLeRKCGGqU8V9Rommlw i/oM7568kVIKgsiZa05WKYpLcFYeVzRqeMz19ZDcznXpzdYQIpaeP8eyEiJ50ci7MArQOK qQPU4QQxo3a4gdPi3ANfj3KQ3BHfwqE= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-443-h5M7SjGZOf6bUBz9SvTSpQ-1; Thu, 20 Oct 2022 04:23:07 -0400 X-MC-Unique: h5M7SjGZOf6bUBz9SvTSpQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 721063C0E20A; Thu, 20 Oct 2022 08:23:07 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.193.252]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 34B3540CA41E; Thu, 20 Oct 2022 08:23:05 +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 29K8N17E1615311 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 20 Oct 2022 10:23:02 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 29K8N0ma1615310; Thu, 20 Oct 2022 10:23:00 +0200 Date: Thu, 20 Oct 2022 10:22:59 +0200 From: Jakub Jelinek To: Andrew MacLeod Cc: gcc-patches , "hernandez, aldy" , Jan Hubicka , Richard Biener Subject: Re: [COMMITTED] PR c++/106654 - Add assume support to VRP. Message-ID: Reply-To: Jakub Jelinek References: <8601499b-9b56-5ecd-4838-b9fbd120b043@redhat.com> MIME-Version: 1.0 In-Reply-To: <8601499b-9b56-5ecd-4838-b9fbd120b043@redhat.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 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=-4.2 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: On Wed, Oct 19, 2022 at 08:37:57PM -0400, Andrew MacLeod wrote: > This patch adds basic support for ASSUME functions to VRP. > > Based on the previous set of patches, Ive cleaned them up, and this provides > the basic support from rangers generalized model. It does not support > non-ssa name parameters, I think you might be on your own for that. > > I modified Jakubs assumption pass to use GORI to query parameter rangers in > assumption functions and set the global range for those, and then ranger's > infer infrastructure is used to inject these rangers at assume call > locations in VRP. > > I also added an optimization testcase that tests the basic functionality in > VRP2.  For instance it can reduce: > > int > f2 (int x, int y, int z) > { >   [[assume (x+12 == 14 && y >= 0 && y + 10 < 13 && z + 4 >= 4 && z - 2 < > 18)]]; >   unsigned q = x + y + z; >   if (q*2 > 46) >     return 0; >   return 1; > } > > to: > > return 1; > > > Its good to get us going, bt I think theres still lots of room for > improvement. > > Bootstraps on x86_64-pc-linux-gnu with no regressions.  Pushed. Thanks. Jakub