From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by sourceware.org (Postfix) with ESMTPS id 590CE3858D1E for ; Tue, 30 Apr 2024 19:15:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 590CE3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 590CE3858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::333 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714504541; cv=none; b=oVUsVMcvBMHcZsXJOf2rHo25vEX4y5kaydzD00Sw0XDMNXj6yIWtCR0bV5x/I1O1y+9BTSh2V9NwPlbZ9pGaMJeHy3xM/dREpUPJNQy86mvAR7yDWhXKr07zaT7GjGi0Px4Mx6XYLqALAVgJbx4L3ZfjA+JDJ7CaIFdmuxGTbPg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714504541; c=relaxed/simple; bh=zSKwQ2Uu13FPglGeba+qtR6FzLeMRDlsemTv5n9BFOk=; h=DKIM-Signature:From:Mime-Version:Subject:Date:Message-Id:To; b=ap6tVWxhxE4LjwttopoKhp/xFhr56knZAaLeZvrgnq7Bt+08SsJzNWAmULqgBquUNTyvLeAvV+uVSgsAnmJxi/KWFXD/Ur+/vWUj6Ib8T9wdQk3CjjApijJprOG14Vwqd2X81cnu8USE7Ke+yzdGWl2IvMCiQGq2EuxEogCZWW8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-41bab13ca4eso30507185e9.1 for ; Tue, 30 Apr 2024 12:15:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714504538; x=1715109338; darn=gcc.gnu.org; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:from:to:cc:subject:date:message-id :reply-to; bh=TH5KH/WSJ6pnPGMeNgofSP2hMd+ZFBiU2S5IjDwJgJM=; b=EmkT+t9OJJAM2n8uv9WA+bf33s7w1814eNB42Kh1cV3kzlVW0/+e1k1xRQPJMyng70 jIoEYRKJ5/IbAg8EqyQgL2k6Jxc4afyh9ikuSPCg5gj5SdnHMLNSBb3091xeJQkMCmFn DbgH0O6Ki/rBBaS/1TI4gVHsJWOKgzukMpcj9pCmto83N9imWhn2Do/lBiO5xbs8lABt JQS06aDr45UGSfTUA936uEUx960PVkZR76Se8mSkwBi6F3ktD2la4mr/XpzllJg10DMb 8arhJHHwhyANa0aSMuVPN+WxE6IIZbXY5oPfWiKGxjF306VWlm/18K4AXsFAqJzLIxG7 8Q9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714504538; x=1715109338; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TH5KH/WSJ6pnPGMeNgofSP2hMd+ZFBiU2S5IjDwJgJM=; b=IVOxHNKGbn0IhgT1sf062i2FF6KREq7tiP1PNfEC0VSpLExXnwqIzmkkzc7rhy377W j95rYDUi0qTeUiF+SqdBAGYzgNlsIaetHhBFtvLy9TKA0a06OVlff6MW3y5NVC3gMXtO W7cepUMOE4LcKhe5oGvkw4cokVs7B7sCB4/4E6zycKrni1YAmNQ98tNZomfMHYYM1noo f0kxAwTg+eoV5pecEdU4bpIhztLv3r6izd3W1uFsRjFmwaEhPHOgTffr7vEUGyFcNoao kG/ok92yvhdD52iP97mcSgRyJeo1pme1d5obwKK8cAlS2PKHK2Y9Jf9xy0wwtySofvi+ DzDw== X-Forwarded-Encrypted: i=1; AJvYcCUrMH9+LgdiyjgqyLHR6vmp1hJ2hgKqq2kZ1A+mJjWXBPur3c6BO9egHteWGp5f8fvkqODZ55X34HnRMM9HiLA= X-Gm-Message-State: AOJu0YxBOZzyI2D4739QYjrg5t6pvN7kTJ5yIHrMzg00ojqQmZHe0Nru +1txPT5UAlGc6U+pHDz6Racd9jY57tk3xishZWdDtD/3WxM78NOS X-Google-Smtp-Source: AGHT+IF9cidXnXh7xmg4ukzCInJ0rQ2/+g9t1joM0kbAwiwsabF9bMr+8OEElj6CGXys8FoDaluiyA== X-Received: by 2002:a05:600c:580d:b0:41b:ebf6:87d7 with SMTP id jz13-20020a05600c580d00b0041bebf687d7mr314091wmb.9.1714504537603; Tue, 30 Apr 2024 12:15:37 -0700 (PDT) Received: from smtpclient.apple (dynamic-077-002-117-129.77.2.pool.telefonica.de. [77.2.117.129]) by smtp.gmail.com with ESMTPSA id h13-20020a05600c314d00b0041ac4aafd3dsm27594678wmo.12.2024.04.30.12.15.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Apr 2024 12:15:36 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Richard Biener Mime-Version: 1.0 (1.0) Subject: Re: 1.76% performance loss in VRP due to inlining Date: Tue, 30 Apr 2024 21:15:25 +0200 Message-Id: <179E65E4-33E7-45F1-A7B3-755CA434D037@gmail.com> References: Cc: Aldy Hernandez , GCC Mailing List , "MacLeod, Andrew" In-Reply-To: To: Jason Merrill X-Mailer: iPhone Mail (21E236) X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: > Am 30.04.2024 um 21:11 schrieb Jason Merrill via Gcc : >=20 > =EF=BB=BFOn Fri, Apr 26, 2024 at 5:44=E2=80=AFAM Aldy Hernandez via Gcc wrote: >>=20 >> 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. > ... >> +static irange_bitmask >> +get_bitmask_from_range (tree type, >> + const wide_int &min, const wide_int &max) > ... >> -irange_bitmask >> -irange::get_bitmask_from_range () const >=20 > My guess is that this is the relevant change: the old function has > external linkage, and is therefore interposable, which inhibits > inlining. The new function has internal linkage, which allows > inlining. >=20 > Relatedly, I wonder if we want to build GCC with -fno-semantic-interpositi= on? I guess that=E2=80=99s a good idea, though it=E2=80=99s already implied when= doing LTO bootstrap and building cc1 and friends? (But not for libgccjit?)= Richard=20 >=20 > Jason >=20