* tree-flow.h: Remove some prototypes.
* gimple-fold.h: Add prototypes from gimple.h and tree-flow.h.
* tree-ssa-copy.h: New file. Relocate prototypes from tree-flow.h.
* gimple.h: Include gimple-fold.h, move prototypes into gimple-fold.h.
* tree-ssa.h: Include tree-ssa-copy.h.
* gimple-fold.c: Remove gimple-fold.h from include list.
* tree-vrp.c: Remove gimple-fold.h from include list.
* tree-ssa-sccvn.c: Remove gimple-fold.h from include list.
* tree-ssa-ccp.c: Remove gimple-fold.h from include list.
===================================================================
*************** void mark_virtual_operands_for_renaming
tree get_current_def (tree);
void set_current_def (tree, tree);
- /* In tree-ssa-ccp.c */
- tree fold_const_aggregate_ref (tree);
- tree gimple_fold_stmt_to_constant (gimple, tree (*)(tree));
-
/* In tree-ssa-dom.c */
extern void dump_dominator_optimization_stats (FILE *);
extern void debug_dominator_optimization_stats (void);
*************** int loop_depth_of_name (tree);
tree degenerate_phi_result (gimple);
bool simple_iv_increment_p (gimple);
- /* In tree-ssa-copy.c */
- extern void propagate_value (use_operand_p, tree);
- extern void propagate_tree_value (tree *, tree);
- extern void propagate_tree_value_into_stmt (gimple_stmt_iterator *, tree);
- extern void replace_exp (use_operand_p, tree);
- extern bool may_propagate_copy (tree, tree);
- extern bool may_propagate_copy_into_stmt (gimple, tree);
- extern bool may_propagate_copy_into_asm (tree);
-
/* In tree-ssa-loop-ch.c */
bool do_while_loop_p (struct loop *);
===================================================================
*************** along with GCC; see the file COPYING3.
#ifndef GCC_GIMPLE_FOLD_H
#define GCC_GIMPLE_FOLD_H
! tree fold_const_aggregate_ref_1 (tree, tree (*) (tree));
! tree fold_const_aggregate_ref (tree);
!
! tree gimple_fold_stmt_to_constant_1 (gimple, tree (*) (tree));
! tree gimple_fold_stmt_to_constant (gimple, tree (*) (tree));
#endif /* GCC_GIMPLE_FOLD_H */
#ifndef GCC_GIMPLE_FOLD_H
#define GCC_GIMPLE_FOLD_H
! extern tree canonicalize_constructor_val (tree, tree);
! extern tree get_symbol_constant_value (tree);
! extern void gimplify_and_update_call_from_tree (gimple_stmt_iterator *, tree);
! extern tree gimple_fold_builtin (gimple);
! extern tree gimple_extract_devirt_binfo_from_cst (tree, tree);
! extern bool fold_stmt (gimple_stmt_iterator *);
! extern bool fold_stmt_inplace (gimple_stmt_iterator *);
! extern tree maybe_fold_and_comparisons (enum tree_code, tree, tree,
! enum tree_code, tree, tree);
! extern tree maybe_fold_or_comparisons (enum tree_code, tree, tree,
! enum tree_code, tree, tree);
! extern tree gimple_fold_stmt_to_constant_1 (gimple, tree (*) (tree));
! extern tree gimple_fold_stmt_to_constant (gimple, tree (*) (tree));
! extern tree fold_const_aggregate_ref_1 (tree, tree (*) (tree));
! extern tree fold_const_aggregate_ref (tree);
! extern tree gimple_get_virt_method_for_binfo (HOST_WIDE_INT, tree);
! extern bool gimple_val_nonnegative_real_p (tree);
#endif /* GCC_GIMPLE_FOLD_H */
===================================================================
***************
+ /* Header file for copy propagation and SSA_NAME replacement.
+ Copyright (C) 2013 Free Software Foundation, Inc.
+
+ 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 GCC_TREE_SSA_COPY_H
+ #define GCC_TREE_SSA_COPY_H
+
+ extern bool may_propagate_copy (tree, tree);
+ extern bool may_propagate_copy_into_stmt (gimple, tree);
+ extern bool may_propagate_copy_into_asm (tree);
+ extern void propagate_value (use_operand_p, tree);
+ extern void replace_exp (use_operand_p, tree);
+ extern void propagate_tree_value (tree *, tree);
+ extern void propagate_tree_value_into_stmt (gimple_stmt_iterator *, tree);
+
+ #endif /* GCC_TREE_SSA_COPY_H */
===================================================================
*************** along with GCC; see the file COPYING3.
#include "tree.h"
#include "tree-ssa-alias.h"
#include "internal-fn.h"
+ #include "gimple-fold.h"
typedef gimple gimple_seq_node;
*************** unsigned get_gimple_rhs_num_ops (enum tr
#define gimple_alloc(c, n) gimple_alloc_stat (c, n MEM_STAT_INFO)
gimple gimple_alloc_stat (enum gimple_code, unsigned MEM_STAT_DECL);
const char *gimple_decl_printable_name (tree, int);
- tree gimple_get_virt_method_for_binfo (HOST_WIDE_INT, tree);
- tree gimple_extract_devirt_binfo_from_cst (tree, tree);
/* Returns true iff T is a scalar register variable. */
extern bool is_gimple_reg (tree);
*************** gimple_alloc_kind (enum gimple_code code
extern void dump_gimple_statistics (void);
- /* In gimple-fold.c. */
- void gimplify_and_update_call_from_tree (gimple_stmt_iterator *, tree);
- tree gimple_fold_builtin (gimple);
- bool fold_stmt (gimple_stmt_iterator *);
- bool fold_stmt_inplace (gimple_stmt_iterator *);
- tree get_symbol_constant_value (tree);
- tree canonicalize_constructor_val (tree, tree);
- extern tree maybe_fold_and_comparisons (enum tree_code, tree, tree,
- enum tree_code, tree, tree);
- extern tree maybe_fold_or_comparisons (enum tree_code, tree, tree,
- enum tree_code, tree, tree);
-
- bool gimple_val_nonnegative_real_p (tree);
-
-
/* Set the location of all statements in SEQ to LOC. */
static inline void
===================================================================
*************** along with GCC; see the file COPYING3.
#include "gimple-ssa.h"
#include "ssa-iterators.h"
#include "tree-ssanames.h"
+ #include "tree-ssa-copy.h"
#include "tree-flow.h"
/* Mapping for redirected edges. */
===================================================================
*************** along with GCC; see the file COPYING3.
#include "tree-ssa.h"
#include "tree-ssa-propagate.h"
#include "target.h"
- #include "gimple-fold.h"
#include "ipa-utils.h"
#include "gimple-pretty-print.h"
===================================================================
*************** along with GCC; see the file COPYING3.
#include "tree-ssa-propagate.h"
#include "tree-chrec.h"
#include "tree-ssa-threadupdate.h"
- #include "gimple-fold.h"
#include "expr.h"
#include "optabs.h"
===================================================================
*************** along with GCC; see the file COPYING3.
#include "params.h"
#include "tree-ssa-propagate.h"
#include "tree-ssa-sccvn.h"
- #include "gimple-fold.h"
/* This algorithm is based on the SCC algorithm presented by Keith
Cooper and L. Taylor Simpson in "SCC-Based Value numbering"
===================================================================
*************** along with GCC; see the file COPYING3.
#include "target.h"
#include "diagnostic-core.h"
#include "dbgcnt.h"
- #include "gimple-fold.h"
#include "params.h"
#include "hash-table.h"