gimple.h: Reorder prototypes to match .c declaration order...
authorAndrew MacLeod <amacleod@redhat.com>
Sun, 17 Nov 2013 16:14:46 +0000 (16:14 +0000)
committerAndrew Macleod <amacleod@gcc.gnu.org>
Sun, 17 Nov 2013 16:14:46 +0000 (16:14 +0000)
* gimple.h: Reorder prototypes to match .c declaration order, and remove
protyotypes for functions not in gimple.c.
(LABEL): Move to tree-into-ssa.c.
* gimple.c: Remove unused prototypes.
(get_base_address): Move to tree.c.
* tree.c (get_base_address): Relocate from gimple.c.
* builtins.h (validate_gimple_arglist): Add prototype.
* trans-mem.h (compute_transaction_bits, is_tm_ending): Add prototype.
* cfgexpand.h: New File.
(gimple_assign_rhs_to_tree, estimated_stack_frame_size): Add protoype.
* tree.h (build_addr): Move to tree-nested.h.
* tree-nested.h: New File.
(build_addr, lower_nested_functions, insert_field_into_struct): Add
prototypes.
* tree-inline.h (estimated_stack_frame_size): Remove prototype.
* ipa-inline-analysis.c: Include cfgexpand.h.
* cgraphunit.c: Include tree-nested.h.
* omp-low.c: Likewise.
* tree-parloops.c: Likewise.
* gimple-low.h: Likewise.
* tree-profile.h: Likewise.
* expr.c: Include cfgexpand.h.
* tree-affine.c: Likewise.
* tree-ssa.c: Likewise.
* tree-ssa-loop-im.c: Include trans-mem.h.
* tree-ssa-tail-merge.c: Likewise.
* value-prof.c: Include builtins.h and tree-nested.h.
* tree-into-ssa.c (LABEL): Define here.

* fortran/trans-intrinsic.c: Include tree-nested.h.

From-SVN: r204919

25 files changed:
gcc/ChangeLog
gcc/builtins.h
gcc/cfgexpand.h [new file with mode: 0644]
gcc/cgraphunit.c
gcc/expr.c
gcc/fortran/ChangeLog
gcc/fortran/trans-intrinsic.c
gcc/gimple-low.c
gcc/gimple.c
gcc/gimple.h
gcc/ipa-inline-analysis.c
gcc/omp-low.c
gcc/trans-mem.h
gcc/tree-affine.c
gcc/tree-inline.h
gcc/tree-into-ssa.c
gcc/tree-nested.h [new file with mode: 0644]
gcc/tree-parloops.c
gcc/tree-profile.c
gcc/tree-ssa-loop-im.c
gcc/tree-ssa-tail-merge.c
gcc/tree-ssa.c
gcc/tree.c
gcc/tree.h
gcc/value-prof.c

index 5cb07b7882f02ae38eb711f492b886a3c9ecf3d6..0edc5879cbdc8b0a034b911057d56d2013d25cfa 100644 (file)
@@ -1,3 +1,34 @@
+2013-11-17  Andrew MacLeod  <amacleod@redhat.com>
+
+       * gimple.h: Reorder prototypes to match .c declaration order, and remove
+       protyotypes for functions not in gimple.c.
+       (LABEL): Move to tree-into-ssa.c.
+       * gimple.c: Remove unused prototypes.
+       (get_base_address): Move to tree.c.
+       * tree.c (get_base_address): Relocate from gimple.c.
+       * builtins.h (validate_gimple_arglist): Add prototype.
+       * trans-mem.h (compute_transaction_bits, is_tm_ending): Add prototype.
+       * cfgexpand.h: New File.
+       (gimple_assign_rhs_to_tree, estimated_stack_frame_size): Add protoype.
+       * tree.h (build_addr): Move to tree-nested.h.
+       * tree-nested.h: New File.
+       (build_addr, lower_nested_functions, insert_field_into_struct): Add
+       prototypes.
+       * tree-inline.h (estimated_stack_frame_size): Remove prototype.
+       * ipa-inline-analysis.c: Include cfgexpand.h.
+       * cgraphunit.c: Include tree-nested.h.
+       * omp-low.c: Likewise.
+       * tree-parloops.c: Likewise.
+       * gimple-low.h: Likewise.
+       * tree-profile.h: Likewise.
+       * expr.c: Include cfgexpand.h.
+       * tree-affine.c: Likewise.
+       * tree-ssa.c: Likewise.
+       * tree-ssa-loop-im.c: Include trans-mem.h.
+       * tree-ssa-tail-merge.c: Likewise.
+       * value-prof.c: Include builtins.h and tree-nested.h.
+       * tree-into-ssa.c (LABEL): Define here.
+
 2013-11-16  Joern Rennecke  <joern.rennecke@embecosm.com>
 
        * config/arc/arc.c (arc_predicate_delay_insns): New function.
