From patchwork Fri Dec 13 04:18:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Cain X-Patchwork-Id: 13906483 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AA508E7717F for ; Fri, 13 Dec 2024 04:20:36 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tLx8s-0006bw-0d; Thu, 12 Dec 2024 23:19:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tLx8o-0006aH-Lm for qemu-devel@nongnu.org; Thu, 12 Dec 2024 23:19:02 -0500 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tLx8m-000833-Dw for qemu-devel@nongnu.org; Thu, 12 Dec 2024 23:19:02 -0500 Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4BCGPf92002087 for ; Fri, 13 Dec 2024 04:18:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= DHoweVfTbzrWQRyHIi4LJxPyZAf+eqY3mL/Bb9OrBJw=; b=kYwZPMD6YvGR0/8S qL8xuXOSZaTSckwEOg2EC/38dN4iwfTGgSAGpOZTpvM0eGvrv1QOPG5oH/wOdXoA 4Nnn0F53Y6Bwjx3ExBuciwfesQgKCqIMJVEEVitnzOKo05jbuA6qXh+sowHUFU7o qfl9r16j/CzEO+uyy6D7XhrR3jCMP0S4opTExE/mVp5dMoIcQLMsH+Tnr7KtoWCb /Ycg0EHZjPRA0menXZfOPKMmnaNc1q1TXqy7B1m6dzRe0LhNZ5y8QEN1sQ2Yccow +n9mLtsAjgs8jXz+GTKA7UjDLffC57pr2i+CvFJRc6nxwJO9ReItvAWzwwvqTLdT Lv2GLw== Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 43f0r9yfkq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 13 Dec 2024 04:18:59 +0000 (GMT) Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-725e87a142dso1814325b3a.2 for ; Thu, 12 Dec 2024 20:18:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734063538; x=1734668338; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DHoweVfTbzrWQRyHIi4LJxPyZAf+eqY3mL/Bb9OrBJw=; b=oY2LpflJ2rm8e/8TZdjN4LnoXL1UZVvHy2GczjuojJzlIYfcIMpA9frw39kbc7u5Iu TfJImJUjf36quIj9wXzJL/83nhGhTUTKjsHCAxm3ZU37LOW0twc3C5tY+3RkSxP3lACx wrH2xVpkRhERCJGV3B/v/ahTu8/OVPIfWaYmc0LzZHRyYRCKvNC+ZpViJ9VKGwR3tikn IeXYlt1ZsoNpgHCDX63JGlQVCAT2pJ1PEZz3EvY2MwclmgOkHNZbFU+lTxTA2HYvThrW ayy8ZlhEZK8E/EXOGCF3xbiqOF+zhbp8Po5xKho8Wc6M6ogGP3xxE72dbq72wxdouUdY izCA== X-Gm-Message-State: AOJu0YyzXzMQnRh7CQbyGRcopImo+l6f8axsOLIWT8e6PSQ1sCBRTDN9 gEZGm/8HPVSkoQgdzsIO9SZGF0LaSEIkT3WYRz8tSrsxxzh7EurH9kpsWSw0foWxr5me/g4mP2v jmbB0VhzsHNTdBbFxfUvJsIOWDm29ocSqh1bv4VOlw93JG+lYtYJePit1+w47yA== X-Gm-Gg: ASbGncvIlID7PSJ8//WsbayAHpl2jx0KGPjFubwR5zvBVdr+IIqiHSr6kIiccV8PBXZ 9cPQffdTzbsXsMzZmwuNbMyRiqyP/lqsqbRo1vgv5DwOEQwqCkdT8XPBbGWeVWUzN0l68QSddSr W/EhdESM2PosZSrVQUR7pJoSvwOWd/weI+PvBNEylUB9hOO/YeGHOgpkgruw/ES4V8Ur868Wd77 w9p7oHz6Z6YEirx+n9D9oOHdKoKQ/UfoOT1TQ0ABGkDB+A7dwX+dTUeCSWSBkOeA4LQNMMsIkN8 kB/CbwSkErnSbCfbGhq+NdAOtSPCKg== X-Received: by 2002:a05:6a21:3a93:b0:1e1:dbfd:1fde with SMTP id adf61e73a8af0-1e1dfda98bfmr1476680637.27.1734063537922; Thu, 12 Dec 2024 20:18:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IET2cxMqIL6T7hLkKsBFWDnlZWQk6mchyirh1L13fUxxjnihQhsrwxlFmBQGXOm/sokXZCAog== X-Received: by 2002:a05:6a21:3a93:b0:1e1:dbfd:1fde with SMTP id adf61e73a8af0-1e1dfda98bfmr1476659637.27.1734063537587; Thu, 12 Dec 2024 20:18:57 -0800 (PST) Received: from hu-bcain-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-725deac1daasm9451938b3a.171.2024.12.12.20.18.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2024 20:18:57 -0800 (PST) From: Brian Cain To: qemu-devel@nongnu.org Cc: brian.cain@oss.qualcomm.com, philmd@linaro.org, peter.maydell@linaro.org, quic_mathbern@quicinc.com, ale@rev.ng, anjo@rev.ng, quic_mliebel@quicinc.com, ltaylorsimpson@gmail.com, Brian Cain Subject: [PULL 5/5] target/hexagon: Make HVX vector args. restrict * Date: Thu, 12 Dec 2024 20:18:36 -0800 Message-Id: <20241213041836.39986-6-brian.cain@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241213041836.39986-1-brian.cain@oss.qualcomm.com> References: <20241213041836.39986-1-brian.cain@oss.qualcomm.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: x4pHjl_dtBI_dobamB7fKY68phQI-CUC X-Proofpoint-GUID: x4pHjl_dtBI_dobamB7fKY68phQI-CUC X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 phishscore=0 spamscore=0 clxscore=1015 mlxlogscore=702 malwarescore=0 lowpriorityscore=0 mlxscore=0 bulkscore=0 suspectscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2412130030 Received-SPF: pass client-ip=205.220.180.131; envelope-from=brian.cain@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Anton Johansson Adds restrict qualifier to HVX pointer arguments. This will allow the compiler to produce better optimized code, as input vectors are now assumed not to alias, and no runtime aliasing checks will be required. Signed-off-by: Anton Johansson Reviewed-by: Brian Cain Signed-off-by: Brian Cain --- target/hexagon/mmvec/macros.h | 36 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/target/hexagon/mmvec/macros.h b/target/hexagon/mmvec/macros.h index 1ceb9453ee..bcd4a1e897 100644 --- a/target/hexagon/mmvec/macros.h +++ b/target/hexagon/mmvec/macros.h @@ -23,26 +23,26 @@ #include "mmvec/system_ext_mmvec.h" #ifndef QEMU_GENERATE -#define VdV (*(MMVector *)(VdV_void)) -#define VsV (*(MMVector *)(VsV_void)) -#define VuV (*(MMVector *)(VuV_void)) -#define VvV (*(MMVector *)(VvV_void)) -#define VwV (*(MMVector *)(VwV_void)) -#define VxV (*(MMVector *)(VxV_void)) -#define VyV (*(MMVector *)(VyV_void)) +#define VdV (*(MMVector *restrict)(VdV_void)) +#define VsV (*(MMVector *restrict)(VsV_void)) +#define VuV (*(MMVector *restrict)(VuV_void)) +#define VvV (*(MMVector *restrict)(VvV_void)) +#define VwV (*(MMVector *restrict)(VwV_void)) +#define VxV (*(MMVector *restrict)(VxV_void)) +#define VyV (*(MMVector *restrict)(VyV_void)) -#define VddV (*(MMVectorPair *)(VddV_void)) -#define VuuV (*(MMVectorPair *)(VuuV_void)) -#define VvvV (*(MMVectorPair *)(VvvV_void)) -#define VxxV (*(MMVectorPair *)(VxxV_void)) +#define VddV (*(MMVectorPair *restrict)(VddV_void)) +#define VuuV (*(MMVectorPair *restrict)(VuuV_void)) +#define VvvV (*(MMVectorPair *restrict)(VvvV_void)) +#define VxxV (*(MMVectorPair *restrict)(VxxV_void)) -#define QeV (*(MMQReg *)(QeV_void)) -#define QdV (*(MMQReg *)(QdV_void)) -#define QsV (*(MMQReg *)(QsV_void)) -#define QtV (*(MMQReg *)(QtV_void)) -#define QuV (*(MMQReg *)(QuV_void)) -#define QvV (*(MMQReg *)(QvV_void)) -#define QxV (*(MMQReg *)(QxV_void)) +#define QeV (*(MMQReg *restrict)(QeV_void)) +#define QdV (*(MMQReg *restrict)(QdV_void)) +#define QsV (*(MMQReg *restrict)(QsV_void)) +#define QtV (*(MMQReg *restrict)(QtV_void)) +#define QuV (*(MMQReg *restrict)(QuV_void)) +#define QvV (*(MMQReg *restrict)(QvV_void)) +#define QxV (*(MMQReg *restrict)(QxV_void)) #endif #define LOG_VTCM_BYTE(VA, MASK, VAL, IDX) \