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 8090F3858C54 for ; Mon, 20 Nov 2023 14:50:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8090F3858C54 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8090F3858C54 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700491825; cv=none; b=DCF7OvBevFzOQv91+SqzLNUy1ZN7sP3wYABhWOALsU2YkoZSxKudjBHPaOLfwicLQe+TalSltlJMAbplQTuIcxSvf5/avToYG/b18CsZaVKemsd7tEjZA9LiVp+MKL7mlnC7bb6GyqEkXh+qI5M9bxZfpPCEpDizoyg/s0Oj1/s= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700491825; c=relaxed/simple; bh=64o1HPRyITgJ6nYoetHzUce3GXn8lWZqP+a7i3a5axA=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=gbLXVN4gqpeoXMJ18TirjfUNbfTuf65ZNH33J5SOEJWT2LtXJWi5dkXCSX1ZraFGehzV40ZL9KdgPtEPKhaEx9iY6IqH2lA6xy9zAcrFum+PIzjbfcisP8bIjMXHd98p0HMY4sll6xJCoVo5yMm4RK6B5604XGgBAxRyaECSJw8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700491824; 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=uQiGMBJY61iPdXSCxbOWQY0L8hoj2dBTjAFfv4QtiZg=; b=i/qsxgbAyM3U0YLngREmTydNY210INeAImDGuvwQ/gij1rnyzWvFixCFvGnsNGUI+pwXWN lBbexEPkYYo1J+Oy3UIgpNnIPD5NoIQG9RN7E1CXHijP7ki5YqL+9vzaAVtk5WZBprAYQW yVwRUCtUWjDpcpfWz4/bVKesOHeIiqQ= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-393-wxhjdtyvPjmIw0UEJ6Eh4g-1; Mon, 20 Nov 2023 09:50:22 -0500 X-MC-Unique: wxhjdtyvPjmIw0UEJ6Eh4g-1 Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-67049a2c8b3so30035766d6.0 for ; Mon, 20 Nov 2023 06:50:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700491822; x=1701096622; 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=uQiGMBJY61iPdXSCxbOWQY0L8hoj2dBTjAFfv4QtiZg=; b=eEp6W6TeqM54zPSOpxbEfEns8DjhblDa4UsPh83QdvMXHcAkE9I72TRLAzpdBlig4q /a9epiXMQzf4toU7h7BHpBfdpVwgGPYvwmjmxNYU0AGLxdjvYHwXk6kOsv3xeu7eNAul 9Y/K9NqSDe7JFzmg9rC5LOlqJlhdsndas0hI72mJTnu0oinZjpyjcjGxdwrFAEadWDZk e4CztGWKC5UdMmmfGFj75SfnuW1QaxvxCbyah+gWj0r7Okwo1LaaFZ4ZMgjCQGv0HC/l T3EX4xf2wAQJSovemclR5t6/CgImG2XL+wJRwoVyWztNsLEBTc0lCn09UqIiOjNo+/Zy c4NQ== X-Gm-Message-State: AOJu0YwwWh0OOx/VlAKI+1y6FkE/iv/0ED/G/pFIOn5IvenELJd4HsNF IHOoGsHAczm2SXcejgOjBEzySlA2cue8pKOGXk3Zn/0BdtEmQTZUZCM91e5S3i/YWUymw09aHDp 3wIWk1gtJYbv9lQfZ1g== X-Received: by 2002:a05:6214:1c83:b0:679:2f90:d0b with SMTP id ib3-20020a0562141c8300b006792f900d0bmr7833214qvb.57.1700491822231; Mon, 20 Nov 2023 06:50:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IHPYU288JBRrtQVJHWJy6jB5uRexbo6j7+oTpkkGgeq1umone0IyGObZWRYfsxNwgZgoqJC6Q== X-Received: by 2002:a05:6214:1c83:b0:679:2f90:d0b with SMTP id ib3-20020a0562141c8300b006792f900d0bmr7833199qvb.57.1700491821883; Mon, 20 Nov 2023 06:50:21 -0800 (PST) Received: from ?IPV6:2607:fea8:51dd:2b00::18c7? ([2607:fea8:51dd:2b00::18c7]) by smtp.gmail.com with ESMTPSA id c12-20020a05621401cc00b0067800833e57sm2071008qvt.96.2023.11.20.06.50.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Nov 2023 06:50:21 -0800 (PST) Message-ID: <598544a8-912b-49f2-a993-adf809889ce3@redhat.com> Date: Mon, 20 Nov 2023 09:50:20 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Propagate value ranges of return values To: Jan Hubicka , gcc-patches@gcc.gnu.org References: From: Andrew MacLeod In-Reply-To: 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: 8bit X-Spam-Status: No, score=-6.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_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE 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 11/18/23 20:21, Jan Hubicka wrote: > Hi, > this patch implements very basic propaation of return value ranges from VRP > pass. This helps std::vector's push_back since we work out value range of > allocated block. This propagates only within single translation unit. I hoped > we will also do the propagation at WPA stage, but that needs more work on > ipa-cp side. > > I also added code auto-detecting return_nonnull and corresponding -Wsuggest-attribute > > Variant of this patch bootstrapped/regtested x86_64-linux, testing with > this version is running. I plan to commit the patch at Monday provided > there are no issues. I see no obvious issues with the ranger/vrp changes... My only comment is that execute_ranger_vrp is called 3 times... EVRP,  VRP1 and VRP2.. perhaps more someday.  As long as that is OK with the call to warn_function_returns_nonnull(). Andrew