aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2021-09-24 10:13:45 +0200
committerRichard Biener <rguenther@suse.de>2021-09-24 10:16:19 +0200
commit710c6ab4ad502cddc8bdf82c95f580fa94fbf9fb (patch)
tree6dae116ed180f703d381fff70db938a62d5251cb /gcc
parent204f56aa65d2496e9f7db86c4aa37d42a336fc5b (diff)
downloadgcc-710c6ab4ad502cddc8bdf82c95f580fa94fbf9fb.zip
gcc-710c6ab4ad502cddc8bdf82c95f580fa94fbf9fb.tar.gz
gcc-710c6ab4ad502cddc8bdf82c95f580fa94fbf9fb.tar.bz2
Verify unallocated edge/BB flags are clear
This adds verification that unused auto_{edge,bb}_flag are not remaining set but correctly cleared by consumers. The intent is that those flags can be cheaply used on a smaller IL region and thus afterwards clearing can be restricted to the same small region as well. 2021-09-24 Richard Biener <rguenther@suse.de> * cfghooks.c (verify_flow_info): Verify unallocated BB and edge flags are not set.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cfghooks.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/cfghooks.c b/gcc/cfghooks.c
index 50b9b17..6446e16 100644
--- a/gcc/cfghooks.c
+++ b/gcc/cfghooks.c
@@ -161,6 +161,12 @@ verify_flow_info (void)
err = 1;
}
+ if (bb->flags & ~cfun->cfg->bb_flags_allocated)
+ {
+ error ("verify_flow_info: unallocated flag set on BB %d", bb->index);
+ err = 1;
+ }
+
FOR_EACH_EDGE (e, ei, bb->succs)
{
if (last_visited [e->dest->index] == bb)
@@ -202,6 +208,13 @@ verify_flow_info (void)
err = 1;
}
+ if (e->flags & ~cfun->cfg->edge_flags_allocated)
+ {
+ error ("verify_flow_info: unallocated edge flag set on %d -> %d",
+ e->src->index, e->dest->index);
+ err = 1;
+ }
+
edge_checksum[e->dest->index] += (size_t) e;
}
if (n_fallthru > 1)