re PR tree-optimization/88945 (ICE in fold_convert_loc in FRE when using -fdump-tree-fre-details)
2019-03-18 Richard Biener <rguenther@suse.de> PR middle-end/88945 * tree-ssanames.c (release_ssa_name_fn): For released SSA names use a TREE_TYPE of error_mark_node to avoid ICEs when dumping basic-blocks that are removed. Remove restoring SSA_NAME_VAR. * tree-outof-ssa.c (eliminate_useless_phis): Remove redundant checking. From-SVN: r269765
This commit is contained in:
parent
f9cacebbde
commit
ca6d4a08c1
@ -1,3 +1,11 @@
|
||||
2019-03-18 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR middle-end/88945
|
||||
* tree-ssanames.c (release_ssa_name_fn): For released SSA names
|
||||
use a TREE_TYPE of error_mark_node to avoid ICEs when dumping
|
||||
basic-blocks that are removed. Remove restoring SSA_NAME_VAR.
|
||||
* tree-outof-ssa.c (eliminate_useless_phis): Remove redundant checking.
|
||||
|
||||
2019-03-18 Andrew Stubbs <ams@codesourcery.com>
|
||||
|
||||
* config/gcn/gcn-run.c (struct output): Make next_output unsigned.
|
||||
|
@ -809,26 +809,7 @@ eliminate_useless_phis (void)
|
||||
gphi *phi = gsi.phi ();
|
||||
result = gimple_phi_result (phi);
|
||||
if (virtual_operand_p (result))
|
||||
{
|
||||
/* There should be no arguments which are not virtual, or the
|
||||
results will be incorrect. */
|
||||
if (flag_checking)
|
||||
for (size_t i = 0; i < gimple_phi_num_args (phi); i++)
|
||||
{
|
||||
tree arg = PHI_ARG_DEF (phi, i);
|
||||
if (TREE_CODE (arg) == SSA_NAME
|
||||
&& !virtual_operand_p (arg))
|
||||
{
|
||||
fprintf (stderr, "Argument of PHI is not virtual (");
|
||||
print_generic_expr (stderr, arg, TDF_SLIM);
|
||||
fprintf (stderr, "), but the result is :");
|
||||
print_gimple_stmt (stderr, phi, 0, TDF_SLIM);
|
||||
internal_error ("SSA corruption");
|
||||
}
|
||||
}
|
||||
|
||||
remove_phi_node (&gsi, true);
|
||||
}
|
||||
remove_phi_node (&gsi, true);
|
||||
else
|
||||
{
|
||||
/* Also remove real PHIs with no uses. */
|
||||
|
@ -595,7 +595,6 @@ release_ssa_name_fn (struct function *fn, tree var)
|
||||
defining statement. */
|
||||
if (! SSA_NAME_IN_FREE_LIST (var))
|
||||
{
|
||||
tree saved_ssa_name_var = SSA_NAME_VAR (var);
|
||||
int saved_ssa_name_version = SSA_NAME_VERSION (var);
|
||||
use_operand_p imm = &(SSA_NAME_IMM_USE_NODE (var));
|
||||
|
||||
@ -621,13 +620,14 @@ release_ssa_name_fn (struct function *fn, tree var)
|
||||
/* Restore the version number. */
|
||||
SSA_NAME_VERSION (var) = saved_ssa_name_version;
|
||||
|
||||
/* Hopefully this can go away once we have the new incremental
|
||||
SSA updating code installed. */
|
||||
SET_SSA_NAME_VAR_OR_IDENTIFIER (var, saved_ssa_name_var);
|
||||
|
||||
/* Note this SSA_NAME is now in the first list. */
|
||||
SSA_NAME_IN_FREE_LIST (var) = 1;
|
||||
|
||||
/* Put in a non-NULL TREE_TYPE so dumping code will not ICE
|
||||
if it happens to come along a released SSA name and tries
|
||||
to inspect its type. */
|
||||
TREE_TYPE (var) = error_mark_node;
|
||||
|
||||
/* And finally queue it so that it will be put on the free list. */
|
||||
vec_safe_push (FREE_SSANAMES_QUEUE (fn), var);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user