tree-cfg.h: Rename from tree-flow.h.
authorAndrew Macleod <amacleod@gcc.gnu.org>
Fri, 18 Oct 2013 12:39:34 +0000 (12:39 +0000)
committerAndrew Macleod <amacleod@gcc.gnu.org>
Fri, 18 Oct 2013 12:39:34 +0000 (12:39 +0000)
* tree-cfg.h: Rename from tree-flow.h.  Remove #includes.
* tree-ssa.h: Relocate required #includes from tree-cfg.h.
* tree-ssa-operands.h: Remove prototype.
* tree-ssa-operands.c (virtual_operand_p): Move to gimple.c.
* gimple.c (virtual_operand_p): Relocate from gimple.c.
* gimple.h: Add prototype.
* gimple-ssa.h: Include tree-ssa-operands.h.
* tree-dump.c: Add tree-cfg.h to include list.
* tree-ssa-alias.c: Add ipa-reference.h to include list.
* config/alpha/alpha.c: Include gimple-ssa.h instead of tree-flow.h.
* config/i386/i386.c: Don't include tree-flow.h.
* config/rs6000/rs6000.c: Likewise.

* lto/lto.c: Remove tree-flow.h from include list.

* testsuite/g++.dg/plugin/header_plugin.c: Don't include tree-flow.h.

From-SVN: r203817

18 files changed:
gcc/ChangeLog
gcc/config/alpha/alpha.c
gcc/config/i386/i386.c
gcc/config/rs6000/rs6000.c
gcc/gimple-ssa.h
gcc/gimple.c
gcc/gimple.h
gcc/lto/ChangeLog
gcc/lto/lto.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/plugin/header_plugin.c
gcc/tree-cfg.h [new file with mode: 0644]
gcc/tree-dump.c
gcc/tree-flow.h [deleted file]
gcc/tree-ssa-alias.c
gcc/tree-ssa-operands.c
gcc/tree-ssa-operands.h
gcc/tree-ssa.h

index 082dc54e76699c9016e19639ef38a6b0868f6bee..71298916e3b167b333fa8ff13df40fd9b0c8a1d3 100644 (file)
@@ -1,3 +1,18 @@
+2013-10-18  Andrew MacLeod  <amacleod@redhat.com>
+
+       * tree-cfg.h: Rename from tree-flow.h.  Remove #includes.
+       * tree-ssa.h: Relocate required #includes from tree-cfg.h.
+       * tree-ssa-operands.h: Remove prototype.
+       * tree-ssa-operands.c (virtual_operand_p): Move to gimple.c.
+       * gimple.c (virtual_operand_p): Relocate from gimple.c.
+       * gimple.h: Add prototype.
+       * gimple-ssa.h: Include tree-ssa-operands.h.
+       * tree-dump.c: Add tree-cfg.h to include list.
+       * tree-ssa-alias.c: Add ipa-reference.h to include list.
+       * config/alpha/alpha.c: Include gimple-ssa.h instead of tree-flow.h.
+       * config/i386/i386.c: Don't include tree-flow.h.
+       * config/rs6000/rs6000.c: Likewise.
+
 2013-10-18  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
 
        * config/frv/frv.c (frv_init_cumulative_args): Fix wrong cast.
index 63b8c8b1348415827a0583bb46be81784074e275..e39fc7731e6027d6ab1efe681ee58cfdf7b4789b 100644 (file)
@@ -49,7 +49,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "langhooks.h"
 #include "splay-tree.h"
 #include "gimple.h"
-#include "tree-flow.h"
+#include "gimple-ssa.h"
 #include "tree-ssanames.h"
 #include "tree-stdarg.h"
 #include "tm-constrs.h"
@@ -57,7 +57,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "libfuncs.h"
 #include "opts.h"
 #include "params.h"
-#include "gimple-ssa.h"
 
 /* Specify which cpu to schedule for.  */
 enum processor_type alpha_tune;
index c2ad5b68ec975242566a7a8839a12a9639d47242..b8c3c1d712832bef20754aadcd4bd7cf9893806e 100644 (file)
@@ -61,7 +61,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "diagnostic.h"
 #include "dumpfile.h"
 #include "tree-pass.h"
-#include "tree-flow.h"
 #include "context.h"
 #include "pass_manager.h"
 
index e61e1e80e5ad33f7e71464d7b48f27e24db78c65..4daebf26a30aaf2af572b2617999dadbe75eeddf 100644 (file)
@@ -52,7 +52,6 @@
 #include "cfgloop.h"
 #include "sched-int.h"
 #include "gimple.h"
