[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] target/hexagon: Make HVX vector args. restrict *
From: |
Anton Johansson |
Subject: |
[PATCH 2/2] target/hexagon: Make HVX vector args. restrict * |
Date: |
Fri, 6 Dec 2024 17:01:03 +0100 |
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 <anjo@rev.ng>
Reviewed-by: Brian Cain <brian.cain@oss.qualcomm.com>
---
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) \
--
2.45.2