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.133.124]) by sourceware.org (Postfix) with ESMTPS id 25E39385E83A for ; Tue, 30 Apr 2024 08:21:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 25E39385E83A 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 25E39385E83A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714465290; cv=none; b=npSaMYXeYvZqz7c4eSEEmCvOIpkKmZ44DcLV2UjRXdo8KZ3TKfrIw5129q/h54uem+QEWy6KII4aP0hfBDZVWbrrDSyx8EUTEr/ZaRo7wsTyOpJ1aEaVBEV+tp7wKXI3IW8YrcCW9b1MEq8sMMwSaWyOWMKfsQwBKdjhqeCMzfk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714465290; c=relaxed/simple; bh=8D23pF4FdO/EzE/9Qaa0q82EhQJllF29aqbeLJSUfY4=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=BnYw7S19IhpVyEpXl7ogYp72DINjWS9pnPdP7xvwPTQvXnRAVppV0c4yu1zPJD4PKFVQCGvBONK9zNLozs/nhAFrdV+4bNtNhjzM7yzD3z7NLfSt5hgPACidhEfI2l7xl+IbG/HTTjKZolyJxg5o4BlqBN/aRctNBEmNUYVth7Y= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714465286; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7mVc5kZO/Ll9D/7DGlWgRcHPyiLYQB7VjYvJMZNSl84=; b=B0dThuQe9fSKrOzRJ3Cnme/LDvFEjhhtU/tFKpbk/p8bM9VTjhq6i7OQpHMQLdhzP06UUC iG+SBE+6imiSlfA8oiWWdHdGOcMxwBQK/c9m7W4XH6t3Al1rj0r/pdo+1ubiNHvsgHp5du +VQZzY8zwKP/HKcd1tRSSkrGfcuJAX8= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-584-99ijFph_MWKXSbpgYRe22g-1; Tue, 30 Apr 2024 04:21:24 -0400 X-MC-Unique: 99ijFph_MWKXSbpgYRe22g-1 Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-5723fc9eda3so3133397a12.1 for ; Tue, 30 Apr 2024 01:21:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714465284; x=1715070084; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7mVc5kZO/Ll9D/7DGlWgRcHPyiLYQB7VjYvJMZNSl84=; b=lpsUeIt3dKDefQJTE/CiidKO3Px5MIhS7HmXEo94GNeBDjd+5a+2xTQYNvCLKQZnhZ duOiPewGRFdFgA06dMr/WxixzEg/WYoo9aH5mByjxnmEfmB86t7+S/OptJMocbSfzfcc 7UV1XpXe0i3C2xi8evYFn9w3/HwGrqU4n8kei6wVvJ0flDEfpRRK9lccc0b9hnK5UNmv klITy6bLr4sMh443QKprX9srDBBl4wSqA9DWSf7YaaSWLoYn6ijs4VfKfr8mpbhOb97V xKxzY5yWKV9M4HIBWNBl9Fi367h9Huvg5MJ1/0MVS85vRTm3tDLH7mc1VILeZLuDIr9i osMQ== X-Gm-Message-State: AOJu0YwKqhn1gWh0Xcz8i8d9AmpMAAFheVx94W2lDeuolFy8tjw2N5tf /Bld8tODOujRI+ZAqw+Z0zyP7kH4WLlZbAyfdlxd44DyAwpLoeDyLH8HhZwgP7pqUi2fDcDoUJr zgu0eML8jqUS8Rnw48r7b7reqMts2c5DO4ElhM7RJ+MQTiFQeJ/ybuTa08bWf2dgMjuZ+/jedo2 4Yfoj4FWzWKBplUPHUsv8= X-Received: by 2002:a05:6402:3136:b0:572:9503:4f8c with SMTP id dd22-20020a056402313600b0057295034f8cmr1080432edb.34.1714465283836; Tue, 30 Apr 2024 01:21:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE48NOapkBUL9SJFuhpMbuCYluzoxH2fVvORXE+nwylA+b+U92uAoqDuCk1MsdFal1RcypUGjlx9uokFMjlUiY= X-Received: by 2002:a05:6402:3136:b0:572:9503:4f8c with SMTP id dd22-20020a056402313600b0057295034f8cmr1080423edb.34.1714465283479; Tue, 30 Apr 2024 01:21:23 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Aldy Hernandez Date: Tue, 30 Apr 2024 10:21:12 +0200 Message-ID: Subject: Re: 1.76% performance loss in VRP due to inlining To: Richard Biener Cc: GCC Mailing List , "MacLeod, Andrew" X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-6.1 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 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 Tue, Apr 30, 2024 at 9:58=E2=80=AFAM Richard Biener wrote: > > On Fri, Apr 26, 2024 at 11:45=E2=80=AFAM Aldy Hernandez via Gcc wrote: > > > > Hi folks! > > > > In implementing prange (pointer ranges), I have found a 1.74% slowdown > > in VRP, even without any code path actually using the code. I have > > tracked this down to irange::get_bitmask() being compiled differently > > with and without the bare bones patch. With the patch, > > irange::get_bitmask() has a lot of code inlined into it, particularly > > get_bitmask_from_range() and consequently the wide_int_storage code. > > > > I don't know whether this is expected behavior, and if it is, how to > > mitigate it. I have tried declaring get_bitmask_from_range() inline, > > but that didn't help. OTOH, using __attribute__((always_inline)) > > helps a bit, but not entirely. What does help is inlining > > irange::get_bitmask() entirely, but that seems like a big hammer. > > You can use -Winline to see why we don't inline an inline declared > function. I would guess the unit-growth limit kicks in? Ah, will do. Thanks. > > Did you check a release checking compiler? That might still > inline things. Yes, we only measure performance with release builds. Aldy