public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/ARM/heads/morello)] Put braces around MOVE_RATIO aarch64 macro
@ 2023-09-11 17:25 Matthew Malcomson
0 siblings, 0 replies; only message in thread
From: Matthew Malcomson @ 2023-09-11 17:25 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:c74351eb79ab309a10c6d61ac5fe800e0cb479c3
commit c74351eb79ab309a10c6d61ac5fe800e0cb479c3
Author: Matthew Malcomson <matthew.malcomson@arm.com>
Date: Mon Sep 11 16:17:45 2023 +0100
Put braces around MOVE_RATIO aarch64 macro
We had earlier made our MOVE_RATIO macro return zero for MORELLO
targets. This is so we can disable the move-by-pieces infrastructure
on memory which could contain capabilities. Block moving of data which
could contain capabilities needs to avoid invalidating said
capabilities, and we have not adjusted this infrastructure to do so.
The macro we had was not parenthesised. While adding some loop
optimisations to the compiler with capabilities I noticed that the
testcase new17.C was failing. It turns out that this was because this
MOVE_RATIO macro was interacting with surrounding code in
`estimate_num_insns` in an unintended manner. With added braces around
the macro the test now passes for capabilities.
Diff:
---
gcc/config/aarch64/aarch64.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h
index 635f1cc0eca9..cb68286036c6 100644
--- a/gcc/config/aarch64/aarch64.h
+++ b/gcc/config/aarch64/aarch64.h
@@ -1126,8 +1126,8 @@ typedef struct
targeting -mstrict-align, so keep a sensible default in that case.
Disable this for ccapability-enabled architectures to avoid invalidating a
capability due to a move_by_pieces operation. */
-#define MOVE_RATIO(speed) TARGET_MORELLO ? 0 : \
- (!STRICT_ALIGNMENT ? 2 : (((speed) ? 15 : AARCH64_CALL_RATIO) / 2))
+#define MOVE_RATIO(speed) (TARGET_MORELLO ? 0 : \
+ (!STRICT_ALIGNMENT ? 2 : (((speed) ? 15 : AARCH64_CALL_RATIO) / 2)))
/* For CLEAR_RATIO, when optimizing for size, give a better estimate
of the length of a memset call, but use the default otherwise. */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-09-11 17:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-11 17:25 [gcc(refs/vendors/ARM/heads/morello)] Put braces around MOVE_RATIO aarch64 macro Matthew Malcomson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).