OSDN Git Service

* dominance.c (dom_computed, n_bbs_in_dom_tree): Removed.
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 26 Jul 2007 18:06:38 +0000 (18:06 +0000)
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 26 Jul 2007 18:06:38 +0000 (18:06 +0000)
* function.h (dom_computed, n_bbs_in_dom_tree): New macros.
* basic-block.h (struct control_flow_graph): Added x_dom_computed
and x_n_bbs_in_dom_tree fields.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126960 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/basic-block.h
gcc/dominance.c
gcc/function.h

index 7a82b3a..df86462 100644 (file)
@@ -1,3 +1,10 @@
+2007-07-26  Zdenek Dvorak  <dvorakz@suse.cz>
+
+       * dominance.c (dom_computed, n_bbs_in_dom_tree): Removed.
+       * function.h (dom_computed, n_bbs_in_dom_tree): New macros.
+       * basic-block.h (struct control_flow_graph): Added x_dom_computed
+       and x_n_bbs_in_dom_tree fields.
+
 2007-07-26  Steve Ellcey  <sje@cup.hp.com>
 
        PR tree-optimization/32087
index 299df87..f8920b9 100644 (file)
@@ -348,6 +348,15 @@ enum bb_flags
 #define BB_COPY_PARTITION(dstbb, srcbb) \
   BB_SET_PARTITION (dstbb, BB_PARTITION (srcbb))
 
+/* State of dominance information.  */
+
+enum dom_state
+{
+  DOM_NONE,            /* Not computed at all.  */
+  DOM_NO_FAST_QUERY,   /* The data is OK, but the fast query data are not usable.  */
+  DOM_OK               /* Everything is ok.  */
+};
+
 /* A structure to group all the per-function control flow graph data.
    The x_* prefixing is necessary because otherwise references to the
    fields of this struct are interpreted as the defines for backward
@@ -380,6 +389,12 @@ struct control_flow_graph GTY(())
     PROFILE_GUESSED,
     PROFILE_READ
   } x_profile_status;
+
+  /* Whether the dominators and the postdominators are available.  */
+  enum dom_state x_dom_computed[2];
+
+  /* Number of basic blocks in the dominance tree.  */
+  unsigned x_n_bbs_in_dom_tree[2];
 };
 
 /* Defines for accessing the fields of the CFG structure for function FN.  */
@@ -887,13 +902,6 @@ enum cdi_direction
   CDI_POST_DOMINATORS = 2
 };
 
-enum dom_state
-{
-  DOM_NONE,            /* Not computed at all.  */
-  DOM_NO_FAST_QUERY,   /* The data is OK, but the fast query data are not usable.  */
-  DOM_OK               /* Everything is ok.  */
-};
-
 extern enum dom_state dom_info_state (enum cdi_direction);
 extern void set_dom_info_availability (enum cdi_direction, enum dom_state);
 extern bool dom_info_available_p (enum cdi_direction);
index 12f74ff..a67cb37 100644 (file)
@@ -47,9 +47,6 @@
 #include "pointer-set.h"
 #include "graphds.h"
 
-/* Whether the dominators and the postdominators are available.  */
-static enum dom_state dom_computed[2];
-
 /* We name our nodes with integers, beginning with 1.  Zero is reserved for
    'undefined' or 'end of list'.  The name of each node is given by the dfs
    number of the corresponding basic block.  Please note, that we include the
@@ -125,9 +122,6 @@ static void calc_idoms (struct dom_info *, bool);
 void debug_dominance_info (enum cdi_direction);
 void debug_dominance_tree (enum cdi_direction, basic_block);
 
-/* Keeps track of the*/
-static unsigned n_bbs_in_dom_tree[2];
-
 /* Helper macro for allocating and initializing an array,
    for aesthetic reasons.  */
 #define init_ar(var, type, num, content)                       \
index e9eaf1f..7de484c 100644 (file)
@@ -534,6 +534,8 @@ extern int trampolines_created;
 #define nonlocal_goto_handler_labels (cfun->x_nonlocal_goto_handler_labels)
 #define rtl_df (cfun->df)
 #define current_loops (cfun->x_current_loops)
+#define dom_computed (cfun->cfg->x_dom_computed)
+#define n_bbs_in_dom_tree (cfun->cfg->x_n_bbs_in_dom_tree)
 #define VALUE_HISTOGRAMS(fun) (fun)->value_histograms
 
 /* Given a function decl for a containing function,