index e9bc8766be221e034149c15356e33d772ef5e146..0ed9479bdbf9e4c47d5c8befaa72129ca3790137 100644 (file)
@@ -44,4 +44,6 @@ extern struct target_builtins *this_target_builtins;
 #define this_target_builtins (&default_target_builtins)
 #endif
 
+extern bool validate_gimple_arglist (const_gimple, ...);
+
 #endif
diff --git a/gcc/cfgexpand.h b/gcc/cfgexpand.h
new file mode 100644 (file)
index 0000000..04517a3
--- /dev/null
@@ -0,0 +1,26 @@
+/* Header file for lowering trees to RTL.
+   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_CFGEXPAND_H
+#define GCC_CFGEXPAND_H
+
+extern tree gimple_assign_rhs_to_tree (gimple);
+extern HOST_WIDE_INT estimated_stack_frame_size (struct cgraph_node *);
+
+#endif /* GCC_CFGEXPAND_H */
index 8ab274b5640659d933b108beb06385318ad5e8a7..863b81e72c0ceeafbb7a33ead42e5262f9c2ca81 100644 (file)
@@ -201,6 +201,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "regset.h"     /* FIXME: For reg_obstack.  */
 #include "context.h"
 #include "pass_manager.h"
+#include "tree-nested.h"
 
 /* Queue of cgraph nodes scheduled to be added into cgraph.  This is a
    secondary queue used during optimization to accommodate passes that
index 28b43320798c196f42b1e60f24bdc6575c96d580..e8c022c45eb3eb5fc7d6474ecbe55fc5ae852064 100644 (file)
@@ -57,6 +57,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "target-globals.h"
 #include "params.h"
 #include "tree-ssa-address.h"
+#include "cfgexpand.h"
 
 /* Decide whether a function's arguments should be processed
    from first to last or from last to first.
index e6c6244e745d8b1dce08939a1e3fe84591ebb857..16e8915c0c58f292c26843ef32542b7a432aa322 100644 (file)
@@ -1,3 +1,7 @@
+2013-11-17  Andrew MacLeod  <amacleod@redhat.com>
+
+       * fortran/trans-intrinsic.c: Include tree-nested.h.
+
 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
 
        * trans-expr.c: Include only gimplify.h and gimple.h as needed.
index 7e2bb36ca6d13a28c311d44207afd32c74ff6d5e..042911f8ea1d897d67d51acd9f46918ff24aae82 100644 (file)
@@ -39,6 +39,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "trans-array.h"
 /* Only for gfc_trans_assign and gfc_trans_pointer_assign.  */
 #include "trans-stmt.h"
+#include "tree-nested.h"
 
 /* This maps Fortran intrinsic math functions to external library or GCC
    builtin functions.  */
index 519e984da28f069437c5b7e97848157f38f193f3..3f9ac575e64f58ad94ad93f396a8d76ed014d7d6 100644 (file)
@@ -33,6 +33,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-pass.h"
 #include "langhooks.h"
 #include "gimple-low.h"
+#include "tree-nested.h"
 
 /* The differences between High GIMPLE and Low GIMPLE are the
    following:
index ff798ff42b23aba3a8dde9a4c732bf9cbda5c80a..f42d921fa0f3f424309f3dcd7927c459af2faded 100644 (file)
@@ -84,11 +84,6 @@ static const char * const gimple_alloc_kind_names[] = {
     "everything else"
 };
 
-/* Private API manipulation functions shared only with some
-   other files.  */
-extern void gimple_set_stored_syms (gimple, bitmap, bitmap_obstack *);
-extern void gimple_set_loaded_syms (gimple, bitmap, bitmap_obstack *);
-
 /* Gimple tuple constructors.
    Note: Any constructor taking a ``gimple_seq'' as a parameter, can
    be passed a NULL to start with an empty sequence.  */
