diff options
author | Michael Matz <matz@gcc.gnu.org> | 2009-11-24 15:37:32 +0000 |
---|---|---|
committer | Michael Matz <matz@gcc.gnu.org> | 2009-11-24 15:37:32 +0000 |
commit | a5883ba0de68efad36db145e75c86394d8bd44ea (patch) | |
tree | b906ae87996cd4f2fdf60f2a50c3cbf838d510f2 /gcc/cfgexpand.c | |
parent | 6e0b03f5855ae33c0e25d723c5cfc0f2dbc6698f (diff) | |
download | gcc-a5883ba0de68efad36db145e75c86394d8bd44ea.zip gcc-a5883ba0de68efad36db145e75c86394d8bd44ea.tar.gz gcc-a5883ba0de68efad36db145e75c86394d8bd44ea.tar.bz2 |
tree.h (union tree_ann_d): Don't declare.
* tree.h (union tree_ann_d): Don't declare.
(tree_base): Remove ann field.
(struct var_ann_d): Declare forward.
(tree_result_decl, tree_parm_decl, tree_var_decl): Add ann field.
(DECL_VAR_ANN_PTR): New macro.
* tree-dfa.c (create_var_ann): Rewrite in terms of above macro,
accept only VAR, PARM or RESULT decls.
(create_tree_common_ann): Remove.
(remove_referenced_var): Use DECL_VAR_ANN_PTR.
* tree-eh.c (lookup_expr_eh_lp): Remove.
* tree-flow-inline.h (var_ann, get_var_ann): Rewrite in terms of
DECL_VAR_ANN_PTR.
(ann_type, tree_common_ann, get_tree_common_ann): Remove.
* tree-flow.h (enum tree_ann_type): Remove.
(struct tree_ann_common_d): Remove.
(struct var_ann_d): Remove common field.
(union tree_ann_d): Remove.
(tree_ann_t, tree_ann_common_t): Remove typedefs.
(tree_common_ann, get_tree_common_ann, ann_type,
create_tree_common_ann, lookup_expr_eh_lp): Don't declare.
* tree-ssa.c (delete_tree_ssa): Use DECL_VAR_ANN_PTR.
* tree.c (copy_node_stat): Use DECL_VAR_ANN_PTR.
* builtins.c (expand_builtin_memcpy): Use
currently_expanding_gimple_stmt instead of tree annotation.
(expand_builtin_memset_args): Ditto.
* cfgexpand.c (currently_expanding_gimple_stmt): Add global variable.
(expand_call_stmt): Don't set tree annotation.
(expand_gimple_basic_block): Set currently_expanding_gimple_stmt.
* expr.c (expand_expr_real): Don't call lookup_expr_eh_lp.
* gimple.h (currently_expanding_gimple_stmt): Declare.
From-SVN: r154502
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index c9e1f1a..3f7b1d2 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -49,6 +49,10 @@ along with GCC; see the file COPYING3. If not see into RTL. */ struct ssaexpand SA; +/* This variable holds the currently expanded gimple statement for purposes + of comminucating the profile info to the builtin expanders. */ +gimple currently_expanding_gimple_stmt; + /* Return an expression tree corresponding to the RHS of GIMPLE statement STMT. */ @@ -1756,7 +1760,6 @@ expand_call_stmt (gimple stmt) { tree exp; tree lhs = gimple_call_lhs (stmt); - tree fndecl = gimple_call_fndecl (stmt); size_t i; exp = build_vl_exp (CALL_EXPR, gimple_call_num_args (stmt) + 3); @@ -1782,15 +1785,6 @@ expand_call_stmt (gimple stmt) SET_EXPR_LOCATION (exp, gimple_location (stmt)); TREE_BLOCK (exp) = gimple_block (stmt); - /* Record the original call statement, as it may be used - to retrieve profile information during expansion. */ - - if (fndecl && DECL_BUILT_IN (fndecl)) - { - tree_ann_common_t ann = get_tree_common_ann (exp); - ann->stmt = stmt; - } - if (lhs) expand_assignment (lhs, exp, false); else @@ -3106,6 +3100,7 @@ expand_gimple_basic_block (basic_block bb) basic_block new_bb; stmt = gsi_stmt (gsi); + currently_expanding_gimple_stmt = stmt; /* Expand this statement, then evaluate the resulting RTL and fixup the CFG accordingly. */ @@ -3203,6 +3198,8 @@ expand_gimple_basic_block (basic_block bb) } } + currently_expanding_gimple_stmt = NULL; + /* Expand implicit goto and convert goto_locus. */ FOR_EACH_EDGE (e, ei, bb->succs) { |