/* Store motion via Lazy Code Motion on the reverse CFG.
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This file is part of GCC.
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "diagnostic-core.h"
#include "toplev.h"
#include "rtl.h"
#include "regs.h"
#include "hard-reg-set.h"
#include "flags.h"
-#include "real.h"
#include "insn-config.h"
#include "recog.h"
#include "basic-block.h"
if (after)
return anti_dependence (x, store_pattern);
else
- return true_dependence (store_pattern, GET_MODE (store_pattern), x,
- rtx_addr_varies_p);
+ return true_dependence (store_pattern, GET_MODE (store_pattern), x);
}
/* Go through the entire rtx X, looking for any loads which might alias
{
const_rtx reg, base, note, pat;
- if (!INSN_P (insn))
+ if (! NONDEBUG_INSN_P (insn))
return false;
if (CALL_P (insn))
return;
/* If we are handling exceptions, we must be careful with memory references
- that may trap. If we are not, the behavior is undefined, so we may just
+ that may trap. If we are not, the behavior is undefined, so we may just
continue. */
- if (flag_non_call_exceptions && may_trap_p (dest))
+ if (cfun->can_throw_non_call_exceptions && may_trap_p (dest))
return;
/* Even if the destination cannot trap, the source may. In this case we'd
FOR_BB_INSNS (bb, insn)
{
- if (! INSN_P (insn))
+ if (! NONDEBUG_INSN_P (insn))
continue;
for (def_rec = DF_INSN_DEFS (insn); *def_rec; def_rec++)
memset (already_set, 0, sizeof (int) * max_gcse_regno);
FOR_BB_INSNS (bb, insn)
{
- if (! INSN_P (insn))
+ if (! NONDEBUG_INSN_P (insn))
continue;
for (def_rec = DF_INSN_DEFS (insn); *def_rec; def_rec++)
last = NEXT_INSN (BB_END (bb));
for (insn = BB_HEAD (bb); insn != last; insn = NEXT_INSN (insn))
- if (INSN_P (insn))
+ if (NONDEBUG_INSN_P (insn))
{
note = find_reg_equal_equiv_note (insn);
if (!note || !exp_equiv_p (XEXP (note, 0), mem, 0, true))
they are no longer accurate provided that they are reached by this
definition, so drop them. */
for (; insn != NEXT_INSN (BB_END (bb)); insn = NEXT_INSN (insn))
- if (INSN_P (insn))
+ if (NONDEBUG_INSN_P (insn))
{
set = single_set (insn);
if (!set)
FOR_EACH_BB (bb)
{
+ memset (regs_set_in_block, 0, sizeof (int) * max_gcse_regno);
+
FOR_BB_INSNS (bb, insn)
- if (INSN_P (insn))
+ if (NONDEBUG_INSN_P (insn))
{
df_ref *def_rec;
for (def_rec = DF_INSN_DEFS (insn); *def_rec; def_rec++)
execute_rtl_store_motion (void)
{
delete_unreachable_blocks ();
- df_note_add_problem ();
df_analyze ();
flag_rerun_cse_after_global_opts |= one_store_motion_pass ();
return 0;
0, /* properties_destroyed */
0, /* todo_flags_start */
TODO_df_finish | TODO_verify_rtl_sharing |
- TODO_dump_func |
TODO_verify_flow | TODO_ggc_collect /* todo_flags_finish */
}
};
-