@@ -1958,34 +1953,6 @@ const unsigned char gimple_rhs_class_table[] = {
 #undef DEFTREECODE
 #undef END_OF_BASE_TREE_CODES
 
-/* Given a memory reference expression T, return its base address.
-   The base address of a memory reference expression is the main
-   object being referenced.  For instance, the base address for
-   'array[i].fld[j]' is 'array'.  You can think of this as stripping
-   away the offset part from a memory address.
-
-   This function calls handled_component_p to strip away all the inner
-   parts of the memory reference until it reaches the base object.  */
-
-tree
-get_base_address (tree t)
-{
-  while (handled_component_p (t))
-    t = TREE_OPERAND (t, 0);
-
-  if ((TREE_CODE (t) == MEM_REF
-       || TREE_CODE (t) == TARGET_MEM_REF)
-      && TREE_CODE (TREE_OPERAND (t, 0)) == ADDR_EXPR)
-    t = TREE_OPERAND (TREE_OPERAND (t, 0), 0);
-
-  /* ???  Either the alias oracle or all callers need to properly deal
-     with WITH_SIZE_EXPRs before we can look through those.  */
-  if (TREE_CODE (t) == WITH_SIZE_EXPR)
-    return NULL_TREE;
-
-  return t;
-}
-
 void
 recalculate_side_effects (tree t)
 {
index e675b0753b2b32beec5a7c80428eb37b4a95d970..022bac93aaf290cd9106514658069509e1c34da9 100644 (file)
@@ -727,32 +727,26 @@ extern enum gimple_statement_structure_enum const gss_for_code_[];
    of comminucating the profile info to the builtin expanders.  */
 extern gimple currently_expanding_gimple_stmt;
 
+#define gimple_alloc(c, n) gimple_alloc_stat (c, n MEM_STAT_INFO)
+gimple gimple_alloc_stat (enum gimple_code, unsigned MEM_STAT_DECL);
 gimple gimple_build_return (tree);
-
-gimple gimple_build_assign_stat (tree, tree MEM_STAT_DECL);
-#define gimple_build_assign(l,r) gimple_build_assign_stat (l, r MEM_STAT_INFO)
-
-gimple
-gimple_build_assign_with_ops (enum tree_code, tree,
-                             tree, tree CXX_MEM_STAT_INFO);
-gimple
-gimple_build_assign_with_ops (enum tree_code, tree,
-                             tree, tree, tree CXX_MEM_STAT_INFO);
-
-gimple gimple_build_debug_bind_stat (tree, tree, gimple MEM_STAT_DECL);
-#define gimple_build_debug_bind(var,val,stmt)                  \
-  gimple_build_debug_bind_stat ((var), (val), (stmt) MEM_STAT_INFO)
-gimple gimple_build_debug_source_bind_stat (tree, tree, gimple MEM_STAT_DECL);
-#define gimple_build_debug_source_bind(var,val,stmt)                   \
-  gimple_build_debug_source_bind_stat ((var), (val), (stmt) MEM_STAT_INFO)
-
+void gimple_call_reset_alias_info (gimple);
 gimple gimple_build_call_vec (tree, vec<tree> );
 gimple gimple_build_call (tree, unsigned, ...);
 gimple gimple_build_call_valist (tree, unsigned, va_list);
 gimple gimple_build_call_internal (enum internal_fn, unsigned, ...);
 gimple gimple_build_call_internal_vec (enum internal_fn, vec<tree> );
 gimple gimple_build_call_from_tree (tree);
+extern unsigned gimple_call_get_nobnd_arg_index (const_gimple, unsigned);
+gimple gimple_build_assign_stat (tree, tree MEM_STAT_DECL);
+#define gimple_build_assign(l,r) gimple_build_assign_stat (l, r MEM_STAT_INFO)
+gimple gimple_build_assign_with_ops (enum tree_code, tree,
+                                    tree, tree, tree CXX_MEM_STAT_INFO);
+gimple gimple_build_assign_with_ops (enum tree_code, tree,
+                                    tree, tree CXX_MEM_STAT_INFO);
 gimple gimple_build_cond (enum tree_code, tree, tree, tree, tree);
+gimple gimple_build_cond_from_tree (tree, tree, tree);
+void gimple_cond_set_condition_from_tree (gimple, tree);
 gimple gimple_build_label (tree label);
 gimple gimple_build_goto (tree dest);
 gimple gimple_build_nop (void);
@@ -767,39 +761,46 @@ gimple gimple_build_eh_else (gimple_seq, gimple_seq);
 gimple gimple_build_try (gimple_seq, gimple_seq, enum gimple_try_flags);
 gimple gimple_build_wce (gimple_seq);
 gimple gimple_build_resx (int);
-gimple gimple_build_eh_dispatch (int);
 gimple gimple_build_switch_nlabels (unsigned, tree, tree);
 gimple gimple_build_switch (tree, tree, vec<tree> );
+gimple gimple_build_eh_dispatch (int);
+gimple gimple_build_debug_bind_stat (tree, tree, gimple MEM_STAT_DECL);
+#define gimple_build_debug_bind(var,val,stmt)                  \
+  gimple_build_debug_bind_stat ((var), (val), (stmt) MEM_STAT_INFO)
+gimple gimple_build_debug_source_bind_stat (tree, tree, gimple MEM_STAT_DECL);
+#define gimple_build_debug_source_bind(var,val,stmt)                   \
+  gimple_build_debug_source_bind_stat ((var), (val), (stmt) MEM_STAT_INFO)
+gimple gimple_build_omp_critical (gimple_seq, tree);
+gimple gimple_build_omp_for (gimple_seq, int, tree, size_t, gimple_seq);
 gimple gimple_build_omp_parallel (gimple_seq, tree, tree, tree);
 gimple gimple_build_omp_task (gimple_seq, tree, tree, tree, tree, tree, tree);
-gimple gimple_build_omp_for (gimple_seq, int, tree, size_t, gimple_seq);
-gimple gimple_build_omp_critical (gimple_seq, tree);
 gimple gimple_build_omp_section (gimple_seq);
-gimple gimple_build_omp_continue (tree, tree);
 gimple gimple_build_omp_master (gimple_seq);
 gimple gimple_build_omp_taskgroup (gimple_seq);
-gimple gimple_build_omp_return (bool);
+gimple gimple_build_omp_continue (tree, tree);
 gimple gimple_build_omp_ordered (gimple_seq);
+gimple gimple_build_omp_return (bool);
 gimple gimple_build_omp_sections (gimple_seq, tree);
 gimple gimple_build_omp_sections_switch (void);
 gimple gimple_build_omp_single (gimple_seq, tree);
 gimple gimple_build_omp_target (gimple_seq, int, tree);
 gimple gimple_build_omp_teams (gimple_seq, tree);
-gimple gimple_build_cdt (tree, tree);
 gimple gimple_build_omp_atomic_load (tree, tree);
 gimple gimple_build_omp_atomic_store (tree);
 gimple gimple_build_transaction (gimple_seq, tree);
 gimple gimple_build_predict (enum br_predictor, enum prediction);
-enum gimple_statement_structure_enum gss_for_assign (enum tree_code);
-gimple_seq gimple_seq_alloc (void);
-void gimple_seq_free (gimple_seq);
+extern void gimple_seq_add_stmt (gimple_seq *, gimple);
+extern void gimple_seq_add_stmt_without_update (gimple_seq *, gimple);
 void gimple_seq_add_seq (gimple_seq *, gimple_seq);
+extern void annotate_all_with_location_after (gimple_seq, gimple_stmt_iterator,
+                                             location_t);
+extern void annotate_all_with_location (gimple_seq, location_t);
+bool empty_body_p (gimple_seq);
 gimple_seq gimple_seq_copy (gimple_seq);
 bool gimple_call_same_target_p (const_gimple, const_gimple);
 int gimple_call_flags (const_gimple);
-int gimple_call_return_flags (const_gimple);
 int gimple_call_arg_flags (const_gimple, unsigned);
-void gimple_call_reset_alias_info (gimple);
+int gimple_call_return_flags (const_gimple);
 bool gimple_assign_copy_p (gimple);
 bool gimple_assign_ssa_name_copy_p (gimple);
 bool gimple_assign_unary_nop_p (gimple);
@@ -809,35 +810,31 @@ void gimple_assign_set_rhs_with_ops_1 (gimple_stmt_iterator *, enum tree_code,
                                       tree, tree, tree);
 tree gimple_get_lhs (const_gimple);
 void gimple_set_lhs (gimple, tree);
-void gimple_replace_lhs (gimple, tree);
 gimple gimple_copy (gimple);
-gimple gimple_build_cond_from_tree (tree, tree, tree);
-void gimple_cond_set_condition_from_tree (gimple, tree);
 bool gimple_has_side_effects (const_gimple);
-bool gimple_could_trap_p (gimple);
 bool gimple_could_trap_p_1 (gimple, bool, bool);
+bool gimple_could_trap_p (gimple);
 bool gimple_assign_rhs_could_trap_p (gimple);
-bool empty_body_p (gimple_seq);
-extern void annotate_all_with_location_after (gimple_seq, gimple_stmt_iterator,
-                                             location_t);
-extern void annotate_all_with_location (gimple_seq, location_t);
+extern void dump_gimple_statistics (void);
 unsigned get_gimple_rhs_num_ops (enum tree_code);
-#define gimple_alloc(c, n) gimple_alloc_stat (c, n MEM_STAT_INFO)
-gimple gimple_alloc_stat (enum gimple_code, unsigned MEM_STAT_DECL);
-
-/* Return TRUE iff stmt is a call to a built-in function.  */
-extern bool is_gimple_builtin_call (gimple stmt);
-
 extern void recalculate_side_effects (tree);
+extern tree canonicalize_cond_expr_cond (tree);
+gimple gimple_call_copy_skip_args (gimple, bitmap);
 extern bool gimple_compare_field_offset (tree, tree);
 extern tree gimple_unsigned_type (tree);
 extern tree gimple_signed_type (tree);
 extern alias_set_type gimple_get_alias_set (tree);
 extern bool gimple_ior_addresses_taken (bitmap, gimple);
+extern bool is_gimple_builtin_call (gimple stmt);
 extern bool gimple_call_builtin_p (gimple, enum built_in_class);
 extern bool gimple_call_builtin_p (gimple, enum built_in_function);
 extern bool gimple_asm_clobbers_memory_p (const_gimple);
-extern unsigned gimple_call_get_nobnd_arg_index (const_gimple, unsigned);
+extern void dump_decl_set (FILE *, bitmap);
+extern bool nonfreeing_call_p (gimple);
+extern bool infer_nonnull_range (gimple, tree);
+extern void sort_case_labels (vec<tree> );
+extern void preprocess_case_label_vec_for_gimple (vec<tree> , tree, tree *);
+extern void gimple_seq_set_location (gimple_seq , location_t);
 
 /* Formal (expression) temporary table handling: multiple occurrences of
    the same scalar expression are evaluated into the same temporary.  */
@@ -869,27 +866,6 @@ inc_gimple_stmt_max_uid (struct function *fn)
   return fn->last_stmt_uid++;
 }
 
-/* Miscellaneous helpers.  */
-extern tree canonicalize_cond_expr_cond (tree);
-extern void dump_decl_set (FILE *, bitmap);
-extern bool nonfreeing_call_p (gimple);
-extern bool infer_nonnull_range (gimple, tree);
-
-/* In trans-mem.c.  */
-extern void diagnose_tm_safe_errors (tree);
-extern void compute_transaction_bits (void);
-extern bool is_tm_ending (gimple);
-
-/* In tree-nested.c.  */
-extern void lower_nested_functions (tree);
-extern void insert_field_into_struct (tree, tree);
-
-/* In cfgexpand.c.  */
-extern tree gimple_assign_rhs_to_tree (gimple);
-
-/* In builtins.c  */
-extern bool validate_gimple_arglist (const_gimple, ...);
-
 /* Return the first node in GIMPLE sequence S.  */
 
 static inline gimple_seq_node
@@ -954,9 +930,6 @@ gimple_seq_empty_p (gimple_seq s)
   return s == NULL;
 }
 
