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.)

From-SVN: r193069
This commit is contained in:
Lawrence Crowl 2012-11-01 21:02:15 +00:00 committed by Lawrence Crowl
parent 0dd4969120
commit d4ac4ce2d3
19 changed files with 172 additions and 140 deletions

View File

@ -1,90 +1,131 @@
FAIL: g++.dg/torture/pr46154.C -O3 -fomit-frame-pointer (internal compiler error)
FAIL: g++.dg/torture/pr46154.C -O2 -flto -fno-use-linker-plugin -flto-partition=none (internal compiler error)
FAIL: g++.dg/torture/pr46154.C -O3 -g (internal compiler error)
FAIL: g++.dg/torture/pr46154.C -O2 -flto -fno-use-linker-plugin -flto-partition=none (test for excess errors)
FAIL: g++.dg/torture/pr46154.C -O3 -g (test for excess errors)
FAIL: g++.dg/torture/pr46154.C -O3 -fomit-frame-pointer (test for excess errors)
FAIL: g++.dg/torture/pr46154.C -O2 (test for excess errors)
FAIL: g++.dg/torture/pr46154.C -O2 (internal compiler error)
FAIL: g++.dg/tree-ssa/pr45453.C -std=gnu++98 (test for excess errors)
UNRESOLVED: g++.dg/tree-ssa/pr45453.C -std=gnu++11 scan-tree-dump-times optimized "OBJ_TYPE_REF" 1
UNRESOLVED: g++.dg/tree-ssa/pr45453.C -std=gnu++98 scan-tree-dump-times optimized "OBJ_TYPE_REF" 1
FAIL: g++.dg/tree-ssa/pr45453.C -std=gnu++11 (test for excess errors)
FAIL: gcc.dg/attr-weakref-1.c (test for excess errors)
FAIL: g++.dg/other/anon5.C -std=gnu++98 (test for excess errors)
FAIL: g++.dg/other/anon5.C -std=gnu++11 (test for excess errors)
FAIL: gcc.c-torture/compile/pr44119.c -Os (test for excess errors)
FAIL: gcc.c-torture/compile/pr44119.c -O3 -fomit-frame-pointer (internal compiler error)
FAIL: gcc.c-torture/compile/pr44119.c -O3 -fomit-frame-pointer -funroll-loops (test for excess errors)
FAIL: gcc.c-torture/compile/pr44119.c -O2 -flto -flto-partition=none (internal compiler error)
FAIL: gcc.c-torture/compile/pr44119.c -O2 -flto -flto-partition=none (test for excess errors)
FAIL: gcc.c-torture/compile/pr44119.c -O2 (test for excess errors)
FAIL: gcc.c-torture/compile/pr44119.c -O2 -flto (internal compiler error)
FAIL: gcc.c-torture/compile/pr44119.c -O3 -g (internal compiler error)
FAIL: gcc.c-torture/compile/pr44119.c -O2 -flto (test for excess errors)
FAIL: gcc.c-torture/compile/pr44119.c -O1 (test for excess errors)
FAIL: gcc.c-torture/compile/pr44119.c -O3 -fomit-frame-pointer (test for excess errors)
FAIL: gcc.c-torture/compile/pr44119.c -O3 -g (test for excess errors)
FAIL: gcc.c-torture/compile/pr44119.c -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions (test for excess errors)
FAIL: gcc.c-torture/compile/pr44119.c -O2 (internal compiler error)
FAIL: gcc.c-torture/compile/pr44119.c -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions (internal compiler error)
FAIL: gcc.c-torture/compile/pr44119.c -Os (internal compiler error)
FAIL: gcc.c-torture/compile/pr44119.c -O1 (internal compiler error)
FAIL: gcc.c-torture/compile/pr44119.c -O3 -fomit-frame-pointer -funroll-loops (internal compiler error)
UNRESOLVED: gcc.dg/attr-weakref-1.c compilation failed to produce executable
FAIL: gcc.dg/attr-weakref-1.c (test for excess errors)
FAIL: gcc.dg/autopar/pr49960.c scan-tree-dump-times optimized "loopfn" 0
FAIL: gcc.dg/autopar/pr49960.c scan-tree-dump-times parloops "SUCCESS: may be parallelized" 0
FAIL: gcc.dg/builtin-object-size-8.c execution test
FAIL: gcc.dg/graphite/pr42521.c (internal compiler error)
FAIL: gcc.dg/graphite/pr42521.c (test for excess errors)
FAIL: gcc.dg/graphite/pr42771.c (internal compiler error)
FAIL: gcc.dg/graphite/pr42771.c (test for excess errors)
XPASS: gcc.dg/guality/example.c -O2 -flto -fno-use-linker-plugin -flto-partition=none execution test
FAIL: gcc.dg/cproj-fails-with-broken-glibc.c execution test
XPASS: gcc.dg/guality/example.c -O2 execution test
XPASS: gcc.dg/guality/example.c -O2 -flto execution test
XPASS: gcc.dg/guality/example.c -O0 execution test
XPASS: gcc.dg/guality/guality.c -O2 execution test
XPASS: gcc.dg/guality/example.c -O2 -flto -flto-partition=none execution test
XPASS: gcc.dg/guality/guality.c -O2 -flto -flto-partition=none execution test
XPASS: gcc.dg/guality/guality.c -O3 -fomit-frame-pointer execution test
XPASS: gcc.dg/guality/guality.c -O1 execution test
XPASS: gcc.dg/guality/guality.c -O0 execution test
XPASS: gcc.dg/guality/guality.c -O3 -g execution test
XPASS: gcc.dg/guality/guality.c -O2 -flto -fno-use-linker-plugin -flto-partition=none execution test
XPASS: gcc.dg/guality/guality.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects execution test
XPASS: gcc.dg/guality/guality.c -Os execution test
XPASS: gcc.dg/guality/guality.c -O2 -flto execution test
XPASS: gcc.dg/guality/guality.c -O2 execution test
XPASS: gcc.dg/guality/guality.c -O1 execution test
XPASS: gcc.dg/guality/inline-params.c -O2 execution test
XPASS: gcc.dg/guality/inline-params.c -O3 -g execution test
XPASS: gcc.dg/guality/inline-params.c -O2 -flto -fno-use-linker-plugin -flto-partition=none execution test
XPASS: gcc.dg/guality/inline-params.c -O3 -fomit-frame-pointer execution test
XPASS: gcc.dg/guality/inline-params.c -O2 -flto execution test
XPASS: gcc.dg/guality/inline-params.c -Os execution test
XPASS: gcc.dg/guality/inline-params.c -O3 -g execution test
XPASS: gcc.dg/guality/inline-params.c -O2 -flto -flto-partition=none execution test
XPASS: gcc.dg/guality/pr41353-1.c -O3 -g line 28 j == 28 + 37
XPASS: gcc.dg/guality/pr41353-1.c -O1 line 28 j == 28 + 37
XPASS: gcc.dg/guality/pr41353-1.c -O2 -flto -flto-partition=none line 28 j == 28 + 37
XPASS: gcc.dg/guality/pr41353-1.c -O2 line 28 j == 28 + 37
XPASS: gcc.dg/guality/pr41353-1.c -O2 -flto line 28 j == 28 + 37
XPASS: gcc.dg/guality/pr41353-1.c -Os line 28 j == 28 + 37
XPASS: gcc.dg/guality/pr41353-1.c -O3 -fomit-frame-pointer line 28 j == 28 + 37
XPASS: gcc.dg/guality/pr41353-1.c -O0 line 28 j == 28 + 37
XPASS: gcc.dg/guality/pr41447-1.c -O1 execution test
XPASS: gcc.dg/guality/pr41447-1.c -O3 -fomit-frame-pointer execution test
XPASS: gcc.dg/guality/pr41447-1.c -Os execution test
XPASS: gcc.dg/guality/pr41447-1.c -O2 execution test
XPASS: gcc.dg/guality/pr41447-1.c -O3 -g execution test
XPASS: gcc.dg/guality/pr41447-1.c -O3 -fomit-frame-pointer execution test
XPASS: gcc.dg/guality/pr41447-1.c -O0 execution test
XPASS: gcc.dg/guality/pr41447-1.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects execution test
XPASS: gcc.dg/guality/pr41616-1.c -O1 execution test
XPASS: gcc.dg/guality/pr41616-1.c -O3 -fomit-frame-pointer execution test
XPASS: gcc.dg/guality/pr41447-1.c -O3 -g execution test
XPASS: gcc.dg/guality/pr41616-1.c -O2 -flto -flto-partition=none execution test
XPASS: gcc.dg/guality/pr41616-1.c -O0 execution test
XPASS: gcc.dg/guality/pr41616-1.c -O2 -flto -fno-use-linker-plugin -flto-partition=none execution test
XPASS: gcc.dg/guality/pr41616-1.c -O2 execution test
XPASS: gcc.dg/guality/pr41616-1.c -O3 -fomit-frame-pointer execution test
XPASS: gcc.dg/guality/pr41616-1.c -O3 -g execution test
XPASS: gcc.dg/guality/pr41616-1.c -O1 execution test
XPASS: gcc.dg/guality/pr41616-1.c -Os execution test
XPASS: gcc.dg/guality/pr41616-1.c -O2 execution test
XPASS: gcc.dg/guality/pr41616-1.c -O2 -flto execution test
FAIL: gcc.dg/guality/pr54200.c -Os line 20 z == 3
FAIL: gcc.dg/guality/pr54519-1.c -O2 -flto -flto-partition=none line 23 y == 117
FAIL: gcc.dg/guality/pr54519-1.c -O2 -flto line 20 y == 25
FAIL: gcc.dg/guality/pr54519-1.c -O2 -flto line 23 z == 8
FAIL: gcc.dg/guality/pr54519-1.c -O2 -flto line 20 z == 6
FAIL: gcc.dg/guality/pr54519-1.c -O2 -flto -flto-partition=none line 23 z == 8
FAIL: gcc.dg/guality/pr54519-1.c -O2 -flto line 23 y == 117
FAIL: gcc.dg/guality/pr54519-1.c -O2 -flto -flto-partition=none line 20 z == 6
FAIL: gcc.dg/guality/pr54519-1.c -O2 -flto -flto-partition=none line 20 y == 25
FAIL: gcc.dg/guality/pr54519-2.c -O2 -flto -flto-partition=none line 17 y == 25
FAIL: gcc.dg/guality/pr54519-2.c -O2 -flto line 17 y == 25
FAIL: gcc.dg/guality/pr54519-5.c -O2 -flto line 17 y == 25
FAIL: gcc.dg/guality/pr54519-5.c -O2 -flto -flto-partition=none line 17 y == 25
FAIL: gcc.dg/guality/pr54519-5.c -Os line 17 y == 25
FAIL: gcc.dg/guality/pr54519-5.c -O3 -fomit-frame-pointer line 17 y == 25
FAIL: gcc.dg/guality/pr54519-5.c -O2 line 17 y == 25
FAIL: gcc.dg/guality/pr54519-5.c -O3 -g line 17 y == 25
FAIL: gcc.dg/guality/vla-1.c -O2 -flto line 24 sizeof (a) == 17 * sizeof (short)
FAIL: gcc.dg/guality/vla-1.c -O2 -flto line 17 sizeof (a) == 6
FAIL: gcc.dg/guality/vla-1.c -O3 -g line 24 sizeof (a) == 17 * sizeof (short)
FAIL: gcc.dg/guality/vla-1.c -O3 -fomit-frame-pointer line 24 sizeof (a) == 17 * sizeof (short)
FAIL: gcc.dg/guality/vla-1.c -O1 line 24 sizeof (a) == 17 * sizeof (short)
FAIL: gcc.dg/guality/vla-1.c -Os line 17 sizeof (a) == 6
FAIL: gcc.dg/guality/vla-1.c -O2 -flto -flto-partition=none line 17 sizeof (a) == 6
FAIL: gcc.dg/guality/vla-1.c -O2 line 17 sizeof (a) == 6
FAIL: gcc.dg/guality/vla-1.c -O3 -fomit-frame-pointer line 17 sizeof (a) == 6
FAIL: gcc.dg/guality/vla-1.c -O0 line 24 sizeof (a) == 17 * sizeof (short)
FAIL: gcc.dg/guality/vla-1.c -O2 -flto -flto-partition=none line 24 sizeof (a) == 17 * sizeof (short)
FAIL: gcc.dg/guality/vla-1.c -O2 line 24 sizeof (a) == 17 * sizeof (short)
FAIL: gcc.dg/guality/vla-1.c -O1 line 17 sizeof (a) == 6
FAIL: gcc.dg/guality/vla-1.c -O3 -g line 17 sizeof (a) == 6
FAIL: gcc.dg/guality/vla-1.c -O0 line 17 sizeof (a) == 6
FAIL: gcc.dg/guality/vla-1.c -Os line 24 sizeof (a) == 17 * sizeof (short)
FAIL: gcc.dg/guality/vla-2.c -O3 -g line 25 sizeof (a) == 6 * sizeof (int)
FAIL: gcc.dg/guality/vla-2.c -O0 line 25 sizeof (a) == 6 * sizeof (int)
FAIL: gcc.dg/guality/vla-2.c -O0 line 16 sizeof (a) == 5 * sizeof (int)
FAIL: gcc.dg/guality/vla-2.c -O3 -fomit-frame-pointer line 16 sizeof (a) == 5 * sizeof (int)
FAIL: gcc.dg/guality/vla-2.c -O2 -flto line 25 sizeof (a) == 6 * sizeof (int)
FAIL: gcc.dg/guality/vla-2.c -Os line 25 sizeof (a) == 6 * sizeof (int)
FAIL: gcc.dg/guality/vla-2.c -O2 line 16 sizeof (a) == 5 * sizeof (int)
FAIL: gcc.dg/guality/vla-2.c -O1 line 25 sizeof (a) == 6 * sizeof (int)
FAIL: gcc.dg/guality/vla-2.c -O2 -flto line 16 sizeof (a) == 5 * sizeof (int)
FAIL: gcc.dg/guality/vla-2.c -O3 -g line 16 sizeof (a) == 5 * sizeof (int)
FAIL: gcc.dg/guality/vla-2.c -O1 line 16 sizeof (a) == 5 * sizeof (int)
FAIL: gcc.dg/guality/vla-2.c -O2 line 25 sizeof (a) == 6 * sizeof (int)
FAIL: gcc.dg/guality/vla-2.c -O2 -flto -flto-partition=none line 25 sizeof (a) == 6 * sizeof (int)
FAIL: gcc.dg/guality/vla-2.c -O2 -flto -flto-partition=none line 16 sizeof (a) == 5 * sizeof (int)
FAIL: gcc.dg/guality/vla-2.c -Os line 16 sizeof (a) == 5 * sizeof (int)
FAIL: gcc.dg/guality/vla-2.c -O3 -fomit-frame-pointer line 25 sizeof (a) == 6 * sizeof (int)
XPASS: gcc.dg/inline_3.c (test for excess errors)
XPASS: gcc.dg/inline_4.c (test for excess errors)
FAIL: gcc.dg/pr44974.c scan-assembler call[^\n]*_Exit
FAIL: gcc.dg/torture/pr51106-2.c -Os (test for excess errors)
FAIL: gcc.dg/torture/pr51106-2.c -O3 -g (internal compiler error)
FAIL: gcc.dg/torture/pr51106-2.c -O2 -flto (test for excess errors)
FAIL: gcc.dg/torture/pr51106-2.c -O1 (test for excess errors)
FAIL: gcc.dg/torture/pr51106-2.c -O3 -fomit-frame-pointer (internal compiler error)
FAIL: gcc.dg/torture/pr51106-2.c -O2 -flto -fno-use-linker-plugin -flto-partition=none (internal compiler error)
FAIL: gcc.dg/torture/pr51106-2.c -Os (internal compiler error)
FAIL: gcc.dg/torture/pr51106-2.c -O2 -flto -fno-use-linker-plugin -flto-partition=none (test for excess errors)
FAIL: gcc.dg/torture/pr51106-2.c -O3 -g (test for excess errors)
FAIL: gcc.dg/torture/pr51106-2.c -O1 (internal compiler error)
FAIL: gcc.dg/torture/pr51106-2.c -Os (test for excess errors)
FAIL: gcc.dg/torture/pr51106-2.c -O0 (test for excess errors)
FAIL: gcc.dg/torture/pr51106-2.c -O0 (internal compiler error)
FAIL: gcc.dg/torture/pr51106-2.c -O2 (test for excess errors)
FAIL: gcc.dg/torture/pr51106-2.c -O2 (internal compiler error)
FAIL: gcc.dg/torture/pr51106-2.c -O3 -fomit-frame-pointer (test for excess errors)
FAIL: gcc.dg/torture/pr51106-2.c -O2 -flto -flto-partition=none (test for excess errors)
FAIL: gcc.dg/torture/pr51106-2.c -O2 (test for excess errors)
XPASS: gcc.dg/unroll_2.c (test for excess errors)
XPASS: gcc.dg/unroll_3.c (test for excess errors)
XPASS: gcc.dg/unroll_4.c (test for excess errors)
XPASS: gfortran.dg/do_1.f90 -O0 execution test
XPASS: gfortran.dg/do_1.f90 -O1 execution test
FAIL: gfortran.dg/lto/pr45586 f_lto_pr45586_0.o-f_lto_pr45586_0.o link, -O0 -flto -flto-partition=none -fuse-linker-plugin (internal compiler error)
FAIL: gfortran.dg/lto/pr45586 f_lto_pr45586_0.o-f_lto_pr45586_0.o link, -O0 -flto -fuse-linker-plugin -fno-fat-lto-objects (internal compiler error)
UNRESOLVED: gfortran.dg/lto/pr45586 f_lto_pr45586_0.o-f_lto_pr45586_0.o execute -O0 -flto -fuse-linker-plugin -fno-fat-lto-objects
FAIL: gfortran.dg/lto/pr45586 f_lto_pr45586_0.o-f_lto_pr45586_0.o link, -O0 -flto -flto-partition=1to1 -fno-use-linker-plugin (internal compiler error)
UNRESOLVED: gfortran.dg/lto/pr45586 f_lto_pr45586_0.o-f_lto_pr45586_0.o execute -O0 -flto -flto-partition=1to1 -fno-use-linker-plugin
UNRESOLVED: gfortran.dg/lto/pr45586 f_lto_pr45586_0.o-f_lto_pr45586_0.o execute -O0 -flto -flto-partition=none -fuse-linker-plugin
UNRESOLVED: gfortran.dg/lto/pr45586-2 f_lto_pr45586-2_0.o-f_lto_pr45586-2_0.o execute -O0 -flto -flto-partition=none -fuse-linker-plugin
UNRESOLVED: gfortran.dg/lto/pr45586-2 f_lto_pr45586-2_0.o-f_lto_pr45586-2_0.o execute -O0 -flto -flto-partition=1to1 -fno-use-linker-plugin
FAIL: gfortran.dg/lto/pr45586-2 f_lto_pr45586-2_0.o-f_lto_pr45586-2_0.o link, -O0 -flto -flto-partition=none -fuse-linker-plugin (internal compiler error)
UNRESOLVED: gfortran.dg/lto/pr45586-2 f_lto_pr45586-2_0.o-f_lto_pr45586-2_0.o execute -O0 -flto -fuse-linker-plugin -fno-fat-lto-objects
FAIL: gfortran.dg/lto/pr45586-2 f_lto_pr45586-2_0.o-f_lto_pr45586-2_0.o link, -O0 -flto -fuse-linker-plugin -fno-fat-lto-objects (internal compiler error)
FAIL: gfortran.dg/lto/pr45586-2 f_lto_pr45586-2_0.o-f_lto_pr45586-2_0.o link, -O0 -flto -flto-partition=1to1 -fno-use-linker-plugin (internal compiler error)
FAIL: gnat.dg/array11.adb (test for warnings, line 12)
FAIL: gnat.dg/object_overflow.adb (test for warnings, line 8)
FAIL: libmudflap.c++/pass55-frag.cxx (-O2) execution test
FAIL: libmudflap.c++/pass55-frag.cxx ( -O) execution test
FAIL: libmudflap.c++/pass55-frag.cxx (-O3) execution test
@ -92,7 +133,3 @@ FAIL: libmudflap.c/fail37-frag.c (-O3) output pattern test
FAIL: libmudflap.c/fail37-frag.c (-O2) output pattern test
FAIL: libmudflap.c/fail37-frag.c (-O3) crash test
FAIL: libmudflap.c/fail37-frag.c (-O2) crash test
FAIL: reflect
FAIL: sourcelocation -findirect-dispatch output - source compiled test
FAIL: sourcelocation -O3 output - source compiled test
FAIL: sourcelocation output - source compiled test

