public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] mode-switching: Use 1-based edge aux fields
@ 2023-11-21 4:11 Jeff Law
0 siblings, 0 replies; only message in thread
From: Jeff Law @ 2023-11-21 4:11 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:b8fc4df2ffae7489957d87b9dd1efd09302c1db0
commit b8fc4df2ffae7489957d87b9dd1efd09302c1db0
Author: Richard Sandiford <richard.sandiford@arm.com>
Date: Sat Nov 11 17:28:59 2023 +0000
mode-switching: Use 1-based edge aux fields
The pass used the edge aux field to record which mode change
should happen on the edge, with -1 meaning "none". It's more
convenient for later patches to leave aux zero for "none",
and use numbers based at 1 to record a change.
gcc/
* mode-switching.cc (commit_mode_sets): Use 1-based edge aux values.
(cherry picked from commit 718228a6f479fe252e0e6f71933c2465b7b480a9)
Diff:
---
gcc/mode-switching.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gcc/mode-switching.cc b/gcc/mode-switching.cc
index 7a5c4993d65..6b5661131e3 100644
--- a/gcc/mode-switching.cc
+++ b/gcc/mode-switching.cc
@@ -106,10 +106,10 @@ commit_mode_sets (struct edge_list *edge_list, int e, struct bb_info *info)
for (int ed = NUM_EDGES (edge_list) - 1; ed >= 0; ed--)
{
edge eg = INDEX_EDGE (edge_list, ed);
- int mode;
- if ((mode = (int)(intptr_t)(eg->aux)) != -1)
+ if (eg->aux)
{
+ int mode = (int) (intptr_t) eg->aux - 1;
HARD_REG_SET live_at_edge;
basic_block src_bb = eg->src;
int cur_mode = info[src_bb->index].mode_out;
@@ -728,14 +728,14 @@ optimize_mode_switching (void)
{
edge eg = INDEX_EDGE (edge_list, ed);
- eg->aux = (void *)(intptr_t)-1;
+ eg->aux = (void *) (intptr_t) 0;
for (i = 0; i < no_mode; i++)
{
int m = targetm.mode_switching.priority (entity_map[j], i);
if (mode_bit_p (insert[ed], j, m))
{
- eg->aux = (void *)(intptr_t)m;
+ eg->aux = (void *) (intptr_t) (m + 1);
break;
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-11-21 4:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-21 4:11 [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] mode-switching: Use 1-based edge aux fields Jeff Law
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).