-extern void gimple_seq_add_stmt (gimple_seq *, gimple);
-extern void gimple_seq_add_stmt_without_update (gimple_seq *, gimple);
-
 /* Allocate a new sequence and initialize its first element with STMT.  */
 
 static inline gimple_seq
@@ -5123,8 +5096,6 @@ gimple_expr_type (const_gimple stmt)
     return void_type_node;
 }
 
-gimple gimple_call_copy_skip_args (gimple, bitmap);
-
 /* Enum and arrays used for allocation stats.  Keep in sync with
    gimple.c:gimple_alloc_kind_names.  */
 enum gimple_alloc_kind
@@ -5156,8 +5127,6 @@ gimple_alloc_kind (enum gimple_code code)
     }
 }
 
-extern void dump_gimple_statistics (void);
-
 /* Return true if a location should not be emitted for this statement
    by annotate_all_with_location.  */
 
@@ -5188,10 +5157,4 @@ gimple_set_do_not_emit_location (gimple g)
 
 #define LABEL(x) ((x) < 1024*10 ? 'b' : ((x) < 1024*1024*10 ? 'k' : 'M'))
 
-#define PERCENT(x,y) ((float)(x) * 100.0 / (float)(y))
-
-extern void sort_case_labels (vec<tree> );
-extern void preprocess_case_label_vec_for_gimple (vec<tree> , tree, tree *);
-extern void gimple_seq_set_location (gimple_seq , location_t);
-
 #endif  /* GCC_GIMPLE_H */