View File

@ -1,3 +1,17 @@
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.)
2012-11-01 Lawrence Crowl <crowl@google.com>
* sbitmap.h (TEST_BIT): Rename bitmap_bit_p, normalizing parameter

View File

@ -682,10 +682,13 @@ bmp_iter_and_compl (bitmap_iterator *bi, unsigned *bit_no)
should be treated as a read-only variable as it contains loop
state. */
#ifndef EXECUTE_IF_SET_IN_BITMAP
/* See sbitmap.h for the other definition of EXECUTE_IF_SET_IN_BITMAP. */
#define EXECUTE_IF_SET_IN_BITMAP(BITMAP, MIN, BITNUM, ITER) \
for (bmp_iter_set_init (&(ITER), (BITMAP), (MIN), &(BITNUM)); \
bmp_iter_set (&(ITER), &(BITNUM)); \
bmp_iter_next (&(ITER), &(BITNUM)))
#endif
/* Loop over all the bits set in BITMAP1 & BITMAP2, starting with MIN
and setting BITNUM to the bit number. ITER is a bitmap iterator.

View File

@ -721,7 +721,7 @@ link_btr_uses (btr_def *def_array, btr_user *use_array, sbitmap *bb_out,
reaching_defs,
btr_defset[reg - first_btr]);
}
EXECUTE_IF_SET_IN_SBITMAP (reaching_defs_of_reg, 0, uid, sbi)
EXECUTE_IF_SET_IN_BITMAP (reaching_defs_of_reg, 0, uid, sbi)
{
btr_def def = def_array[uid];

View File

@ -24815,7 +24815,7 @@ core2i7_first_cycle_multipass_backtrack (const void *_data,
sbitmap_iterator sbi;
gcc_assert (bitmap_last_set_bit (data->ready_try_change) < n_ready);
EXECUTE_IF_SET_IN_SBITMAP (data->ready_try_change, 0, i, sbi)
EXECUTE_IF_SET_IN_BITMAP (data->ready_try_change, 0, i, sbi)
{
ready_try[i] = 0;
}

View File

@ -801,7 +801,7 @@ print_sccs (FILE *file, ddg_all_sccs_ptr sccs, ddg_ptr g)
for (i = 0; i < sccs->num_sccs; i++)
{
fprintf (file, "SCC number: %d\n", i);
EXECUTE_IF_SET_IN_SBITMAP (sccs->sccs[i]->nodes, 0, u, sbi)
EXECUTE_IF_SET_IN_BITMAP (sccs->sccs[i]->nodes, 0, u, sbi)
{
fprintf (file, "insn num %d\n", u);
print_rtl_single (file, g->nodes[u].insn);
@ -893,7 +893,7 @@ create_scc (ddg_ptr g, sbitmap nodes)
bitmap_copy (scc->nodes, nodes);
/* Mark the backarcs that belong to this SCC. */
EXECUTE_IF_SET_IN_SBITMAP (nodes, 0, u, sbi)
EXECUTE_IF_SET_IN_BITMAP (nodes, 0, u, sbi)
{
ddg_edge_ptr e;
ddg_node_ptr n = &g->nodes[u];
@ -977,7 +977,7 @@ find_successors (sbitmap succ, ddg_ptr g, sbitmap ops)
unsigned int i = 0;
sbitmap_iterator sbi;
EXECUTE_IF_SET_IN_SBITMAP (ops, 0, i, sbi)
EXECUTE_IF_SET_IN_BITMAP (ops, 0, i, sbi)
{
const sbitmap node_succ = NODE_SUCCESSORS (&g->nodes[i]);
bitmap_ior (succ, succ, node_succ);
@ -996,7 +996,7 @@ find_predecessors (sbitmap preds, ddg_ptr g, sbitmap ops)
unsigned int i = 0;
sbitmap_iterator sbi;
EXECUTE_IF_SET_IN_SBITMAP (ops, 0, i, sbi)
EXECUTE_IF_SET_IN_BITMAP (ops, 0, i, sbi)
{
const sbitmap node_preds = NODE_PREDECESSORS (&g->nodes[i]);
bitmap_ior (preds, preds, node_preds);
@ -1141,7 +1141,7 @@ find_nodes_on_paths (sbitmap result, ddg_ptr g, sbitmap from, sbitmap to)
change = 0;
bitmap_copy (workset, tmp);
bitmap_clear (tmp);
EXECUTE_IF_SET_IN_SBITMAP (workset, 0, u, sbi)
EXECUTE_IF_SET_IN_BITMAP (workset, 0, u, sbi)
{
ddg_edge_ptr e;
ddg_node_ptr u_node = &g->nodes[u];
@ -1170,7 +1170,7 @@ find_nodes_on_paths (sbitmap result, ddg_ptr g, sbitmap from, sbitmap to)
change = 0;
bitmap_copy (workset, tmp);
bitmap_clear (tmp);
EXECUTE_IF_SET_IN_SBITMAP (workset, 0, u, sbi)
EXECUTE_IF_SET_IN_BITMAP (workset, 0, u, sbi)
{
ddg_edge_ptr e;
ddg_node_ptr u_node = &g->nodes[u];
@ -1257,7 +1257,7 @@ longest_simple_path (struct ddg * g, int src, int dest, sbitmap nodes)
change = 0;
bitmap_copy (workset, tmp);
bitmap_clear (tmp);
EXECUTE_IF_SET_IN_SBITMAP (workset, 0, u, sbi)
EXECUTE_IF_SET_IN_BITMAP (workset, 0, u, sbi)
{
ddg_node_ptr u_node = &g->nodes[u];

View File

@ -3414,7 +3414,7 @@ dse_step3 (bool for_spills)
/* For any block in an infinite loop, we must initialize the out set
to all ones. This could be expensive, but almost never occurs in
practice. However, it is common in regression tests. */
EXECUTE_IF_SET_IN_SBITMAP (unreachable_blocks, 0, i, sbi)
EXECUTE_IF_SET_IN_BITMAP (unreachable_blocks, 0, i, sbi)
{
if (bitmap_bit_p (all_blocks, i))
{

View File

@ -438,7 +438,7 @@ bitmap_and_into (ebitmap dst, ebitmap src)
the result, AND'ing them. */
bitmap_and (dst->wordmask, dst->wordmask, src->wordmask);
EXECUTE_IF_SET_IN_SBITMAP (dst->wordmask, 0, i, sbi)
EXECUTE_IF_SET_IN_BITMAP (dst->wordmask, 0, i, sbi)
{
EBITMAP_ELT_TYPE tmpword = ebitmap_array_get (src, srceltindex++);
tmpword &= ebitmap_array_get (dst, dsteltindex++);
@ -490,7 +490,7 @@ bitmap_and (ebitmap dst, ebitmap src1, ebitmap src2)
0);
bitmap_and (dst->wordmask, src1->wordmask, src2->wordmask);
EXECUTE_IF_SET_IN_SBITMAP (dst->wordmask, 0, i, sbi)
EXECUTE_IF_SET_IN_BITMAP (dst->wordmask, 0, i, sbi)
{
bool src1hasword, src2hasword;
@ -598,7 +598,7 @@ bitmap_ior_into (ebitmap dst, ebitmap src)
newarraysize = src->numwords + dst->numwords;
newarray = XNEWVEC (EBITMAP_ELT_TYPE, newarraysize);
EXECUTE_IF_SET_IN_SBITMAP (tempmask, 0, i, sbi)
EXECUTE_IF_SET_IN_BITMAP (tempmask, 0, i, sbi)
{
bool dsthasword, srchasword;
@ -707,7 +707,7 @@ bitmap_ior (ebitmap dst, ebitmap src1, ebitmap src2)
newarraysize = src1->numwords + src2->numwords;
newarray = XNEWVEC (EBITMAP_ELT_TYPE, newarraysize);
EXECUTE_IF_SET_IN_SBITMAP (tempmask, 0, i, sbi)
EXECUTE_IF_SET_IN_BITMAP (tempmask, 0, i, sbi)
{
bool src1hasword, src2hasword;
EBITMAP_ELT_TYPE tmpword;
@ -803,7 +803,7 @@ bitmap_and_compl_into (ebitmap dst, ebitmap src)
if (src->numwords == 0)
return false;
EXECUTE_IF_SET_IN_SBITMAP (dst->wordmask, 0, i, sbi)
EXECUTE_IF_SET_IN_BITMAP (dst->wordmask, 0, i, sbi)
{
bool srchasword;
@ -886,7 +886,7 @@ bitmap_and_compl (ebitmap dst, ebitmap src1, ebitmap src2)
newarraysize = src1->numwords;
newarray = XNEWVEC (EBITMAP_ELT_TYPE, newarraysize);
EXECUTE_IF_SET_IN_SBITMAP (src1->wordmask, 0, i, sbi)
EXECUTE_IF_SET_IN_BITMAP (src1->wordmask, 0, i, sbi)
{
bool src2hasword;
EBITMAP_ELT_TYPE tmpword;

View File

@ -94,8 +94,9 @@ typedef struct {
static inline void
ebitmap_iter_init (ebitmap_iterator *i, ebitmap bmp, unsigned int min)
{
sbitmap_iter_init (&i->maskiter, bmp->wordmask,
min / EBITMAP_ELT_BITS);
unsigned unused;
bmp_iter_set_init (&i->maskiter, bmp->wordmask,
min / EBITMAP_ELT_BITS, &unused);
i->size = bmp->numwords;
if (i->size == 0)
{
@ -131,14 +132,15 @@ static inline bool
ebitmap_iter_cond (ebitmap_iterator *i, unsigned int *n)
{
unsigned int ourn = 0;
unsigned unused;
if (i->size == 0)
return false;
if (i->word == 0)
{
sbitmap_iter_next (&i->maskiter);
if (!sbitmap_iter_cond (&i->maskiter, &ourn))
bmp_iter_next (&i->maskiter, &unused);
if (!bmp_iter_set (&i->maskiter, &ourn))
return false;
i->bit_num = ourn * EBITMAP_ELT_BITS;
i->word = i->ptr[i->eltnum++];

View File

@ -1930,7 +1930,7 @@ prune_insertions_deletions (int n_elems)
needs to be inserted. */
for (i = 0; i < (unsigned) n_edges; i++)
{
EXECUTE_IF_SET_IN_SBITMAP (pre_insert_map[i], 0, j, sbi)
EXECUTE_IF_SET_IN_BITMAP (pre_insert_map[i], 0, j, sbi)
insertions[j]++;
}
@ -1938,7 +1938,7 @@ prune_insertions_deletions (int n_elems)
edges. */
for (i = 0; i < (unsigned) last_basic_block; i++)
{
EXECUTE_IF_SET_IN_SBITMAP (pre_delete_map[i], 0, j, sbi)
EXECUTE_IF_SET_IN_BITMAP (pre_delete_map[i], 0, j, sbi)
deletions[j]++;
}
@ -1952,7 +1952,7 @@ prune_insertions_deletions (int n_elems)
bitmap_set_bit (prune_exprs, j);
/* Now prune PRE_INSERT_MAP and PRE_DELETE_MAP based on PRUNE_EXPRS. */
EXECUTE_IF_SET_IN_SBITMAP (prune_exprs, 0, j, sbi)
EXECUTE_IF_SET_IN_BITMAP (prune_exprs, 0, j, sbi)
{
for (i = 0; i < (unsigned) n_edges; i++)
bitmap_clear_bit (pre_insert_map[i], j);
@ -2943,7 +2943,7 @@ should_hoist_expr_to_dom (basic_block expr_bb, struct expr *expr,
pressure for basic blocks newly added in hoisted_bbs. */
if (flag_ira_hoist_pressure && !pred)
{
EXECUTE_IF_SET_IN_SBITMAP (visited, 0, i, sbi)
EXECUTE_IF_SET_IN_BITMAP (visited, 0, i, sbi)
if (!bitmap_bit_p (hoisted_bbs, i))
{
bitmap_set_bit (hoisted_bbs, i);

View File

@ -1480,7 +1480,7 @@ remove_some_program_points_and_update_live_ranges (void)
map = (int *) ira_allocate (sizeof (int) * ira_max_point);
n = -1;
prev_born_p = prev_dead_p = false;
EXECUTE_IF_SET_IN_SBITMAP (born_or_dead, 0, i, sbi)
EXECUTE_IF_SET_IN_BITMAP (born_or_dead, 0, i, sbi)
{
born_p = bitmap_bit_p (born, i);
dead_p = bitmap_bit_p (dead, i);

View File

@ -1589,7 +1589,7 @@ decompose_multiword_subregs (bool decompose_copies)
of a basic block, split those blocks now. Note that we only handle
the case where splitting a load has caused multiple possibly trapping
loads to appear. */
EXECUTE_IF_SET_IN_SBITMAP (sub_blocks, 0, i, sbi)
EXECUTE_IF_SET_IN_BITMAP (sub_blocks, 0, i, sbi)
{
rtx insn, end;
edge fallthru;

View File

@ -789,7 +789,7 @@ remove_some_program_points_and_update_live_ranges (void)
map = XCNEWVEC (int, lra_live_max_point);
n = -1;
prev_born_p = prev_dead_p = false;
EXECUTE_IF_SET_IN_SBITMAP (born_or_dead, 0, i, sbi)
EXECUTE_IF_SET_IN_BITMAP (born_or_dead, 0, i, sbi)
{
born_p = bitmap_bit_p (born, i);
dead_p = bitmap_bit_p (dead, i);

View File

@ -615,7 +615,7 @@ schedule_reg_move (partial_schedule_ptr ps, int i_reg_move,
/* Handle the dependencies between the move and previously-scheduled
successors. */
EXECUTE_IF_SET_IN_SBITMAP (move->uses, 0, u, sbi)
EXECUTE_IF_SET_IN_BITMAP (move->uses, 0, u, sbi)
{
this_insn = ps_rtl_insn (ps, u);
this_latency = insn_latency (move->insn, this_insn);
@ -829,7 +829,7 @@ apply_reg_moves (partial_schedule_ptr ps)
unsigned int i_use;
sbitmap_iterator sbi;
EXECUTE_IF_SET_IN_SBITMAP (move->uses, 0, i_use, sbi)
EXECUTE_IF_SET_IN_BITMAP (move->uses, 0, i_use, sbi)
{
replace_rtx (ps->g->nodes[i_use].insn, move->old_reg, move->new_reg);
df_insn_rescan (ps->g->nodes[i_use].insn);
@ -2664,7 +2664,7 @@ find_max_asap (ddg_ptr g, sbitmap nodes)
int result = -1;
sbitmap_iterator sbi;
EXECUTE_IF_SET_IN_SBITMAP (nodes, 0, u, sbi)
EXECUTE_IF_SET_IN_BITMAP (nodes, 0, u, sbi)
{
ddg_node_ptr u_node = &g->nodes[u];
@ -2686,7 +2686,7 @@ find_max_hv_min_mob (ddg_ptr g, sbitmap nodes)
int result = -1;
sbitmap_iterator sbi;
EXECUTE_IF_SET_IN_SBITMAP (nodes, 0, u, sbi)
EXECUTE_IF_SET_IN_BITMAP (nodes, 0, u, sbi)
{
ddg_node_ptr u_node = &g->nodes[u];
@ -2715,7 +2715,7 @@ find_max_dv_min_mob (ddg_ptr g, sbitmap nodes)
int result = -1;
sbitmap_iterator sbi;
EXECUTE_IF_SET_IN_SBITMAP (nodes, 0, u, sbi)
EXECUTE_IF_SET_IN_BITMAP (nodes, 0, u, sbi)
{
ddg_node_ptr u_node = &g->nodes[u];

View File

@ -656,7 +656,7 @@ bitmap_first_set_bit (const_sbitmap bmap)
unsigned int n = 0;
sbitmap_iterator sbi;
EXECUTE_IF_SET_IN_SBITMAP (bmap, 0, n, sbi)
EXECUTE_IF_SET_IN_BITMAP (bmap, 0, n, sbi)
return n;
return -1;
}

View File

@ -45,7 +45,7 @@ along with GCC; see the file COPYING3. If not see
* cardinality : sbitmap_popcount
* choose_one : bitmap_first_set_bit /
bitmap_last_set_bit
* forall : EXECUTE_IF_SET_IN_SBITMAP
* forall : EXECUTE_IF_SET_IN_BITMAP
* set_copy : bitmap_copy / bitmap_copy_n
* set_intersection : bitmap_and
* set_union : bitmap_ior
@ -177,7 +177,8 @@ typedef struct {
MIN. */
static inline void
sbitmap_iter_init (sbitmap_iterator *i, const_sbitmap bmp, unsigned int min)
bmp_iter_set_init (sbitmap_iterator *i, const_sbitmap bmp,
unsigned int min, unsigned *bit_no ATTRIBUTE_UNUSED)
{
i->word_num = min / (unsigned int) SBITMAP_ELT_BITS;
i->bit_num = min;
@ -196,7 +197,7 @@ sbitmap_iter_init (sbitmap_iterator *i, const_sbitmap bmp, unsigned int min)
false. */
static inline bool
sbitmap_iter_cond (sbitmap_iterator *i, unsigned int *n)
bmp_iter_set (sbitmap_iterator *i, unsigned int *n)
{
/* Skip words that are zeros. */
for (; i->word == 0; i->word = i->ptr[i->word_num])
@ -222,7 +223,7 @@ sbitmap_iter_cond (sbitmap_iterator *i, unsigned int *n)
/* Advance to the next bit. */
static inline void
sbitmap_iter_next (sbitmap_iterator *i)
bmp_iter_next (sbitmap_iterator *i, unsigned *bit_no ATTRIBUTE_UNUSED)
{
i->word >>= 1;
i->bit_num++;
@ -232,38 +233,13 @@ sbitmap_iter_next (sbitmap_iterator *i)
iteration, N is set to the index of the bit being visited. ITER is
an instance of sbitmap_iterator used to iterate the bitmap. */
#define EXECUTE_IF_SET_IN_SBITMAP(SBITMAP, MIN, N, ITER) \
for (sbitmap_iter_init (&(ITER), (SBITMAP), (MIN)); \
sbitmap_iter_cond (&(ITER), &(N)); \
sbitmap_iter_next (&(ITER)))
#define EXECUTE_IF_SET_IN_SBITMAP_REV(SBITMAP, N, CODE) \
do { \
unsigned int word_num_; \
unsigned int bit_num_; \
unsigned int size_ = (SBITMAP)->size; \
SBITMAP_ELT_TYPE *ptr_ = (SBITMAP)->elms; \
\
for (word_num_ = size_; word_num_ > 0; word_num_--) \
{ \
SBITMAP_ELT_TYPE word_ = ptr_[word_num_ - 1]; \
\
if (word_ != 0) \
for (bit_num_ = SBITMAP_ELT_BITS; bit_num_ > 0; bit_num_--) \
{ \
SBITMAP_ELT_TYPE _mask = (SBITMAP_ELT_TYPE)1 << (bit_num_ - 1);\
\
if ((word_ & _mask) != 0) \
{ \
word_ &= ~ _mask; \
(N) = (word_num_ - 1) * SBITMAP_ELT_BITS + bit_num_ - 1;\
CODE; \
if (word_ == 0) \
break; \
} \
} \
} \
} while (0)
#ifndef EXECUTE_IF_SET_IN_BITMAP
/* See bitmap.h for the other definition of EXECUTE_IF_SET_IN_BITMAP. */
#define EXECUTE_IF_SET_IN_BITMAP(BITMAP, MIN, BITNUM, ITER) \
for (bmp_iter_set_init (&(ITER), (BITMAP), (MIN), &(BITNUM)); \
bmp_iter_set (&(ITER), &(BITNUM)); \
bmp_iter_next (&(ITER), &(BITNUM)))
#endif
inline void sbitmap_free (sbitmap map)
{

View File

@ -342,7 +342,7 @@ extract_edgelst (sbitmap set, edgelst *el)
el->nr_members = 0;
/* Iterate over each word in the bitset. */
EXECUTE_IF_SET_IN_SBITMAP (set, 0, i, sbi)
EXECUTE_IF_SET_IN_BITMAP (set, 0, i, sbi)
{
edgelst_table[edgelst_last++] = rgn_edges[i];
el->nr_members++;

View File

@ -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)

View File

@ -1324,7 +1324,7 @@ undistribute_ops_list (enum tree_code opcode,
ctable = htab_create (15, oecount_hash, oecount_eq, NULL);
subops = XCNEWVEC (VEC (operand_entry_t, heap) *,
VEC_length (operand_entry_t, *ops));
EXECUTE_IF_SET_IN_SBITMAP (candidates, 0, i, sbi0)
EXECUTE_IF_SET_IN_BITMAP (candidates, 0, i, sbi0)
{
gimple oedef;
enum tree_code oecode;
@ -1389,7 +1389,7 @@ undistribute_ops_list (enum tree_code opcode,
the common operand in their inner chain. */
bitmap_clear (candidates2);
nr_candidates2 = 0;
EXECUTE_IF_SET_IN_SBITMAP (candidates, 0, i, sbi0)
EXECUTE_IF_SET_IN_BITMAP (candidates, 0, i, sbi0)
{
gimple oedef;
enum tree_code oecode;
@ -1431,7 +1431,7 @@ undistribute_ops_list (enum tree_code opcode,
print_generic_expr (dump_file, oe1->op, 0);
}
zero_one_operation (&oe1->op, c->oecode, c->op);
EXECUTE_IF_SET_IN_SBITMAP (candidates2, first+1, i, sbi0)
EXECUTE_IF_SET_IN_BITMAP (candidates2, first+1, i, sbi0)
{
gimple sum;
oe2 = VEC_index (operand_entry_t, *ops, i);