OSDN Git Service

* combine.c (simplify_shift_const): Calculate rotate count
[pf3gnuchains/gcc-fork.git] / gcc / basic-block.h
index be58227..507fac0 100644 (file)
@@ -135,13 +135,16 @@ typedef struct edge_def {
                                   in profile.c  */
 } *edge;
 
-#define EDGE_FALLTHRU          1
-#define EDGE_ABNORMAL          2
-#define EDGE_ABNORMAL_CALL     4
-#define EDGE_EH                        8
-#define EDGE_FAKE              16
-#define EDGE_DFS_BACK          32
-#define EDGE_CAN_FALLTHRU      64
+#define EDGE_FALLTHRU          1       /* 'Straight line' flow */
+#define EDGE_ABNORMAL          2       /* Strange flow, like computed
+                                          label, or eh */
+#define EDGE_ABNORMAL_CALL     4       /* Call with abnormal exit
+                                          like an exception, or sibcall */
+#define EDGE_EH                        8       /* Exception throw */
+#define EDGE_FAKE              16      /* Not a real edge (profile.c) */
+#define EDGE_DFS_BACK          32      /* A backwards edge */
+#define EDGE_CAN_FALLTHRU      64      /* Candidate for straight line
+                                          flow. */
 
 #define EDGE_COMPLEX   (EDGE_ABNORMAL | EDGE_ABNORMAL_CALL | EDGE_EH)
 
@@ -261,6 +264,12 @@ extern varray_type basic_block_info;
 #define FOR_EACH_BB_REVERSE(BB) \
   FOR_BB_BETWEEN (BB, EXIT_BLOCK_PTR->prev_bb, ENTRY_BLOCK_PTR, prev_bb)
 
+/* Cycles through _all_ basic blocks, even the fake ones (entry and
+   exit block).  */
+
+#define FOR_ALL_BB(BB) \
+  for (BB = ENTRY_BLOCK_PTR; BB; BB = BB->next_bb)
+
 /* What registers are live at the setjmp call.  */
 
 extern regset regs_live_at_setjmp;
@@ -517,6 +526,33 @@ struct loops
   sbitmap shared_headers;
 };
 
+/* Structure to group all of the information to process IF-THEN and
+   IF-THEN-ELSE blocks for the conditional execution support.  This
+   needs to be in a public file in case the IFCVT macros call
+   functions passing the ce_if_block data structure.  */
+
+typedef struct ce_if_block
+{
+  basic_block test_bb;                 /* First test block.  */
+  basic_block then_bb;                 /* THEN block.  */
+  basic_block else_bb;                 /* ELSE block or NULL.  */
+  basic_block join_bb;                 /* Join THEN/ELSE blocks.  */
+  basic_block last_test_bb;            /* Last bb to hold && or || tests.  */
+  int num_multiple_test_blocks;                /* # of && and || basic blocks.  */
+  int num_and_and_blocks;              /* # of && blocks.  */
+  int num_or_or_blocks;                        /* # of || blocks.  */
+  int num_multiple_test_insns;         /* # of insns in && and || blocks.  */
+  int and_and_p;                       /* Complex test is &&.  */
+  int num_then_insns;                  /* # of insns in THEN block.  */
+  int num_else_insns;                  /* # of insns in ELSE block.  */
+  int pass;                            /* Pass number.  */
+
+#ifdef IFCVT_EXTRA_FIELDS
+  IFCVT_EXTRA_FIELDS                   /* Any machine dependent fields.  */
+#endif
+
+} ce_if_block_t;
+
 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 *));