index 2231c77ad66ceed88654d7fdcd77ebbf15b98ee7..52878b30957183362bbb242d31143cfc592515e7 100644 (file)
@@ -97,6 +97,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-scalar-evolution.h"
 #include "ipa-utils.h"
 #include "cilk.h"
+#include "cfgexpand.h"
 
 /* Estimate runtime of function can easilly run into huge numbers with many
    nested loops.  Be sure we can compute time * INLINE_SIZE_SCALE * 2 in an
index e2fc53c4b83aa6cfe4cfe87fff9e62471d106482..8d5de21bd4bd0de5c585af2fb65badbfecea2933 100644 (file)
@@ -58,6 +58,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "omp-low.h"
 #include "gimple-low.h"
 #include "tree-cfgcleanup.h"
+#include "tree-nested.h"
 
 
 /* Lowering of OpenMP parallel and workshare constructs proceeds in two
index bf5a4484f751f8ce4a416c6d90292e5321e80e81..09f0b4d66e4d2e8a0ae11fe950285ef9e65594cb 100644 (file)
@@ -34,3 +34,6 @@
 #define PR_EXCEPTIONBLOCK      0x1000
 #define PR_HASELSE             0x2000
 #define PR_READONLY            0x4000
+
+extern void compute_transaction_bits (void);
+extern bool is_tm_ending (gimple);
index d6d5686ef159a72ad4e1902bf7927a2e0c733431..25fd7f287e0e1414a6372f5fb994147573fb9e9c 100644 (file)
@@ -28,6 +28,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "gimplify.h"
 #include "flags.h"
 #include "dumpfile.h"
+#include "cfgexpand.h"
 
 /* Extends CST as appropriate for the affine combinations COMB.  */
 
