diff options
author | Ian Lance Taylor <iant@google.com> | 2009-06-19 15:29:18 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2009-06-19 15:29:18 +0000 |
commit | dc491a250a946a50bdea3813e9f1f67d368e348b (patch) | |
tree | 0dea9b2fb4eca6aa396f8ba7b9c2513061e504ae /gcc/dse.c | |
parent | 88eeff6f5a1347dc09de33c26a68648c4dea7f80 (diff) | |
download | gcc-dc491a250a946a50bdea3813e9f1f67d368e348b.zip gcc-dc491a250a946a50bdea3813e9f1f67d368e348b.tar.gz gcc-dc491a250a946a50bdea3813e9f1f67d368e348b.tar.bz2 |
dse.c (struct store_info): Rename bitmap field to bmap.
./: * dse.c (struct store_info): Rename bitmap field to bmap. Change
all uses.
* c-decl.c (in_struct, struct_types): Remove.
(struct c_binding): Add in_struct field.
(c_binding_ptr): Define type, along with VEC.
(struct c_struct_parse_info): Define.
(struct_parse_info): New static variable.
(bind): Initialize in_struct field.
(start_struct): Remove enclosing_in_struct and
enclosing_struct_types parameters. Add
enclosing_struct_parse_info parameter. Change all callers. Set
struct_parse_info rather than in_struct and struct_types.
(grokfield): If -Wc++-compat and there is a symbol binding for the
field name, set the in_struct flag and push it on the
struct_parse_info->fields vector.
(warn_cxx_compat_finish_struct): New static function.
(finish_struct): Remove enclosing_in_struct and
enclosing_struct_types parameters. Add
enclosing_struct_parse_info parameter. Change all callers. Don't
set C_TYPE_DEFINED_IN_STRUCT here. Call
warn_cxx_compat_finish_struct. Free struct_parse_info and set to
parameter. Only push on struct_types if warn_cxx_compat.
(finish_enum): Only push on struct_types if warn_cxx_compat.
(declspecs_add_type): Add loc parameter. Change all callers.
Change all error calls to error_at. Pass loc, not input_location,
to pedwarn calls. Warn if -Wc++-compat and a typedef name is
defined in a struct. If -Wc++-compat and parsing a struct, record
that a typedef name was used.
* c-parser.c (c_parser_declspecs): Get location to pass to
declspecs_add_type.
(c_parser_struct_or_union_specifier): Update calls to start_struct
and finish_struct.
* c-tree.h (struct c_struct_parse_info): Declare.
(finish_struct, start_struct): Update declarations.
(declspecs_add_type): Update declaration.
objc/:
* objc-act.c (objc_in_struct, objc_struct_types): Remove.
(objc_struct_info): New static variable.
(objc_start_struct): Pass &objc_struct_info, not &objc_in_struct
and &objc_struct_types, to start_struct.
(objc_finish_struct): Likewise for finish_struct.
objcp/:
* objcp-decl.h (start_struct): Remove in_struct and struct_types
parameters. Add struct_info parameter.
(finish_struct): Likewise.
testsuite/:
* gcc.dg/Wcxx-compat-15.c: New testcase.
From-SVN: r148709
Diffstat (limited to 'gcc/dse.c')
-rw-r--r-- | gcc/dse.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -244,7 +244,7 @@ struct store_info { /* A bitmap with one bit per byte. Cleared bit means the position is needed. Used if IS_LARGE is false. */ - bitmap bitmap; + bitmap bmap; /* Number of set bits (i.e. unneeded bytes) in BITMAP. If it is equal to END - BEGIN, the whole store is unused. */ @@ -791,7 +791,7 @@ free_store_info (insn_info_t insn_info) { store_info_t next = store_info->next; if (store_info->is_large) - BITMAP_FREE (store_info->positions_needed.large.bitmap); + BITMAP_FREE (store_info->positions_needed.large.bmap); if (store_info->cse_base) pool_free (cse_store_info_pool, store_info); else @@ -1213,10 +1213,10 @@ set_position_unneeded (store_info_t s_info, int pos) { if (__builtin_expect (s_info->is_large, false)) { - if (!bitmap_bit_p (s_info->positions_needed.large.bitmap, pos)) + if (!bitmap_bit_p (s_info->positions_needed.large.bmap, pos)) { s_info->positions_needed.large.count++; - bitmap_set_bit (s_info->positions_needed.large.bitmap, pos); + bitmap_set_bit (s_info->positions_needed.large.bmap, pos); } } else @@ -1233,7 +1233,7 @@ set_all_positions_unneeded (store_info_t s_info) { int pos, end = s_info->end - s_info->begin; for (pos = 0; pos < end; pos++) - bitmap_set_bit (s_info->positions_needed.large.bitmap, pos); + bitmap_set_bit (s_info->positions_needed.large.bmap, pos); s_info->positions_needed.large.count = end; } else @@ -1263,7 +1263,7 @@ all_positions_needed_p (store_info_t s_info, int start, int width) { int end = start + width; while (start < end) - if (bitmap_bit_p (s_info->positions_needed.large.bitmap, start++)) + if (bitmap_bit_p (s_info->positions_needed.large.bmap, start++)) return false; return true; } @@ -1605,7 +1605,7 @@ record_store (rtx body, bb_info_t bb_info) { store_info->is_large = true; store_info->positions_needed.large.count = 0; - store_info->positions_needed.large.bitmap = BITMAP_ALLOC (NULL); + store_info->positions_needed.large.bmap = BITMAP_ALLOC (NULL); } else { @@ -2721,7 +2721,7 @@ dse_step1 (void) for (s_info = ptr->store_rec; s_info; s_info = s_info->next) if (s_info->is_large) { - BITMAP_FREE (s_info->positions_needed.large.bitmap); + BITMAP_FREE (s_info->positions_needed.large.bmap); s_info->is_large = false; } } |