[PATCH][alias-improvements] More fixme removals
Richard Guenther
rguenther@suse.de
Fri Jan 30 16:00:00 GMT 2009
We only verify if SSA_NAME_DEF_STMT is correct for each SSA_NAME, we
do not do it for each def on a stmt. Adding that uncovered a
ipa-struct-reorg problem.
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to the
branch.
Richard.
2009-01-30 Richard Guenther <rguenther@suse.de>
* tree-ssa.c (verify_ssa): Verify that all stmts definitions
have the stmt as SSA_NAME_DEF_STMT.
* tree-inline.c (expand_call_inline): Unlink the virtual
operands of the call statement. Remove duplicate stmt updating.
* ipa-struct-reorg.c (create_general_new_stmt): Clear vops.
Index: gcc/tree-ssa.c
===================================================================
*** gcc/tree-ssa.c.orig 2009-01-30 14:07:44.000000000 +0100
--- gcc/tree-ssa.c 2009-01-30 14:07:54.000000000 +0100
*************** verify_ssa (bool check_modified_stmt)
*** 674,680 ****
}
FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_ALL_DEFS)
! bitmap_set_bit (names_defined_in_bb, SSA_NAME_VERSION (op));
}
bitmap_clear (names_defined_in_bb);
--- 674,692 ----
}
FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_ALL_DEFS)
! {
! if (SSA_NAME_DEF_STMT (op) != stmt)
! {
! error ("SSA_NAME_DEF_STMT is wrong");
! fprintf (stderr, "Expected definition statement:\n");
! print_gimple_stmt (stderr, stmt, 4, TDF_VOPS);
! fprintf (stderr, "\nActual definition statement:\n");
! print_gimple_stmt (stderr, SSA_NAME_DEF_STMT (op),
! 4, TDF_VOPS);
! goto err;
! }
! bitmap_set_bit (names_defined_in_bb, SSA_NAME_VERSION (op));
! }
}
bitmap_clear (names_defined_in_bb);
Index: gcc/tree-inline.c
===================================================================
*** gcc/tree-inline.c.orig 2009-01-30 14:07:44.000000000 +0100
--- gcc/tree-inline.c 2009-01-30 15:09:45.000000000 +0100
*************** expand_call_inline (basic_block bb, gimp
*** 3333,3338 ****
--- 3333,3341 ----
pointer_map_destroy (id->decl_map);
id->decl_map = st;
+ /* Unlink the calls virtual operands before replacing it. */
+ unlink_stmt_vdef (stmt);
+
/* If the inlined function returns a result that we care about,
substitute the GIMPLE_CALL with an assignment of the return
variable to the LHS of the call. That is, if STMT was
*************** expand_call_inline (basic_block bb, gimp
*** 3343,3352 ****
stmt = gimple_build_assign (gimple_call_lhs (stmt), use_retvar);
gsi_replace (&stmt_gsi, stmt, false);
if (gimple_in_ssa_p (cfun))
! {
! update_stmt (stmt);
! mark_symbols_for_renaming (stmt);
! }
maybe_clean_or_replace_eh_stmt (old_stmt, stmt);
}
else
--- 3346,3352 ----
stmt = gimple_build_assign (gimple_call_lhs (stmt), use_retvar);
gsi_replace (&stmt_gsi, stmt, false);
if (gimple_in_ssa_p (cfun))
! mark_symbols_for_renaming (stmt);
maybe_clean_or_replace_eh_stmt (old_stmt, stmt);
}
else
*************** expand_call_inline (basic_block bb, gimp
*** 3366,3372 ****
undefined via a move. */
stmt = gimple_build_assign (gimple_call_lhs (stmt), def);
gsi_replace (&stmt_gsi, stmt, true);
- update_stmt (stmt);
}
else
{
--- 3366,3371 ----
*************** expand_call_inline (basic_block bb, gimp
*** 3404,3412 ****
id->block = NULL_TREE;
successfully_inlined = TRUE;
- /* ??? This should not be necessary if we update stmts correctly. */
- if (gimple_in_ssa_p (cfun))
- mark_sym_for_renaming (gimple_vop (cfun));
egress:
input_location = saved_location;
--- 3403,3408 ----
More information about the Gcc-patches
mailing list