index cd3271545605ba8557d88fc45052033ce33cc563..50ccaab42fc3acd577cbbfe557636c4049ba5da7 100644 (file)
@@ -202,6 +202,4 @@ extern tree remap_decl (tree decl, copy_body_data *id);
 extern tree remap_type (tree type, copy_body_data *id);
 extern gimple_seq copy_gimple_seq_and_replace_locals (gimple_seq seq);
 
-extern HOST_WIDE_INT estimated_stack_frame_size (struct cgraph_node *);
-
 #endif /* GCC_TREE_INLINE_H */
index e7c5d50da0cd40ea32d5466b1602f6f10cd8e7a5..ee86f2cfa9ddd0e7aa79bf36155d85404b245233 100644 (file)
@@ -48,6 +48,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "diagnostic-core.h"
 #include "tree-into-ssa.h"
 
+#define PERCENT(x,y) ((float)(x) * 100.0 / (float)(y))
 
 /* This file builds the SSA form for a function as described in:
    R. Cytron, J. Ferrante, B. Rosen, M. Wegman, and K. Zadeck. Efficiently
diff --git a/gcc/tree-nested.h b/gcc/tree-nested.h
new file mode 100644 (file)
index 0000000..bfaa653
--- /dev/null
@@ -0,0 +1,27 @@
+/* Header file for Nested function decomposition for GIMPLE.
+   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_NESTED_H
+#define GCC_TREE_NESTED_H
+
+extern tree build_addr (tree, tree);
+extern void insert_field_into_struct (tree, tree);
+extern void lower_nested_functions (tree);
+
+#endif /* GCC_TREE_NESTED_H */
index 867992b6bb94f50b3f1e005b2afbc400b8d46a91..648331cc767a3b0b1dc76d52a485c2a4bc9aade3 100644 (file)
@@ -48,6 +48,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-hasher.h"
 #include "tree-parloops.h"
 #include "omp-low.h"
+#include "tree-nested.h"
 
 /* This pass tries to distribute iterations of loops into several threads.
    The implementation is straightforward -- for each loop we test whether its
index f3f97b2e0dc0b5667740cb04dc770eae325192b5..132ce0d4d13957c9bf0b02d053d81b44cd7bcffb 100644 (file)
@@ -48,6 +48,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "profile.h"
 #include "target.h"
 #include "tree-cfgcleanup.h"
+#include "tree-nested.h"
 
 static GTY(()) tree gcov_type_node;
 static GTY(()) tree tree_interval_profiler_fn;
index ad34d76e84082dce1e8ddbaa59992c29737d26c8..1c6113e6c638331d371bf280bd7afbbf8f99bd9e 100644 (file)
@@ -46,6 +46,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-affine.h"
 #include "pointer-set.h"
 #include "tree-ssa-propagate.h"
+#include "trans-mem.h"
 
 /* TODO:  Support for predicated code motion.  I.e.
 
index c97da97f6d3f00ea92421bd56dce68a3dd1bbaf8..8d81f57daf54cd5c6f1b07f146482dff47efb043 100644 (file)
@@ -209,6 +209,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-dump.h"
 #include "cfgloop.h"
 #include "tree-pass.h"
+#include "trans-mem.h"
 
 /* Describes a group of bbs with the same successors.  The successor bbs are
    cached in succs, and the successor edge flags are cached in succ_flags.
index f16e77b53f5a63494fce78031210d2022837ddb2..d2552361a66ed401e0bc4c39152c131f33334a75 100644 (file)
@@ -47,6 +47,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "tree-pass.h"
 #include "diagnostic-core.h"
 #include "cfgloop.h"
+#include "cfgexpand.h"
 
 /* Pointer map of variable mappings, keyed by edge.  */
 static struct pointer_map_t *edge_var_maps;
index 97c9c8ac37d0b84cb4ab46937a4424e9d7c6ffd5..34bc8ac73a54814611f5a631ba9f60ebdd1c5dc3 100644 (file)
@@ -12267,4 +12267,32 @@ drop_tree_overflow (tree t)
   return t;
 }
 
+/* Given a memory reference expression T, return its base address.
+   The base address of a memory reference expression is the main
+   object being referenced.  For instance, the base address for
+   'array[i].fld[j]' is 'array'.  You can think of this as stripping
+   away the offset part from a memory address.
+
+   This function calls handled_component_p to strip away all the inner
+   parts of the memory reference until it reaches the base object.  */
+
+tree
+get_base_address (tree t)
+{
+  while (handled_component_p (t))
+    t = TREE_OPERAND (t, 0);
+
+  if ((TREE_CODE (t) == MEM_REF
+       || TREE_CODE (t) == TARGET_MEM_REF)
+      && TREE_CODE (TREE_OPERAND (t, 0)) == ADDR_EXPR)
+    t = TREE_OPERAND (TREE_OPERAND (t, 0), 0);
+
+  /* ???  Either the alias oracle or all callers need to properly deal
+     with WITH_SIZE_EXPRs before we can look through those.  */
+  if (TREE_CODE (t) == WITH_SIZE_EXPR)
+    return NULL_TREE;
+
+  return t;
+}
+
 #include "gt-tree.h"
index e58b3a5c0c406eb33a8636b8cb7b2f8f757bc792..bc6699dca98a6a214b7adbddad83e8fbde3be601 100644 (file)
@@ -4597,9 +4597,6 @@ extern bool using_eh_for_cleanups_p (void);
 
 extern const char *get_tree_code_name (enum tree_code);
 
-/* In tree-nested.c */
-extern tree build_addr (tree, tree);
-
 /* In function.c */
 extern void expand_function_end (void);
 extern void expand_function_start (tree);
index 719cf9a59f0f9bf3642cc86916038452efc159f2..ad70ceaea4ab9e719abbc93bf2ed1f8f32d66afa 100644 (file)
@@ -51,6 +51,8 @@ along with GCC; see the file COPYING3.  If not see
 #include "pointer-set.h"
 #include "profile.h"
 #include "data-streamer.h"
+#include "builtins.h"
+#include "tree-nested.h"
 
 /* In this file value profile based optimizations are placed.  Currently the
    following optimizations are implemented (for more detailed descriptions