From 65169dcfc24eafed52ff13e27421848aa8a6e44a Mon Sep 17 00:00:00 2001 From: Jason Eckhardt Date: Sat, 29 Jan 2000 01:41:22 +0000 Subject: [multiple changes] Fri Jan 7 19:48:04 CET 2000 Jan Hubicka * sbitmap.c (sbitmap_first_set_bit, sbitmap_last_set_bit): New function. * sbitmap.h (sbitmap_first_set_bit, sbitmap_last_set_bit): Declare. * basic_block.h (FLOW_LOOP_FIRST_BLOCK): New macro. (FLOW_LOOP_LAST_BLOCK): Likewise. 2000-01-21 Michael Hayes * basic-block.h (struct loop): New fields 'first' and 'last'. * flow.c (flow_loops_find): Compute loop->first and loop->last. (flow_loops_dump): Use loop->first to check for NOTE_INSN_LOOP_BEG and loop->last to check for NOTE_INSN_LOOP_END. Fri Jan 28 10:57:58 2000 Jason Eckhardt * predict.c (estimate_probability): Use the new FIRST and LAST fields of the loop descriptor rather than HEADER and LATCH. Also added missing break statements as well making some coding style modifications as suggested by Michael Hayes. From-SVN: r31679 --- gcc/basic-block.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gcc/basic-block.h') diff --git a/gcc/basic-block.h b/gcc/basic-block.h index a4e970d..57fb2a7f 100644 --- a/gcc/basic-block.h +++ b/gcc/basic-block.h @@ -239,6 +239,14 @@ struct loop /* Basic block of loop pre-header or NULL if it does not exist. */ basic_block pre_header; + /* The first block in the loop. This is not necessarily the same as + the loop header. */ + basic_block first; + + /* The last block in the loop. This is not necessarily the same as + the loop latch. */ + basic_block last; + /* Bitmap of blocks contained within the loop. */ sbitmap nodes; @@ -318,6 +326,8 @@ struct loop int exit_count; }; +#define FLOW_LOOP_FIRST_BLOCK(loop) sbitmap_first_set_bit ((loop).nodes) +#define FLOW_LOOP_LAST_BLOCK(loop) sbitmap_last_set_bit ((loop).nodes) /* Structure to hold CFG information about natural loops within a function. */ struct loops -- cgit v1.1