aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2021-10-13 13:42:22 +0200
committerRichard Biener <rguenther@suse.de>2021-10-13 15:12:43 +0200
commit489c8f27296362dcfbc967aecef17ba7c5cab0f2 (patch)
tree3715aaa30654be1c67d3969cf5356d985828e8e4 /gcc/tree-ssa.c
parente415bc4c035b1b655cf2cafcbe515382d1cefc93 (diff)
downloadgcc-489c8f27296362dcfbc967aecef17ba7c5cab0f2.zip
gcc-489c8f27296362dcfbc967aecef17ba7c5cab0f2.tar.gz
gcc-489c8f27296362dcfbc967aecef17ba7c5cab0f2.tar.bz2
Add GSI_LAST_NEW_STMT iterator update
Currently when adding a sequence before there's no way to get the iterator placed at the last added stmt which results in convoluted code in the if-conversion usecase. The following adds GSI_LAST_NEW_STMT and corrects one obvious mistake in execute_update_addresses_taken as well as tries to avoid the just filed PR102726 by biasing the enum values to be outside of the boolean 0/1 range. 2021-10-13 Richard Biener <rguenther@suse.de> * gimple-iterator.h (gsi_iterator_update): Add GSI_LAST_NEW_STMT, start at integer value 2. * gimple-iterator.c (gsi_insert_seq_nodes_before): Update the iterator for GSI_LAST_NEW_STMT. (gsi_insert_seq_nodes_after): Likewise. * tree-if-conv.c (predicate_statements): Use GSI_LAST_NEW_STMT. * tree-ssa.c (execute_update_addresses_taken): Correct bogus arguments to gsi_replace.
Diffstat (limited to 'gcc/tree-ssa.c')
-rw-r--r--gcc/tree-ssa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index 0fba404..fde13de 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -2079,7 +2079,7 @@ execute_update_addresses_taken (void)
gcall *call
= gimple_build_call_internal (IFN_ASAN_POISON, 0);
gimple_call_set_lhs (call, var);
- gsi_replace (&gsi, call, GSI_SAME_STMT);
+ gsi_replace (&gsi, call, true);
}
else
{
@@ -2088,7 +2088,7 @@ execute_update_addresses_taken (void)
previous out of scope value. */
tree clobber = build_clobber (TREE_TYPE (var));
gimple *g = gimple_build_assign (var, clobber);
- gsi_replace (&gsi, g, GSI_SAME_STMT);
+ gsi_replace (&gsi, g, true);
}
continue;
}