Commit 5d6a16e2 by Michael Hayes Committed by Michael Hayes

basic-block.h (LOOP_TREE, [...]): New.

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.

From-SVN: r36333
parent c586192c
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.
2000-09-12 Michael Hayes <mhayes@cygnus.com>
* basic-block.h (split_block, update_bb_for_insn): New prototypes.
* flow.c (split_block, update_bb_for_insn): New functions.
......
......@@ -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));
......
......@@ -3211,7 +3211,7 @@ rest_of_compilation (decl)
/* Discover and record the loop depth at the head of each basic
block. The loop infrastructure does the real job for us. */
flow_loops_find (&loops);
flow_loops_find (&loops, LOOP_TREE);
/* Estimate using heuristics if no profiling info is available. */
estimate_probability (&loops);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment