]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/ddg.h
sh.c: Do not include algorithm.
[thirdparty/gcc.git] / gcc / ddg.h
index 4f7fa4e6110b2ab0858096fb1571da203a4564ee..27e247d9aba6e2b22cc4a5c4df3c8d7ffaccbb61 100644 (file)
--- a/gcc/ddg.h
+++ b/gcc/ddg.h
@@ -1,13 +1,12 @@
 /* DDG - Data Dependence Graph - interface.
-   Copyright (C) 2004
-   Free Software Foundation, Inc.
+   Copyright (C) 2004-2014 Free Software Foundation, Inc.
    Contributed by Ayal Zaks and Mustafa Hagog <zaks,mustafa@il.ibm.com>
 
 This file is part of GCC.
 
 GCC is free software; you can redistribute it and/or modify it under
 the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
+Software Foundation; either version 3, or (at your option) any later
 version.
 
 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
@@ -16,29 +15,22 @@ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 for more details.
 
 You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING.  If not, write to the Free
-Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
-02110-1301, USA.  */
+along with GCC; see the file COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
 
 #ifndef GCC_DDG_H
 #define GCC_DDG_H
 
 /* For sbitmap.  */
-#include "sbitmap.h"
-/* For basic_block.  */
-#include "basic-block.h"
-/* For struct df.  */
-#include "df.h"
+
 typedef struct ddg_node *ddg_node_ptr;
 typedef struct ddg_edge *ddg_edge_ptr;
 typedef struct ddg *ddg_ptr;
 typedef struct ddg_scc *ddg_scc_ptr;
 typedef struct ddg_all_sccs *ddg_all_sccs_ptr;
 
-typedef enum {TRUE_DEP, OUTPUT_DEP, ANTI_DEP} dep_type;
-typedef enum {REG_OR_MEM_DEP, REG_DEP, MEM_DEP, REG_AND_MEM_DEP}
-            dep_data_type;
+enum dep_type {TRUE_DEP, OUTPUT_DEP, ANTI_DEP};
+enum dep_data_type {REG_OR_MEM_DEP, REG_DEP, MEM_DEP, REG_AND_MEM_DEP};
 
 /* The following two macros enables direct access to the successors and
    predecessors bitmaps held in each ddg_node.  Do not make changes to
@@ -55,13 +47,13 @@ struct ddg_node
   int cuid;
 
   /* The insn represented by the node.  */
-  rtx insn;
+  rtx_insn *insn;
 
   /* A note preceding INSN (or INSN itself), such that all insns linked
      from FIRST_NOTE until INSN (inclusive of both) are moved together
      when reordering the insns.  This takes care of notes that should
      continue to precede INSN.  */
-  rtx first_note;
+  rtx_insn *first_note;
 
   /* Incoming and outgoing dependency edges.  */
   ddg_edge_ptr in;
@@ -123,6 +115,9 @@ struct ddg
   int num_loads;
   int num_stores;
 
+  /* Number of debug instructions in the BB.  */
+  int num_debug;
+
   /* This array holds the nodes in the graph; it is indexed by the node
      cuid, which follows the order of the instructions in the BB.  */
   ddg_node_ptr nodes;
@@ -136,8 +131,8 @@ struct ddg
   int closing_branch_deps;
 
   /* Array and number of backarcs (edges with distance > 0) in the DDG.  */
-  ddg_edge_ptr *backarcs;
   int num_backarcs;
+  ddg_edge_ptr *backarcs;
 };
 
 \f
@@ -166,14 +161,15 @@ struct ddg_all_sccs
 };
 
 \f
-ddg_ptr create_ddg (basic_block, struct df *, int closing_branch_deps);
+ddg_ptr create_ddg (basic_block, int closing_branch_deps);
 void free_ddg (ddg_ptr);
 
 void print_ddg (FILE *, ddg_ptr);
 void vcg_print_ddg (FILE *, ddg_ptr);
 void print_ddg_edge (FILE *, ddg_edge_ptr);
+void print_sccs (FILE *, ddg_all_sccs_ptr, ddg_ptr);
 
-ddg_node_ptr get_node_of_insn (ddg_ptr, rtx);
+ddg_node_ptr get_node_of_insn (ddg_ptr, rtx_insn *);
 
 void find_successors (sbitmap result, ddg_ptr, sbitmap);
 void find_predecessors (sbitmap result, ddg_ptr, sbitmap);
@@ -184,4 +180,6 @@ void free_ddg_all_sccs (ddg_all_sccs_ptr);
 int find_nodes_on_paths (sbitmap result, ddg_ptr, sbitmap from, sbitmap to);
 int longest_simple_path (ddg_ptr, int from, int to, sbitmap via);
 
+bool autoinc_var_is_used_p (rtx_insn *, rtx_insn *);
+
 #endif /* GCC_DDG_H */