Commit 9cd56be1 by Jan Hubicka Committed by Jan Hubicka

gcse.c (delete_null_pointer_checks_1): Do not use delelete_list; call…

gcse.c (delete_null_pointer_checks_1): Do not use delelete_list; call purge_dead_edges after removing.

	* gcse.c (delete_null_pointer_checks_1): Do not use delelete_list;
	call purge_dead_edges after removing.
	(delete_null_pointer_checks): Do not handle delete_list.

	* cfgbuild.c (inside_basic_block_p, control_flow_insn_p): Break out from ...
	(count_basic_blocks): ... here.
	(find_basic_blocks, find_bb_boundaries): Cleanup.

	* stor-layout.c (fixup_signed_type, fixup_unsigned_type): Avoid
	overflow for types greater then 2 * HOST_WIDE_INT.

	* reload.c (find_reloads): Update the duplicates after swapingg.

From-SVN: r47551
parent 63658a9a
Mon Dec 3 16:16:37 CET 2001 Jan Hubicka <jh@suse.cz>
* gcse.c (delete_null_pointer_checks_1): Do not use delelete_list;
call purge_dead_edges after removing.
(delete_null_pointer_checks): Do not handle delete_list.
* cfgbuild.c (inside_basic_block_p, control_flow_insn_p): Break out from ...
(count_basic_blocks): ... here.
(find_basic_blocks, find_bb_boundaries): Cleanup.
* stor-layout.c (fixup_signed_type, fixup_unsigned_type): Avoid
overflow for types greater then 2 * HOST_WIDE_INT.
* reload.c (find_reloads): Update the duplicates after swapingg.
Mon Dec 3 13:52:19 CET 2001 Jan Hubicka <jh@suse.cz> Mon Dec 3 13:52:19 CET 2001 Jan Hubicka <jh@suse.cz>
* i386.md (movabsqi*): Use 'b' prefix instead of 'q'. * i386.md (movabsqi*): Use 'b' prefix instead of 'q'.
......
...@@ -656,7 +656,7 @@ static int handle_avail_expr PARAMS ((rtx, struct expr *)); ...@@ -656,7 +656,7 @@ static int handle_avail_expr PARAMS ((rtx, struct expr *));
static int classic_gcse PARAMS ((void)); static int classic_gcse PARAMS ((void));
static int one_classic_gcse_pass PARAMS ((int)); static int one_classic_gcse_pass PARAMS ((int));
static void invalidate_nonnull_info PARAMS ((rtx, rtx, void *)); static void invalidate_nonnull_info PARAMS ((rtx, rtx, void *));
static void delete_null_pointer_checks_1 PARAMS ((varray_type *, unsigned int *, static void delete_null_pointer_checks_1 PARAMS ((unsigned int *,
sbitmap *, sbitmap *, sbitmap *, sbitmap *,
struct null_pointer_info *)); struct null_pointer_info *));
static rtx process_insert_insn PARAMS ((struct expr *)); static rtx process_insert_insn PARAMS ((struct expr *));
...@@ -5194,9 +5194,8 @@ invalidate_nonnull_info (x, setter, data) ...@@ -5194,9 +5194,8 @@ invalidate_nonnull_info (x, setter, data)
they are not our responsibility to free. */ they are not our responsibility to free. */
static void static void
delete_null_pointer_checks_1 (delete_list, block_reg, nonnull_avin, delete_null_pointer_checks_1 (block_reg, nonnull_avin,
nonnull_avout, npi) nonnull_avout, npi)
varray_type *delete_list;
unsigned int *block_reg; unsigned int *block_reg;
sbitmap *nonnull_avin; sbitmap *nonnull_avin;
sbitmap *nonnull_avout; sbitmap *nonnull_avout;
...@@ -5326,12 +5325,11 @@ delete_null_pointer_checks_1 (delete_list, block_reg, nonnull_avin, ...@@ -5326,12 +5325,11 @@ delete_null_pointer_checks_1 (delete_list, block_reg, nonnull_avin,
LABEL_NUSES (JUMP_LABEL (new_jump))++; LABEL_NUSES (JUMP_LABEL (new_jump))++;
emit_barrier_after (new_jump); emit_barrier_after (new_jump);
} }
if (!*delete_list)
VARRAY_RTX_INIT (*delete_list, 10, "delete_list");
VARRAY_PUSH_RTX (*delete_list, last_insn); delete_insn (last_insn);
if (compare_and_branch == 2) if (compare_and_branch == 2)
VARRAY_PUSH_RTX (*delete_list, earliest); delete_insn (earliest);
purge_dead_edges (BASIC_BLOCK (bb));
/* Don't check this block again. (Note that BLOCK_END is /* Don't check this block again. (Note that BLOCK_END is
invalid here; we deleted the last instruction in the invalid here; we deleted the last instruction in the
...@@ -5370,12 +5368,10 @@ delete_null_pointer_checks (f) ...@@ -5370,12 +5368,10 @@ delete_null_pointer_checks (f)
{ {
sbitmap *nonnull_avin, *nonnull_avout; sbitmap *nonnull_avin, *nonnull_avout;
unsigned int *block_reg; unsigned int *block_reg;
varray_type delete_list = NULL;
int bb; int bb;
int reg; int reg;
int regs_per_pass; int regs_per_pass;
int max_reg; int max_reg;
unsigned int i;
struct null_pointer_info npi; struct null_pointer_info npi;
/* If we have only a single block, then there's nothing to do. */ /* If we have only a single block, then there's nothing to do. */
...@@ -5444,18 +5440,10 @@ delete_null_pointer_checks (f) ...@@ -5444,18 +5440,10 @@ delete_null_pointer_checks (f)
{ {
npi.min_reg = reg; npi.min_reg = reg;
npi.max_reg = MIN (reg + regs_per_pass, max_reg); npi.max_reg = MIN (reg + regs_per_pass, max_reg);
delete_null_pointer_checks_1 (&delete_list, block_reg, nonnull_avin, delete_null_pointer_checks_1 (block_reg, nonnull_avin,
nonnull_avout, &npi); nonnull_avout, &npi);
} }
/* Now delete the instructions all at once. This breaks the CFG. */
if (delete_list)
{
for (i = 0; i < VARRAY_ACTIVE_SIZE (delete_list); i++)
delete_related_insns (VARRAY_RTX (delete_list, i));
VARRAY_FREE (delete_list);
}
/* Free the table of registers compared at the end of every block. */ /* Free the table of registers compared at the end of every block. */
free (block_reg); free (block_reg);
......
...@@ -3510,6 +3510,12 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p) ...@@ -3510,6 +3510,12 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
recog_data.operand[commutative] = substed_operand[commutative + 1]; recog_data.operand[commutative] = substed_operand[commutative + 1];
recog_data.operand[commutative + 1] = substed_operand[commutative]; recog_data.operand[commutative + 1] = substed_operand[commutative];
/* Swap the duplicates too. */
for (i = 0; i < recog_data.n_dups; i++)
if (recog_data.dup_num[i] == commutative
|| recog_data.dup_num[i] == commutative + 1)
*recog_data.dup_loc[i]
= recog_data.operand[(int) recog_data.dup_num[i]];
tclass = preferred_class[commutative]; tclass = preferred_class[commutative];
preferred_class[commutative] = preferred_class[commutative + 1]; preferred_class[commutative] = preferred_class[commutative + 1];
...@@ -3528,6 +3534,12 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p) ...@@ -3528,6 +3534,12 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p)
recog_data.operand[commutative] = substed_operand[commutative]; recog_data.operand[commutative] = substed_operand[commutative];
recog_data.operand[commutative + 1] recog_data.operand[commutative + 1]
= substed_operand[commutative + 1]; = substed_operand[commutative + 1];
/* Unswap the duplicates too. */
for (i = 0; i < recog_data.n_dups; i++)
if (recog_data.dup_num[i] == commutative
|| recog_data.dup_num[i] == commutative + 1)
*recog_data.dup_loc[i]
= recog_data.operand[(int) recog_data.dup_num[i]];
} }
} }
......
...@@ -1755,6 +1755,12 @@ fixup_signed_type (type) ...@@ -1755,6 +1755,12 @@ fixup_signed_type (type)
{ {
int precision = TYPE_PRECISION (type); int precision = TYPE_PRECISION (type);
/* We can not represent properly constants greater then
2 * HOST_BITS_PER_WIDE_INT, still we need the types
as they are used by i386 vector extensions and friends. */
if (precision > HOST_BITS_PER_WIDE_INT * 2)
precision = HOST_BITS_PER_WIDE_INT * 2;
TYPE_MIN_VALUE (type) TYPE_MIN_VALUE (type)
= build_int_2 ((precision - HOST_BITS_PER_WIDE_INT > 0 = build_int_2 ((precision - HOST_BITS_PER_WIDE_INT > 0
? 0 : (HOST_WIDE_INT) (-1) << (precision - 1)), ? 0 : (HOST_WIDE_INT) (-1) << (precision - 1)),
...@@ -1787,6 +1793,12 @@ fixup_unsigned_type (type) ...@@ -1787,6 +1793,12 @@ fixup_unsigned_type (type)
{ {
int precision = TYPE_PRECISION (type); int precision = TYPE_PRECISION (type);
/* We can not represent properly constants greater then
2 * HOST_BITS_PER_WIDE_INT, still we need the types
as they are used by i386 vector extensions and friends. */
if (precision > HOST_BITS_PER_WIDE_INT * 2)
precision = HOST_BITS_PER_WIDE_INT * 2;
TYPE_MIN_VALUE (type) = build_int_2 (0, 0); TYPE_MIN_VALUE (type) = build_int_2 (0, 0);
TYPE_MAX_VALUE (type) TYPE_MAX_VALUE (type)
= build_int_2 (precision - HOST_BITS_PER_WIDE_INT >= 0 = build_int_2 (precision - HOST_BITS_PER_WIDE_INT >= 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment