summaryrefslogtreecommitdiff
path: root/gcc/tree-into-ssa.c
diff options
context:
space:
mode:
authorcrowl <crowl@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-01 21:02:15 +0000
committercrowl <crowl@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-01 21:02:15 +0000
commit0d21196387a8566f0b98f35adc355932393b670e (patch)
tree6a2b07bcbe69d6025168367c7ef581e376cca84c /gcc/tree-into-ssa.c
parent41f4033b94a7a17e766e29386542f087ae0e2dfa (diff)
downloadgcc-0d21196387a8566f0b98f35adc355932393b670e.tar.gz
This patch renames sbitmap iterators to unify them with the bitmap iterators.
Remove the unused EXECUTE_IF_SET_IN_SBITMAP_REV, which has an unconventional interface. Rename the sbitmap_iter_* functions to match bitmap's bmp_iter_* functions. Add an additional parameter to the initialization and next functions to match the interface in bmp_iter_*. This extra parameter is mostly hidden by the use of the EXECUTE_IF macros. Rename the EXECUTE_IF_SET_IN_SBITMAP macro to EXECUTE_IF_SET_IN_BITMAP. Its implementation is now identical to that in bitmap.h. To prevent redefinition errors, both definitions are now guarded by #ifndef. An alternate strategy is to simply include bitmap.h from sbitmap.h. As this would increase build time, I have elected to use the #ifndef version. I do not have a strong preference here. The sbitmap_iterator type is still distinctly named because it is often declared in contexts where the bitmap type is not obvious. There are less than 40 uses of this type, so the burden to modify it when changing bitmap types is not large. Tested on x86-64, config-list.mk testing. Index: gcc/ChangeLog 2012-10-31 Lawrence Crowl <crowl@google.com> * sbitmap.h (sbitmap_iter_init): Rename bmp_iter_set_init and add unused parameter to match bitmap iterator. Update callers. (sbitmap_iter_cond): Rename bmp_iter_set. Update callers. (sbitmap_iter_next): Rename bmp_iter_next and add unused parameter to match bitmap iterator. Update callers. (EXECUTE_IF_SET_IN_SBITMAP_REV): Remove unused. (EXECUTE_IF_SET_IN_SBITMAP): Rename EXECUTE_IF_SET_IN_BITMAP and adjust to be identical to the definition in bitmap.h. Conditionalize the definition based on not having been defined. Update callers. * bitmap.h (EXECUTE_IF_SET_IN_BITMAP): Conditionalize the definition based on not having been defined. (To match the above.) git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193069 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-into-ssa.c')
-rw-r--r--gcc/tree-into-ssa.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/tree-into-ssa.c b/gcc/tree-into-ssa.c
index 3098e1f1ffc..c5789663f8a 100644
--- a/gcc/tree-into-ssa.c
+++ b/gcc/tree-into-ssa.c
@@ -2673,12 +2673,12 @@ prepare_names_to_update (bool insert_phi_p)
/* First process names in NEW_SSA_NAMES. Otherwise, uses of old
names may be considered to be live-in on blocks that contain
definitions for their replacements. */
- EXECUTE_IF_SET_IN_SBITMAP (new_ssa_names, 0, i, sbi)
+ EXECUTE_IF_SET_IN_BITMAP (new_ssa_names, 0, i, sbi)
prepare_def_site_for (ssa_name (i), insert_phi_p);
/* If an old name is in NAMES_TO_RELEASE, we cannot remove it from
OLD_SSA_NAMES, but we have to ignore its definition site. */
- EXECUTE_IF_SET_IN_SBITMAP (old_ssa_names, 0, i, sbi)
+ EXECUTE_IF_SET_IN_BITMAP (old_ssa_names, 0, i, sbi)
{
if (names_to_release == NULL || !bitmap_bit_p (names_to_release, i))
prepare_def_site_for (ssa_name (i), insert_phi_p);
@@ -2738,7 +2738,7 @@ dump_update_ssa (FILE *file)
fprintf (file, "N_i -> { O_1 ... O_j } means that N_i replaces "
"O_1, ..., O_j\n\n");
- EXECUTE_IF_SET_IN_SBITMAP (new_ssa_names, 0, i, sbi)
+ EXECUTE_IF_SET_IN_BITMAP (new_ssa_names, 0, i, sbi)
dump_names_replaced_by (file, ssa_name (i));
}
@@ -3242,7 +3242,7 @@ update_ssa (unsigned update_flags)
for traversal. */
sbitmap tmp = sbitmap_alloc (SBITMAP_SIZE (old_ssa_names));
bitmap_copy (tmp, old_ssa_names);
- EXECUTE_IF_SET_IN_SBITMAP (tmp, 0, i, sbi)
+ EXECUTE_IF_SET_IN_BITMAP (tmp, 0, i, sbi)
insert_updated_phi_nodes_for (ssa_name (i), dfs, blocks_to_update,
update_flags);
sbitmap_free (tmp);
@@ -3266,7 +3266,7 @@ update_ssa (unsigned update_flags)
/* Reset the current definition for name and symbol before renaming
the sub-graph. */
- EXECUTE_IF_SET_IN_SBITMAP (old_ssa_names, 0, i, sbi)
+ EXECUTE_IF_SET_IN_BITMAP (old_ssa_names, 0, i, sbi)
get_ssa_name_ann (ssa_name (i))->info.current_def = NULL_TREE;
FOR_EACH_VEC_ELT (tree, symbols_to_rename, i, sym)