aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2007-01-02 22:36:17 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2007-01-02 21:36:17 +0000
commited1a2abdb1d015e4136c5a316e7db0e4a886f0d8 (patch)
treefaab110cd64d099e949c3f2a8835e76ece2eed5e /gcc
parentde6bd996eb3b39713d4448716c9412b0e5b186c6 (diff)
downloadgcc-ed1a2abdb1d015e4136c5a316e7db0e4a886f0d8.zip
gcc-ed1a2abdb1d015e4136c5a316e7db0e4a886f0d8.tar.gz
gcc-ed1a2abdb1d015e4136c5a316e7db0e4a886f0d8.tar.bz2
tree-mudflap.c (mf_decl_cache_locals, [...]): Do not add referenced vars.
* tree-mudflap.c (mf_decl_cache_locals, mf_build_check_statement_for): Do not add referenced vars. * tree-cfg.c (update_modified_stmts): Do not update when SSA operands are not active. * passes.c (init_optimization_passes): Put mudflap_2 after free_datastructures. From-SVN: r120358
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/passes.c2
-rw-r--r--gcc/tree-cfg.c2
-rw-r--r--gcc/tree-mudflap.c7
4 files changed, 12 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4a37568..31d6001 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,14 @@
2007-01-02 Jan Hubicka <jh@suse.cz>
+ * tree-mudflap.c (mf_decl_cache_locals, mf_build_check_statement_for):
+ Do not add referenced vars.
+ * tree-cfg.c (update_modified_stmts): Do not update when SSA operands
+ are not active.
+ * passes.c (init_optimization_passes): Put mudflap_2 after
+ free_datastructures.
+
+2007-01-02 Jan Hubicka <jh@suse.cz>
+
* tree-optimize (execute_fixup_cfg): Set after_inlining flag.
Set NOTHROW flag on call statements proved to be nothrow.
Update statement of local calls so new pure/const functions are
diff --git a/gcc/passes.c b/gcc/passes.c
index 4588421..ebf5586 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -476,8 +476,8 @@ init_optimization_passes (void)
NEXT_PASS (pass_expand_omp);
NEXT_PASS (pass_all_optimizations);
NEXT_PASS (pass_warn_function_noreturn);
- NEXT_PASS (pass_mudflap_2);
NEXT_PASS (pass_free_datastructures);
+ NEXT_PASS (pass_mudflap_2);
NEXT_PASS (pass_free_cfg_annotations);
NEXT_PASS (pass_expand);
NEXT_PASS (pass_rest_of_compilation);
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 51c0d26..1803907 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -2803,6 +2803,8 @@ bsi_for_stmt (tree stmt)
static inline void
update_modified_stmts (tree t)
{
+ if (!ssa_operands_active ())
+ return;
if (TREE_CODE (t) == STATEMENT_LIST)
{
tree_stmt_iterator i;
diff --git a/gcc/tree-mudflap.c b/gcc/tree-mudflap.c
index 209dc00..4d80c19 100644
--- a/gcc/tree-mudflap.c
+++ b/gcc/tree-mudflap.c
@@ -460,14 +460,12 @@ mf_decl_cache_locals (void)
globals into the cache variables. */
t = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (mf_cache_shift_decl_l),
mf_cache_shift_decl_l, mf_cache_shift_decl);
- add_referenced_var (mf_cache_shift_decl);
SET_EXPR_LOCATION (t, DECL_SOURCE_LOCATION (current_function_decl));
gimplify_to_stmt_list (&t);
shift_init_stmts = t;
t = build2 (GIMPLE_MODIFY_STMT, TREE_TYPE (mf_cache_mask_decl_l),
mf_cache_mask_decl_l, mf_cache_mask_decl);
- add_referenced_var (mf_cache_mask_decl);
SET_EXPR_LOCATION (t, DECL_SOURCE_LOCATION (current_function_decl));
gimplify_to_stmt_list (&t);
mask_init_stmts = t;
@@ -573,17 +571,13 @@ mf_build_check_statement_for (tree base, tree limit,
& __mf_mask]. */
t = build2 (RSHIFT_EXPR, mf_uintptr_type, mf_base,
(flag_mudflap_threads ? mf_cache_shift_decl : mf_cache_shift_decl_l));
- add_referenced_var (mf_cache_shift_decl);
t = build2 (BIT_AND_EXPR, mf_uintptr_type, t,
(flag_mudflap_threads ? mf_cache_mask_decl : mf_cache_mask_decl_l));
- add_referenced_var (mf_cache_mask_decl);
t = build4 (ARRAY_REF,
TREE_TYPE (TREE_TYPE (mf_cache_array_decl)),
mf_cache_array_decl, t, NULL_TREE, NULL_TREE);
- add_referenced_var (mf_cache_array_decl);
t = build1 (ADDR_EXPR, mf_cache_structptr_type, t);
t = build2 (GIMPLE_MODIFY_STMT, void_type_node, mf_elem, t);
- add_referenced_var (mf_elem);
SET_EXPR_LOCUS (t, locus);
gimplify_to_stmt_list (&t);
tsi_link_after (&tsi, t, TSI_CONTINUE_LINKING);
@@ -607,7 +601,6 @@ mf_build_check_statement_for (tree base, tree limit,
build1 (INDIRECT_REF, mf_cache_struct_type, mf_elem),
TYPE_FIELDS (mf_cache_struct_type), NULL_TREE);
t = build2 (GT_EXPR, boolean_type_node, t, mf_base);
- add_referenced_var (mf_base);
/* Construct '__mf_elem->high < __mf_limit'.