-#include "tree-flow.h"
 #include "intl.h"
 #include "params.h"
 #include "tm-constrs.h"
index f764efc64b203ee25cf90d7e366198abda29932f..23aa099ba51d826d9d4853165d292c2290051c61 100644 (file)
@@ -21,6 +21,8 @@ along with GCC; see the file COPYING3.  If not see
 #ifndef GCC_GIMPLE_SSA_H
 #define GCC_GIMPLE_SSA_H
 
+#include "tree-ssa-operands.h"
+
 /* This structure is used to map a gimple statement to a label,
    or list of labels to represent transaction restart.  */
 
@@ -92,9 +94,6 @@ gimple_in_ssa_p (const struct function *fun)
   return fun && fun->gimple_df && fun->gimple_df->in_ssa_p;
 }
 
-/* Inline functions for manipulating various data structures defined in
-   tree-flow.h.  See tree-flow.h for documentation.  */
-
 /* Artificial variable used for the virtual operand FUD chain.  */
 static inline tree
 gimple_vop (const struct function *fun)
index 573dbb1fc5bb14150d9c9723100e0e9d2cc873e3..3ddceb95cf32a438297615689c2ab0fe359dd67c 100644 (file)
@@ -30,12 +30,12 @@ along with GCC; see the file COPYING3.  If not see
 #include "basic-block.h"
 #include "gimple.h"
 #include "diagnostic.h"
-#include "tree-flow.h"
 #include "value-prof.h"
 #include "flags.h"
 #include "alias.h"
 #include "demangle.h"
 #include "langhooks.h"
+#include "bitmap.h"
 
 
 /* All the tuples have their operand vector (if present) at the very bottom
@@ -2776,6 +2776,25 @@ is_gimple_id (tree t)
          || TREE_CODE (t) == STRING_CST);
 }
 
+/* Return true if OP, an SSA name or a DECL is a virtual operand.  */
+
+bool
+virtual_operand_p (tree op)
+{
+  if (TREE_CODE (op) == SSA_NAME)
+    {
+      op = SSA_NAME_VAR (op);
+      if (!op)
+       return false;
+    }
+
+  if (TREE_CODE (op) == VAR_DECL)
+    return VAR_DECL_IS_VIRTUAL_OPERAND (op);
+
+  return false;
+}
+
+
 /* Return true if T is a non-aggregate register variable.  */
 
 bool
index ea7858e45247b04c08f05a245f11b7e0f1816949..d8528acade5cf5230435627fa82c74cc88f5cbb6 100644 (file)
@@ -847,6 +847,8 @@ unsigned get_gimple_rhs_num_ops (enum tree_code);
 gimple gimple_alloc_stat (enum gimple_code, unsigned MEM_STAT_DECL);
 const char *gimple_decl_printable_name (tree, int);
 
+/* Returns true iff T is a virtual ssa name decl.  */
+extern bool virtual_operand_p (tree);
 /* Returns true iff T is a scalar register variable.  */
 extern bool is_gimple_reg (tree);
 /* Returns true iff T is any sort of variable.  */
index ab0b9a909deaab43f7a7c9a640b869519a0794fe..0bc08627d89e43f54e26dc6387c92a7c15e565e6 100644 (file)
@@ -1,3 +1,7 @@
+2013-10-18  Andrew MacLeod  <amacleod@redhat.com>
+
+       * lto.c: Remove tree-flow.h from include list.
+
 2013-10-15  Richard Biener  <rguenther@suse.de>
 
        * lto.c (hash_canonical_type): Split out from ...
index d9c36dcc5d68628121bb552a1cce36541759c969..bca1dd12032c11f61e11fb4d4802c881b9093e05 100644 (file)
@@ -24,7 +24,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "opts.h"
 #include "toplev.h"
 #include "tree.h"
-#include "tree-flow.h"
 #include "diagnostic-core.h"
 #include "tm.h"
 #include "cgraph.h"
index 765d194d90fa796661f3349cfd0bca8c6a5b5033..f92ac71eefe8ad412eba435aaa5c47f514c69f40 100644 (file)
@@ -1,9 +1,13 @@
+2013-10-18  Andrew MacLeod  <amacleod@redhat.com>
+
+       * g++.dg/plugin/header_plugin.c: Don't include tree-flow.h.
+
 2013-10-18  Hans-Peter Nilsson  <hp@axis.com>
 
        * gcc.dg/tree-ssa/gen-vect-11.c: Use dynamic vector cost model.
