Commit 4f2a9af8 by Jakub Jelinek Committed by Jakub Jelinek

tree-parloops.c (separate_decls_in_region_debug_bind): Drop debug stmts setting DEBUG_EXPR_DECLs.

	* tree-parloops.c (separate_decls_in_region_debug_bind): Drop debug
	stmts setting DEBUG_EXPR_DECLs.

	* cfgexpand.c (expand_debug_expr): Ignore zero-length bitfields.
	Don't crash if mode1 is VOIDmode.

From-SVN: r152772
parent 1833192f
2009-10-14 Jakub Jelinek <jakub@redhat.com>
* tree-parloops.c (separate_decls_in_region_debug_bind): Drop debug
stmts setting DEBUG_EXPR_DECLs.
* cfgexpand.c (expand_debug_expr): Ignore zero-length bitfields.
Don't crash if mode1 is VOIDmode.
2009-09-26 Vladimir Makarov <vmakarov@redhat.com> 2009-09-26 Vladimir Makarov <vmakarov@redhat.com>
* params.def (PARAM_IRA_LOOP_RESERVED_REGS): New. * params.def (PARAM_IRA_LOOP_RESERVED_REGS): New.
...@@ -2524,6 +2524,9 @@ expand_debug_expr (tree exp) ...@@ -2524,6 +2524,9 @@ expand_debug_expr (tree exp)
&mode1, &unsignedp, &volatilep, false); &mode1, &unsignedp, &volatilep, false);
rtx orig_op0; rtx orig_op0;
if (bitsize == 0)
return NULL;
orig_op0 = op0 = expand_debug_expr (tem); orig_op0 = op0 = expand_debug_expr (tem);
if (!op0) if (!op0)
...@@ -2561,6 +2564,9 @@ expand_debug_expr (tree exp) ...@@ -2561,6 +2564,9 @@ expand_debug_expr (tree exp)
if (MEM_P (op0)) if (MEM_P (op0))
{ {
if (mode1 == VOIDmode)
/* Bitfield. */
mode1 = smallest_mode_for_size (bitsize, MODE_INT);
if (bitpos >= BITS_PER_UNIT) if (bitpos >= BITS_PER_UNIT)
{ {
op0 = adjust_address_nv (op0, mode1, bitpos / BITS_PER_UNIT); op0 = adjust_address_nv (op0, mode1, bitpos / BITS_PER_UNIT);
...@@ -2568,7 +2574,8 @@ expand_debug_expr (tree exp) ...@@ -2568,7 +2574,8 @@ expand_debug_expr (tree exp)
} }
else if (bitpos < 0) else if (bitpos < 0)
{ {
int units = (-bitpos + BITS_PER_UNIT - 1) / BITS_PER_UNIT; HOST_WIDE_INT units
= (-bitpos + BITS_PER_UNIT - 1) / BITS_PER_UNIT;
op0 = adjust_address_nv (op0, mode1, units); op0 = adjust_address_nv (op0, mode1, units);
bitpos += units * BITS_PER_UNIT; bitpos += units * BITS_PER_UNIT;
} }
......
...@@ -715,6 +715,8 @@ separate_decls_in_region_debug_bind (gimple stmt, ...@@ -715,6 +715,8 @@ separate_decls_in_region_debug_bind (gimple stmt,
void **slot, **dslot; void **slot, **dslot;
var = gimple_debug_bind_get_var (stmt); var = gimple_debug_bind_get_var (stmt);
if (TREE_CODE (var) == DEBUG_EXPR_DECL)
return true;
gcc_assert (DECL_P (var) && SSA_VAR_P (var)); gcc_assert (DECL_P (var) && SSA_VAR_P (var));
ielt.uid = DECL_UID (var); ielt.uid = DECL_UID (var);
dslot = htab_find_slot_with_hash (decl_copies, &ielt, ielt.uid, NO_INSERT); dslot = htab_find_slot_with_hash (decl_copies, &ielt, ielt.uid, NO_INSERT);
......
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