mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-23 19:03:59 +08:00
gimple.h: Reorder prototypes to match .c declaration order...
* 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
This commit is contained in:
parent
fd4da58cd8
commit
1fe37220af
@ -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.
|
||||
|
@ -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
|
||||
|
26
gcc/cfgexpand.h
Normal file
26
gcc/cfgexpand.h
Normal file
@ -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 */
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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. */
|
||||
|
@ -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:
|
||||
|
33
gcc/gimple.c
33
gcc/gimple.c
@ -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)
|
||||
{
|
||||
|
119
gcc/gimple.h
119
gcc/gimple.h
@ -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 */
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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. */
|
||||
|
||||
|
@ -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 */
|
||||
|
@ -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
|
||||
|
27
gcc/tree-nested.h
Normal file
27
gcc/tree-nested.h
Normal file
@ -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 */
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
|
28
gcc/tree.c
28
gcc/tree.c
@ -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"
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user