[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 5/5] target/hexagon: Make HVX vector args. restrict *
From: |
Brian Cain |
Subject: |
[PULL 5/5] target/hexagon: Make HVX vector args. restrict * |
Date: |
Thu, 12 Dec 2024 20:18:36 -0800 |
From: Anton Johansson <anjo@rev.ng>
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>
Signed-off-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.34.1
- [PULL 0/5] hex queue, Brian Cain, 2024/12/12
- [PULL 3/5] target/hexagon: add enums for event, cause, Brian Cain, 2024/12/12
- [PULL 1/5] Hexagon (target/hexagon) Remove HEX_DEBUG/HEX_DEBUG_LOG, Brian Cain, 2024/12/12
- [PULL 5/5] target/hexagon: Make HVX vector args. restrict *,
Brian Cain <=
- [PULL 2/5] target/hexagon: rename HEX_EXCP_*=>HEX_CAUSE_*, Brian Cain, 2024/12/12
- [PULL 4/5] target/hexagon: Use argparse in all python scripts, Brian Cain, 2024/12/12
- Re: [PULL 0/5] hex queue, Brian Cain, 2024/12/14
- Re: [PULL 0/5] hex queue, Stefan Hajnoczi, 2024/12/16