-        gcc.dg/tree-ssa/gen-vect-11a.c: Likewise.
-        gcc.dg/tree-ssa/gen-vect-2.c: Likewise.
-        gcc.dg/tree-ssa/gen-vect-25.c: Likewise.
+       * gcc.dg/tree-ssa/gen-vect-11a.c: Likewise.
+       * gcc.dg/tree-ssa/gen-vect-2.c: Likewise.
+       * gcc.dg/tree-ssa/gen-vect-25.c: Likewise.
 
 2013-10-17  Charles Bayis  <charles.baylis@linaro.org>
 
index a464827dee9ec28cab5c4084a25df0ddba8050a8..a024194e19f3591549d406789fbeace703b6e452 100644 (file)
@@ -17,7 +17,6 @@
 #include "c-family/c-pretty-print.h"
 #include "tree-iterator.h"
 #include "plugin.h"
-#include "tree-flow.h"
 #include "langhooks.h"
 #include "cp/cxx-pretty-print.h"
 #include "cp/name-lookup.h"
diff --git a/gcc/tree-cfg.h b/gcc/tree-cfg.h
new file mode 100644 (file)
index 0000000..d6a5d8f
--- /dev/null
@@ -0,0 +1,96 @@
+/* Data and Control Flow Analysis for Trees.
+   Copyright (C) 2001-2013 Free Software Foundation, Inc.
+   Contributed by Diego Novillo <dnovillo@redhat.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 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or 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 COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
+
+#ifndef _TREE_CFG_H
+#define _TREE_CFG_H
+
+/* Location to track pending stmt for edge insertion.  */
+#define PENDING_STMT(e)        ((e)->insns.g)
+
+extern void init_empty_tree_cfg_for_function (struct function *);
+extern void init_empty_tree_cfg (void);
+extern void fold_cond_expr_cond (void);
+extern void start_recording_case_labels (void);
+extern void end_recording_case_labels (void);
+extern basic_block label_to_block_fn (struct function *, tree);
+#define label_to_block(t) (label_to_block_fn (cfun, t))
+extern void make_abnormal_goto_edges (basic_block, bool);
+extern void cleanup_dead_labels (void);
+extern void group_case_labels_stmt (gimple);
+extern void group_case_labels (void);
+extern void replace_uses_by (tree, tree);
+extern basic_block single_noncomplex_succ (basic_block bb);
+extern void notice_special_calls (gimple);
+extern void clear_special_calls (void);
+extern edge find_taken_edge (basic_block, tree);
+extern void gimple_debug_bb (basic_block);
+extern basic_block gimple_debug_bb_n (int);
+extern void gimple_debug_cfg (int);
+extern void gimple_dump_cfg (FILE *, int);
+extern void dump_cfg_stats (FILE *);
+extern void debug_cfg_stats (void);
+extern bool stmt_can_make_abnormal_goto (gimple);
+extern bool is_ctrl_stmt (gimple);
+extern bool is_ctrl_altering_stmt (gimple);
+extern bool simple_goto_p (gimple);
+extern bool stmt_ends_bb_p (gimple);
+extern void delete_tree_cfg_annotations (void);
+extern gimple first_stmt (basic_block);
+extern gimple last_stmt (basic_block);
+extern gimple last_and_only_stmt (basic_block);
+extern void verify_gimple_in_seq (gimple_seq);
+extern void verify_gimple_in_cfg (struct function *);
+extern tree gimple_block_label (basic_block);
+extern void add_phi_args_after_copy_bb (basic_block);
+extern void add_phi_args_after_copy (basic_block *, unsigned, edge);
+extern bool gimple_duplicate_sese_region (edge, edge, basic_block *, unsigned,
+                                       basic_block *, bool);
+extern bool gimple_duplicate_sese_tail (edge, edge, basic_block *, unsigned,
+                                     basic_block *);
+extern void gather_blocks_in_sese_region (basic_block entry, basic_block exit,
+                                         vec<basic_block> *bbs_p);
+extern basic_block move_sese_region_to_fn (struct function *, basic_block,
+                                          basic_block, tree);
+extern void dump_function_to_file (tree, FILE *, int);
+extern void debug_function (tree, int) ;
+extern void print_loops_bb (FILE *, basic_block, int, int);
+extern void print_loops (FILE *, int);
+extern void debug (struct loop &ref);
+extern void debug (struct loop *ptr);
+extern void debug_verbose (struct loop &ref);
+extern void debug_verbose (struct loop *ptr);
+extern void debug_loops (int);
+extern void debug_loop (struct loop *, int);
+extern void debug_loop_num (unsigned, int);
+extern void remove_edge_and_dominated_blocks (edge);
+extern bool gimple_purge_dead_eh_edges (basic_block);
+extern bool gimple_purge_all_dead_eh_edges (const_bitmap);
+extern bool gimple_purge_dead_abnormal_call_edges (basic_block);
+extern bool gimple_purge_all_dead_abnormal_call_edges (const_bitmap);
+extern tree gimplify_build3 (gimple_stmt_iterator *, enum tree_code,
+                            tree, tree, tree, tree);
+extern tree gimplify_build2 (gimple_stmt_iterator *, enum tree_code,
+                            tree, tree, tree);
+extern tree gimplify_build1 (gimple_stmt_iterator *, enum tree_code,
+                            tree, tree);
+extern void extract_true_false_edges_from_block (basic_block, edge *, edge *);
+extern unsigned int execute_fixup_cfg (void);
+
+#endif /* _TREE_CFG_H  */
index 6b16caa9469fc06a8cbbde69bbf00735b5deb280..17db244da6458f704310e7f21ae25bb2e73594fa 100644 (file)
@@ -29,7 +29,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "langhooks.h"
 #include "tree-iterator.h"
 #include "tree-pretty-print.h"
