diff options
author | m.hayes <m.hayes@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-09-11 21:42:07 +0000 |
---|---|---|
committer | m.hayes <m.hayes@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-09-11 21:42:07 +0000 |
commit | 0ed5c69752e2efeb7ca9ec5fa6ff7df9c2fcd079 (patch) | |
tree | ede055ecb879705a2129bef0497f0e7af7b14b3b /gcc/basic-block.h | |
parent | b7bef13254bfa17fdbd7a766c2d13820d0c3f2e2 (diff) | |
download | gcc-0ed5c69752e2efeb7ca9ec5fa6ff7df9c2fcd079.tar.gz |
2000-09-12 Michael Hayes <mhayes@cygnus.com>
* basic-block.h (LOOP_TREE, LOOP_PRE_HEADER, LOOP_EDGES): New.
(LOOP_EXITS_DOMS, LOOP_ALL): Likewise.
(flow_loops_update): New prototype.
(flow_loops_find): Add flags to prototype.
(struct loop): Add `pre_header_root' and `pre_header_trace' fields.
* flow.c (flow_loop_pre_header_scan): New.
(flow_loop_dump): Dump pre-header root and trace and exit dominators.
(flow_loop_free): Free pre-header root and trace and exit dominators.
(flow_loops_find): New argument flags.
(flow_loops_update): New function.
* toplev.c (rest_of_compilation): Add flag argument to flow_loops_find.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36333 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/basic-block.h')
-rw-r--r-- | gcc/basic-block.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/gcc/basic-block.h b/gcc/basic-block.h index 79e3c5e97fd..b04352fc8ea 100644 --- a/gcc/basic-block.h +++ b/gcc/basic-block.h @@ -276,6 +276,12 @@ struct loop /* Basic block of loop pre-header or NULL if it does not exist. */ basic_block pre_header; + /* Root node of pre_header extended basic block. */ + basic_block pre_header_root; + + /* Bitmap of blocks of trace from pre_header root to pre_header. */ + sbitmap pre_header_trace; + /* The first block in the loop. This is not necessarily the same as the loop header. */ basic_block first; @@ -302,6 +308,9 @@ struct loop /* Number of edges that exit the loop. */ int num_exits; + /* Bitmap of blocks that dominate all exits of the loop. */ + sbitmap exits_doms; + /* The loop nesting depth. */ int depth; @@ -404,7 +413,8 @@ struct loops sbitmap shared_headers; }; -extern int flow_loops_find PARAMS ((struct loops *)); +extern int flow_loops_find PARAMS ((struct loops *, int flags)); +extern int flow_loops_update PARAMS ((struct loops *, int flags)); extern void flow_loops_free PARAMS ((struct loops *)); extern void flow_loops_dump PARAMS ((const struct loops *, FILE *, void (*)(const struct loop *, @@ -468,6 +478,15 @@ enum update_life_extent #define PROP_AUTOINC 32 /* Create autoinc mem references. */ #define PROP_FINAL 63 /* All of the above. */ + +/* Flags for loop discovery. */ + +#define LOOP_TREE 1 /* Build loop hierarchy tree. */ +#define LOOP_PRE_HEADER 2 /* Analyse loop pre-header. */ +#define LOOP_EDGES 4 /* Find entry and exit edges. */ +#define LOOP_EXITS_DOMS 8 /* Find nodes that dom. all exits. */ +#define LOOP_ALL 15 /* All of the above */ + extern void life_analysis PARAMS ((rtx, FILE *, int)); extern void update_life_info PARAMS ((sbitmap, enum update_life_extent, int)); |