/* An SH specific RTL pass that tries to combine comparisons and redundant
condition code register stores across multiple basic blocks.
- Copyright (C) 2013-2015 Free Software Foundation, Inc.
+ Copyright (C) 2013-2020 Free Software Foundation, Inc.
This file is part of GCC.
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
+#define IN_TARGET_CODE 1
+
#include "config.h"
+#define INCLUDE_ALGORITHM
+#define INCLUDE_LIST
+#define INCLUDE_VECTOR
#include "system.h"
#include "coretypes.h"
-#include "predict.h"
-#include "vec.h"
-#include "hashtab.h"
-#include "hash-set.h"
-#include "tm.h"
-#include "hard-reg-set.h"
-#include "input.h"
-#include "function.h"
-#include "dominance.h"
-#include "cfg.h"
-#include "cfgrtl.h"
-#include "cfganal.h"
-#include "lcm.h"
-#include "cfgbuild.h"
-#include "cfgcleanup.h"
-#include "basic-block.h"
-#include "df.h"
+#include "backend.h"
+#include "target.h"
#include "rtl.h"
-#include "insn-config.h"
-#include "insn-codes.h"
+#include "tree.h"
+#include "memmodel.h"
+#include "optabs.h"
#include "emit-rtl.h"
#include "recog.h"
+#include "cfgrtl.h"
#include "tree-pass.h"
-#include "target.h"
-#include "symtab.h"
-#include "inchash.h"
-#include "tree.h"
-#include "optabs.h"
-#include "flags.h"
-#include "statistics.h"
-#include "alias.h"
-#include "expmed.h"
-#include "dojump.h"
-#include "explow.h"
-#include "calls.h"
-#include "varasm.h"
-#include "stmt.h"
#include "expr.h"
-#include <algorithm>
-#include <list>
-#include <vector>
-
/*
This pass tries to optimize for example this:
mov.l @(4,r4),r1
return result;
for (result.insn = insn; result.insn != NULL;
- result.insn = prev_nonnote_insn_bb (result.insn))
+ result.insn = prev_nonnote_nondebug_insn_bb (result.insn))
{
if (BARRIER_P (result.insn))
return result;
// Now see how the ccreg was set.
// For now it must be in the same BB.
log_msg ("tracing ccreg\n");
- new_entry.setcc =
- find_set_of_reg_bb (m_ccreg,
- prev_nonnote_insn_bb (new_entry.cstore.insn));
+ new_entry.setcc = find_set_of_reg_bb
+ (m_ccreg, prev_nonnote_nondebug_insn_bb (new_entry.cstore.insn));
// If cstore was found but setcc was not found continue anyway, as
// for some of the optimization types the setcc is irrelevant.
// (set (reg ccreg) (eq (reg) (const_int 0)))
// The testing insn could also be outside of the current basic block, but
// for now we limit the search to the current basic block.
- trace.setcc = find_set_of_reg_bb (m_ccreg, prev_nonnote_insn_bb (insn));
+ trace.setcc = find_set_of_reg_bb
+ (m_ccreg, prev_nonnote_nondebug_insn_bb (insn));
if (trace.setcc.set_src () == NULL_RTX)
log_return_void ("could not find set of ccreg in current BB\n");
// If we find it here there's no point in checking other BBs.
trace.bb_entries.push_front (bb_entry (trace.bb ()));
- record_return_t res =
- record_set_of_reg (trace_reg, prev_nonnote_insn_bb (trace.setcc.insn),
- trace.bb_entries.front ());
+ record_return_t res = record_set_of_reg
+ (trace_reg, prev_nonnote_nondebug_insn_bb (trace.setcc.insn),
+ trace.bb_entries.front ());
if (res == other_set_found)
log_return_void ("other set found - aborting trace\n");