-#include "tree-flow.h"
+#include "tree-cfg.h"
 
 static unsigned int queue (dump_info_p, const_tree, int);
 static void dump_index (dump_info_p, unsigned int);
diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h
deleted file mode 100644 (file)
index d849c29..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-/* Data and Control Flow Analysis for Trees.
-   Copyright (C) 2001-2013 Free Software Foundation, Inc.
-   Contributed by Diego Novillo <dnovillo@redhat.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 3, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or 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 COPYING3.  If not see
-<http://www.gnu.org/licenses/>.  */
-
-#ifndef _TREE_FLOW_H
-#define _TREE_FLOW_H 1
-
-#include "bitmap.h"
-#include "sbitmap.h"
-#include "basic-block.h"
-#include "hashtab.h"
-#include "gimple.h"
-#include "tree-ssa-operands.h"
-#include "cgraph.h"
-#include "ipa-reference.h"
-#include "tree-ssa-alias.h"
-#include "tree-cfgcleanup.h"
-#include "tree-dfa.h"
-#include "tree-pretty-print.h"
-#include "gimple-low.h"
-#include "tree-into-ssa.h"
-#include "tree-ssa-loop.h"
-
-/* Location to track pending stmt for edge insertion.  */
-#define PENDING_STMT(e)        ((e)->insns.g)
-
-extern void init_empty_tree_cfg_for_function (struct function *);
-extern void init_empty_tree_cfg (void);
-extern void fold_cond_expr_cond (void);
-extern void start_recording_case_labels (void);
-extern void end_recording_case_labels (void);
-extern basic_block label_to_block_fn (struct function *, tree);
-#define label_to_block(t) (label_to_block_fn (cfun, t))
-extern void make_abnormal_goto_edges (basic_block, bool);
-extern void cleanup_dead_labels (void);
-extern void group_case_labels_stmt (gimple);
-extern void group_case_labels (void);
-extern void replace_uses_by (tree, tree);
-extern basic_block single_noncomplex_succ (basic_block bb);
-extern void notice_special_calls (gimple);
-extern void clear_special_calls (void);
-extern edge find_taken_edge (basic_block, tree);
-extern void gimple_debug_bb (basic_block);
-extern basic_block gimple_debug_bb_n (int);
-extern void gimple_debug_cfg (int);
-extern void gimple_dump_cfg (FILE *, int);
-extern void dump_cfg_stats (FILE *);
-extern void debug_cfg_stats (void);
-extern bool stmt_can_make_abnormal_goto (gimple);
-extern bool is_ctrl_stmt (gimple);
-extern bool is_ctrl_altering_stmt (gimple);
-extern bool simple_goto_p (gimple);
-extern bool stmt_ends_bb_p (gimple);
-extern void delete_tree_cfg_annotations (void);
-extern gimple first_stmt (basic_block);
-extern gimple last_stmt (basic_block);
-extern gimple last_and_only_stmt (basic_block);
-extern void verify_gimple_in_seq (gimple_seq);
-extern void verify_gimple_in_cfg (struct function *);
-extern tree gimple_block_label (basic_block);
-extern void add_phi_args_after_copy_bb (basic_block);
-extern void add_phi_args_after_copy (basic_block *, unsigned, edge);
-extern bool gimple_duplicate_sese_region (edge, edge, basic_block *, unsigned,
-                                       basic_block *, bool);
-extern bool gimple_duplicate_sese_tail (edge, edge, basic_block *, unsigned,
-                                     basic_block *);
-extern void gather_blocks_in_sese_region (basic_block entry, basic_block exit,
-                                         vec<basic_block> *bbs_p);
-extern basic_block move_sese_region_to_fn (struct function *, basic_block,
-                                          basic_block, tree);
-extern void dump_function_to_file (tree, FILE *, int);
-extern void debug_function (tree, int) ;
-extern void print_loops_bb (FILE *, basic_block, int, int);
-extern void print_loops (FILE *, int);
-extern void debug (struct loop &ref);
-extern void debug (struct loop *ptr);
-extern void debug_verbose (struct loop &ref);
-extern void debug_verbose (struct loop *ptr);
-extern void debug_loops (int);
-extern void debug_loop (struct loop *, int);
-extern void debug_loop_num (unsigned, int);
-void remove_edge_and_dominated_blocks (edge);
-extern bool gimple_purge_dead_eh_edges (basic_block);
-extern bool gimple_purge_all_dead_eh_edges (const_bitmap);
-extern bool gimple_purge_dead_abnormal_call_edges (basic_block);
-extern bool gimple_purge_all_dead_abnormal_call_edges (const_bitmap);
-extern tree gimplify_build3 (gimple_stmt_iterator *, enum tree_code,
-                            tree, tree, tree, tree);
-extern tree gimplify_build2 (gimple_stmt_iterator *, enum tree_code,
-                            tree, tree, tree);
-extern tree gimplify_build1 (gimple_stmt_iterator *, enum tree_code,
-                            tree, tree);
-extern void extract_true_false_edges_from_block (basic_block, edge *, edge *);
-extern unsigned int execute_fixup_cfg (void);
-
-#endif /* _TREE_FLOW_H  */
index 3cce3315ba2938c8eb61804faf852870ed4f16bc..605377e6feb8436d4d6096087b9a084fb3168d13 100644 (file)
@@ -42,6 +42,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "pointer-set.h"
 #include "alloc-pool.h"
 #include "tree-ssa-alias.h"
