diff options
author | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-04 01:09:12 +0000 |
---|---|---|
committer | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-04 01:09:12 +0000 |
commit | f24ec26f1cabb4f55cdb4370f35b67807df8fb7a (patch) | |
tree | 798273ffece1ba2938c3938e1c16af800a086eee /gcc/cfgloop.h | |
parent | e45bbad21b8f3590c89cc7193eaac430b547328f (diff) | |
download | gcc-f24ec26f1cabb4f55cdb4370f35b67807df8fb7a.tar.gz |
* tree-ssa-threadupdate.c (thread_through_all_blocks): Use loops' state
accessor functions.
* cfgloopmanip.c (remove_path, create_preheaders,
force_single_succ_latches, fix_loop_structure): Ditto.
* tree-ssa-loop-manip.c (rewrite_into_loop_closed_ssa,
tree_duplicate_loop_to_header_edge): Ditto.
* cfgloopanal.c (mark_irreducible_loops): Ditto.
* loop-init.c (loop_optimizer_init, loop_optimizer_finalize):
Ditto.
* tree-cfgcleanup.c (cleanup_tree_cfg_noloop, repair_loop_structures,
cleanup_tree_cfg): Ditto.
* tree-cfg.c (tree_merge_blocks): Ditto.
* cfgloop.c (rescan_loop_exit, record_loop_exits,
release_recorded_exits, get_loop_exit_edges, verify_loop_structure,
loop_preheader_edge, single_exit): Ditto.
(flow_loops_find): Do not clear loops->state.
* cfgloop.h (loops_state_satisfies_p, loops_state_set,
loops_state_clear): New functions.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127197 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgloop.h')
-rw-r--r-- | gcc/cfgloop.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h index 903672dfcf9..791dabf3989 100644 --- a/gcc/cfgloop.h +++ b/gcc/cfgloop.h @@ -451,6 +451,33 @@ number_of_loops (void) return VEC_length (loop_p, current_loops->larray); } +/* Returns true if state of the loops satisfies all properties + described by FLAGS. */ + +static inline bool +loops_state_satisfies_p (unsigned flags) +{ + return (current_loops->state & flags) == flags; +} + +/* Sets FLAGS to the loops state. */ + +static inline void +loops_state_set (unsigned flags) +{ + current_loops->state |= flags; +} + +/* Clears FLAGS from the loops state. */ + +static inline void +loops_state_clear (unsigned flags) +{ + if (!current_loops) + return; + current_loops->state &= ~flags; +} + /* Loop iterators. */ /* Flags for loop iteration. */ |