aboutsummaryrefslogtreecommitdiff
path: root/gcc/basic-block.h
diff options
context:
space:
mode:
authorJason Eckhardt <jle@gcc.gnu.org>2000-01-29 01:41:22 +0000
committerJason Eckhardt <jle@gcc.gnu.org>2000-01-29 01:41:22 +0000
commit65169dcfc24eafed52ff13e27421848aa8a6e44a (patch)
treeb7e53416e72be71ecc8ff02e5544a3d4f9199174 /gcc/basic-block.h
parent72af8e4e63da81d09ed612c5024c3aadfe1cd077 (diff)
downloadgcc-65169dcfc24eafed52ff13e27421848aa8a6e44a.zip
gcc-65169dcfc24eafed52ff13e27421848aa8a6e44a.tar.gz
gcc-65169dcfc24eafed52ff13e27421848aa8a6e44a.tar.bz2
[multiple changes]
Fri Jan 7 19:48:04 CET 2000 Jan Hubicka <jh@suse.cz> * 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 <m.hayes@elec.canterbury.ac.nz> * 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 <jle@cygnus.com> * 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
Diffstat (limited to 'gcc/basic-block.h')
-rw-r--r--gcc/basic-block.h10
1 files changed, 10 insertions, 0 deletions
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