+#include "ipa-reference.h"
 
 /* Broad overview of how alias analysis on gimple works:
 
index 603f7975bcb79eda55eac3f9649ce9e834975b4a..f397bb94f0ae5ca74b94f3866e2f2af0fb3743d5 100644 (file)
@@ -1287,24 +1287,6 @@ debug_immediate_uses_for (tree var)
 }
 
 
-/* Return true if OP, an SSA name or a DECL is a virtual operand.  */
-
-bool
-virtual_operand_p (tree op)
-{
-  if (TREE_CODE (op) == SSA_NAME)
-    {
-      op = SSA_NAME_VAR (op);
-      if (!op)
-       return false;
-    }
-
-  if (TREE_CODE (op) == VAR_DECL)
-    return VAR_DECL_IS_VIRTUAL_OPERAND (op);
-
-  return false;
-}
-
 /* Unlink STMTs virtual definition from the IL by propagating its use.  */
 
 void
index b3a4a920e881512f787448d559e710ca32180150..759b155a3e73f269ecbcf341b80e5e6640edd916 100644 (file)
@@ -103,7 +103,6 @@ extern void dump_immediate_uses (FILE *file);
 extern void debug_immediate_uses (void);
 extern void debug_immediate_uses_for (tree var);
 
-extern bool virtual_operand_p (tree);
 extern void unlink_stmt_vdef (gimple);
 
 /* Return the tree pointed-to by USE.  */
index 7371ceb26789dbc64c7fd031469e96bf6b4033e4..8c26fd1a2fe62d90bd56f89a25e2bdbc9034eca2 100644 (file)
@@ -20,16 +20,23 @@ along with GCC; see the file COPYING3.  If not see
 #ifndef GCC_TREE_SSA_H
 #define GCC_TREE_SSA_H
 
+#include "bitmap.h"
+#include "sbitmap.h"
 #include "gimple.h"
-#include "tree-ssa-operands.h"
-#include "tree-phinodes.h"
 #include "gimple-ssa.h"
+#include "cgraph.h"
+#include "tree-cfgcleanup.h"
+#include "tree-cfg.h"
+#include "tree-phinodes.h"
 #include "ssa-iterators.h"
 #include "tree-ssanames.h"
 #include "tree-ssa-dom.h"
-#include "tree-flow.h"
 #include "tree-ssa-threadedge.h"
 #include "tree-ssa-address.h"
+#include "tree-ssa-loop.h"
+#include "tree-into-ssa.h"
+#include "gimple-low.h"
+#include "tree-dfa.h"
 
 /* Mapping for redirected edges.  */
 struct _edge_var_map {