if (!check_for_inc_dec_1 (insn_info))
return;
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
{
fprintf (dump_file, "Locally deleting insn %d ",
INSN_UID (insn_info->insn));
{
/* If this is a spill, do not do any further processing. */
alias_set_type alias_set = MEM_ALIAS_SET (mem);
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "found alias set %d\n", (int) alias_set);
if (bitmap_bit_p (clear_alias_sets, alias_set))
{
/* If the modes do not match, we cannot process this set. */
if (entry->mode != GET_MODE (mem))
{
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file,
"disqualifying alias set %d, (%s) != (%s)\n",
(int) alias_set, GET_MODE_NAME (entry->mode),
cselib_lookup (mem_address, address_mode, 1, GET_MODE (mem));
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
{
fprintf (dump_file, " mem: ");
print_inline_rtx (dump_file, mem_address, 0);
*offset = 0;
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
{
if (expanded)
{
{
group_info_t group = get_group_info (address);
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " gid=%d offset=%d \n",
group->id, (int)*offset);
*base = NULL;
if (*base == NULL)
{
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " no cselib val - should be a wild read.\n");
return false;
}
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " varying cselib base=%u:%u offset = %d\n",
(*base)->uid, (*base)->hash, (int)*offset);
return true;
{
if (GET_CODE (XEXP (mem, 0)) == SCRATCH)
{
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " adding wild read for (clobber (mem:BLK (scratch))\n");
add_wild_read (bb_info);
insn_info->cannot_delete = true;
store_info = (store_info_t) pool_alloc (rtx_store_info_pool);
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " processing spill store %d(%s)\n",
(int) spill_alias_set, GET_MODE_NAME (GET_MODE (mem)));
}
store_info = (store_info_t) pool_alloc (rtx_store_info_pool);
set_usage_bits (group, offset, width, expr);
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " processing const base store gid=%d[%d..%d)\n",
group_id, (int)offset, (int)(offset+width));
}
store_info = (store_info_t) pool_alloc (cse_store_info_pool);
group_id = -1;
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " processing cselib store [%d..%d)\n",
(int)offset, (int)(offset+width));
}
del = true;
set_all_positions_unneeded (s_info);
}
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " trying spill store in insn=%d alias_set=%d\n",
INSN_UID (ptr->insn), (int) s_info->alias_set);
}
&& (s_info->cse_base == base))
{
HOST_WIDE_INT i;
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " trying store in insn=%d gid=%d[%d..%d)\n",
INSN_UID (ptr->insn), s_info->group_id,
(int)s_info->begin, (int)s_info->end);
in cache, so it is not going to be an expensive one. Thus, we
are not willing to do a multi insn shift or worse a subroutine
call to get rid of the read. */
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "trying to replace %smode load in insn %d"
" from %smode store in insn %d\n",
GET_MODE_NAME (read_mode), INSN_UID (read_insn->insn),
if (read_reg == NULL_RTX)
{
end_sequence ();
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " -- could not extract bits of stored value\n");
return false;
}
bitmap_and_into (regs_set, regs_live);
if (!bitmap_empty_p (regs_set))
{
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
{
fprintf (dump_file,
"abandoning replacement because sequence clobbers live hardregs:");
rest of dse, play like this read never happened. */
read_insn->read_rec = read_info->next;
pool_free (read_info_pool, read_info);
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
{
fprintf (dump_file, " -- replaced the loaded MEM with ");
print_simple_rtl (dump_file, read_reg);
}
else
{
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
{
fprintf (dump_file, " -- replacing the loaded MEM with ");
print_simple_rtl (dump_file, read_reg);
if ((MEM_ALIAS_SET (mem) == ALIAS_SET_MEMORY_BARRIER)
|| (MEM_VOLATILE_P (mem)))
{
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " adding wild read, volatile or barrier.\n");
add_wild_read (bb_info);
insn_info->cannot_delete = true;
if (!canon_address (mem, &spill_alias_set, &group_id, &offset, &base))
{
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " adding wild read, canon_address failure.\n");
add_wild_read (bb_info);
return 0;
insn_info_t i_ptr = active_local_stores;
insn_info_t last = NULL;
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " processing spill load %d\n",
(int) spill_alias_set);
if (store_info->alias_set == spill_alias_set)
{
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
dump_insn_info ("removing from active", i_ptr);
active_local_stores_len--;
insn_info_t i_ptr = active_local_stores;
insn_info_t last = NULL;
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
{
if (width == -1)
fprintf (dump_file, " processing const load gid=%d[BLK]\n",
if (remove)
{
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
dump_insn_info ("removing from active", i_ptr);
active_local_stores_len--;
{
insn_info_t i_ptr = active_local_stores;
insn_info_t last = NULL;
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
{
fprintf (dump_file, " processing cselib load mem:");
print_inline_rtx (dump_file, mem, 0);
bool remove = false;
store_info_t store_info = i_ptr->store_rec;
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, " processing cselib load against insn %d\n",
INSN_UID (i_ptr->insn));
if (remove)
{
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
dump_insn_info ("removing from active", i_ptr);
active_local_stores_len--;
int mems_found = 0;
memset (insn_info, 0, sizeof (struct insn_info));
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "\n**scanning insn=%d\n",
INSN_UID (insn));
insn_info_t i_ptr = active_local_stores;
insn_info_t last = NULL;
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "%s call %d\n",
const_call ? "const" : "memset", INSN_UID (insn));
if (remove_store)
{
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
dump_insn_info ("removing from active", i_ptr);
active_local_stores_len--;
set_mem_size (mem, INTVAL (args[2]));
body = gen_rtx_SET (VOIDmode, mem, args[1]);
mems_found += record_store (body, bb_info);
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "handling memset as BLKmode store\n");
if (mems_found == 1)
{
else
mems_found += record_store (body, bb_info);
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "mems_found = %d, cannot_delete = %s\n",
mems_found, insn_info->cannot_delete ? "true" : "false");
&& s_info->redundant_reason->insn
&& !ptr->cannot_delete)
{
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "Locally deleting insn %d "
"because insn %d stores the "
"same value and couldn't be "
{
bitmap_ior_into (group->store2_n, group->store1_n);
bitmap_ior_into (group->store2_p, group->store1_p);
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "group %d is frame related ", i);
}
group->offset_map_p = XOBNEWVEC (&dse_obstack, int,
group->offset_map_size_p);
group->process_globally = false;
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
{
fprintf (dump_file, "group %d(%d+%d): ", i,
(int)bitmap_count_bits (group->store2_n),
unused. */
current_position = 1;
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
{
bitmap_print (dump_file, clear_alias_sets,
"clear alias sets ", "\n");
dse_confluence_n, dse_transfer_function,
all_blocks, df_get_postorder (DF_BACKWARD),
df_get_n_blocks (DF_BACKWARD));
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
{
basic_block bb;
{
int index = get_bitmap_index (group_info, i);
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "i = %d, index = %d\n", (int)i, index);
if (index == 0 || !bitmap_bit_p (v, index))
{
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "failing at i = %d\n", (int)i);
deleted = false;
break;
scan_stores_nospill (insn_info->store_rec, v, NULL);
if (insn_info->wild_read)
{
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "wild read\n");
bitmap_clear (v);
}
{
if (dump_file && !insn_info->non_frame_wild_read)
fprintf (dump_file, "regular read\n");
- else if (dump_file)
+ else if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "non-frame wild read\n");
scan_reads_nospill (insn_info, v, NULL);
}
if (deleted && dbg_cnt (dse)
&& check_for_inc_dec_1 (insn_info))
{
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "Spill deleting insn %d\n",
INSN_UID (insn_info->insn));
delete_insn (insn_info->insn);
&& INSN_P (s_info->redundant_reason->insn))
{
rtx rinsn = s_info->redundant_reason->insn;
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "Locally deleting insn %d "
"because insn %d stores the "
"same value and couldn't be "
df_set_flags (DF_LR_RUN_DCE);
df_analyze ();
did_global = true;
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "doing global processing\n");
dse_step3 (false);
dse_step4 ();
df_analyze ();
}
did_global = true;
- if (dump_file)
+ if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "doing global spill processing\n");
dse_step3 (true);
dse_step4 ();