diff options
author | Richard Biener <rguenther@suse.de> | 2018-08-24 11:17:16 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2018-08-24 11:17:16 +0000 |
commit | e144a2b3066ecad2a7c934b1cd437d2afad0018f (patch) | |
tree | 1bf53ff1e85aa724075fc8e89e510ebad078c63e /gcc/cfgloop.c | |
parent | 6a84c265a32e6f407cf6712040df65527ffcf445 (diff) | |
download | gcc-e144a2b3066ecad2a7c934b1cd437d2afad0018f.zip gcc-e144a2b3066ecad2a7c934b1cd437d2afad0018f.tar.gz gcc-e144a2b3066ecad2a7c934b1cd437d2afad0018f.tar.bz2 |
cfg.h (struct control_flow_graph): Add edge_flags_allocated and bb_flags_allocated members.
2018-08-24 Richard Biener <rguenther@suse.de>
* cfg.h (struct control_flow_graph): Add edge_flags_allocated and
bb_flags_allocated members.
(auto_flag): New RAII class for allocating flags.
(auto_edge_flag): New RAII class for allocating edge flags.
(auto_bb_flag): New RAII class for allocating bb flags.
* cfgloop.c (verify_loop_structure): Allocate temporary edge
flag dynamically.
* cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
in favor of temporarily allocated BB flag.
* hsa-brig.c: Re-order includes.
* hsa-dump.c: Likewise.
* hsa-regalloc.c: Likewise.
* print-rtl.c: Likewise.
* profile-count.c: Likewise.
From-SVN: r263830
Diffstat (limited to 'gcc/cfgloop.c')
-rw-r--r-- | gcc/cfgloop.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/cfgloop.c b/gcc/cfgloop.c index e27cd39..0917b71 100644 --- a/gcc/cfgloop.c +++ b/gcc/cfgloop.c @@ -1539,6 +1539,7 @@ verify_loop_structure (void) /* Check irreducible loops. */ if (loops_state_satisfies_p (LOOPS_HAVE_MARKED_IRREDUCIBLE_REGIONS)) { + auto_edge_flag saved_irr_mask (cfun); /* Record old info. */ auto_sbitmap irreds (last_basic_block_for_fn (cfun)); FOR_EACH_BB_FN (bb, cfun) @@ -1550,7 +1551,7 @@ verify_loop_structure (void) bitmap_clear_bit (irreds, bb->index); FOR_EACH_EDGE (e, ei, bb->succs) if (e->flags & EDGE_IRREDUCIBLE_LOOP) - e->flags |= EDGE_ALL_FLAGS + 1; + e->flags |= saved_irr_mask; } /* Recount it. */ @@ -1576,20 +1577,20 @@ verify_loop_structure (void) FOR_EACH_EDGE (e, ei, bb->succs) { if ((e->flags & EDGE_IRREDUCIBLE_LOOP) - && !(e->flags & (EDGE_ALL_FLAGS + 1))) + && !(e->flags & saved_irr_mask)) { error ("edge from %d to %d should be marked irreducible", e->src->index, e->dest->index); err = 1; } else if (!(e->flags & EDGE_IRREDUCIBLE_LOOP) - && (e->flags & (EDGE_ALL_FLAGS + 1))) + && (e->flags & saved_irr_mask)) { error ("edge from %d to %d should not be marked irreducible", e->src->index, e->dest->index); err = 1; } - e->flags &= ~(EDGE_ALL_FLAGS + 1); + e->flags &= ~saved_irr_mask; } } } |