Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp461444pxa; Wed, 19 Aug 2020 06:25:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxPNLuUyxq/TqYxvCqjckZrRcJz+sZqxETwJYTvnVhx42jfe40jR8KIDy9VZjYizXYY+Vq X-Received: by 2002:a17:906:3c59:: with SMTP id i25mr24290439ejg.202.1597843547056; Wed, 19 Aug 2020 06:25:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597843547; cv=none; d=google.com; s=arc-20160816; b=dKYo6I7uRcKp6XFylcW5mi5mcaZ7ppoBqiJu5w5Rj1XcI+v1UxO7YEl/aRwF7vo+Aw zfMg37fsj1iDtK/6pVyxkN1i/Z78/TMJlL1Qz8BdNs0ewQaJnUhtWinGaPcdg3TzZllz Io8iGeNEHrZYwbt+aQlyRQXn+T7SbSjpwByZlcPZI5Fyhblyh5RR4Aq6gBqIJH7aX6j8 RC6Vwy5OFii2HULhSTP5HJ+onImIjV4jS6xJ7fPjkknPTXr8yjjfqF+FXX8rMkJKO9TF PEwp8D7bN/fQM4fyVUhFMcbyq56Q89eU0xy4kyjcXE0PO7KaX3vP1bKaCUmcWaEk3Shk BTkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:date:from :dkim-signature; bh=ukIFFNEkmWu6RobJHPqTePGGEQuwENadcCDhgJtfzhU=; b=VjQnyEJ04BIhHi+lmhcq3xRRohjnGzfcuHq7aVcfKbsq4meMNXKa9UJe1nHNk/hrl+ kiUtVdM+E2KL8GSWxgkZxtQKkyL/6TsVtT/+WNdyrK82IioVStahp+3giSR+7qPSIoQ9 HP7UsG9s2sENaeFF335+KFRQzsq2+0in+vRNqk1oBGU9harjumB4/n/M3JTebWn86FVe j7Ri2+GQqH6dv6SGQALN2VR3XwH6TvVcpXHa09SK3kRJ+zqfe/TyyeHIOOkffG722wKf Zs+QE0mU2GQ+SmnthspoN04wmaDAsfDkrAjy6NFixb41Yik6c67Hwts0Jd+ZUf6L+9Kb X/5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=j3WFT+H6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b6si14872762edn.454.2020.08.19.06.25.23; Wed, 19 Aug 2020 06:25:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=j3WFT+H6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728523AbgHSNYW (ORCPT + 99 others); Wed, 19 Aug 2020 09:24:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728143AbgHSNQd (ORCPT ); Wed, 19 Aug 2020 09:16:33 -0400 Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7E96C061383 for ; Wed, 19 Aug 2020 06:16:30 -0700 (PDT) Received: by mail-qt1-x843.google.com with SMTP id o22so17653535qtt.13 for ; Wed, 19 Aug 2020 06:16:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:date:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=ukIFFNEkmWu6RobJHPqTePGGEQuwENadcCDhgJtfzhU=; b=j3WFT+H6DJHS7Om7raw3H42KBCXviTCmnvdRJkrbff7AwxiK4dOo8ZsHPWI1xzVbMW z4pnhgnMnJ8YISRBqVhlm6Fk/wjcTedAZUUHsJFLFumXcuCued1IwTvcCU6nAa+KkInI whgvYFJ4LFbKrI8TvpI6x/FTQ2bRQCeQXVO9YNlfAnTuywtuKTj93pJwvcX9pxlFiOCG ymS1/Wl7cjV5j1YrneNJRRE6vRc5sJU77xvKYDZcUvXUjXuALbXkMtk38meji6XYlCl2 MrkbPGeyOBqRP2fAZzk3zv9RpLrqnui89nc8EL6Kj/fKEZw43VrfGnFVh3V7lcuw5QXP wqFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:date:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=ukIFFNEkmWu6RobJHPqTePGGEQuwENadcCDhgJtfzhU=; b=hN204Q4QsIwsb2mALHgwMyl+swkp51QD/NgbO/8JK1FW3+XORX8uEhZkmMu5ILO9X4 OVoXKuN8EBX6VyaigUX1QM+uh9LcxaZUf9dfx/ZGIsgLGICrSjUqXC86mASgobWvB9s5 aVCB5QIVDHcSXincCEt6H7nPMHfBILPrV64mX2Zo32p1eK87uIVIjbnqq/Sk9CXkljfK nFlzppVavDaL5NcD5zNJWoblywYY7Ipo57CZRx7MRiV5kZmNfOlMprLnCDF0se7ji75W Hrc7zTJidSinilDjw6nkdcNl04U2ephnxfQhkTfl9NIAfMJrQ5Y9JLhTWg4UyOopFT8w 1iyw== X-Gm-Message-State: AOAM532Zm6bFqp7H3gq6wydfAysF6gJFoc36T7ZttKkvPIfq+hhOQPK8 krbFIjqzs1N27ENjbbefHjA= X-Received: by 2002:aed:3728:: with SMTP id i37mr22703331qtb.347.1597842989944; Wed, 19 Aug 2020 06:16:29 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id 3sm24856186qkm.117.2020.08.19.06.16.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Aug 2020 06:16:29 -0700 (PDT) From: Arvind Sankar X-Google-Original-From: Arvind Sankar Date: Wed, 19 Aug 2020 09:16:27 -0400 To: Linus Torvalds Cc: Arvind Sankar , Andrew Morton , Nick Desaulniers , Linux Kernel Mailing List , clang-built-linux Subject: Re: [PATCH] lib/string.c: Disable tree-loop-distribute-patterns Message-ID: <20200819131627.GA3779903@rani.riverdale.lan> References: <20200818234307.3382306-1-nivedita@alum.mit.edu> <20200819030442.GA3396810@rani.riverdale.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 18, 2020 at 08:32:58PM -0700, Linus Torvalds wrote: > On Tue, Aug 18, 2020 at 8:04 PM Arvind Sankar wrote: > > > Might be worth optimizing strnlen etc with the word-at-a-time thing though. > > Yeah, possibly. Except the kernel almost never uses strnlen for > anything bigger. At least I haven't seen it very much in the profiles. strscpy could be implemented as strnlen+memcpy. I'd think that wouldn't be much slower, especially if strnlen is optimized and the arch has a good implementation of memcpy?