sched-ebb.c: Surround code with '#ifdef INSN_SCHEDULING'.
* sched-ebb.c: Surround code with '#ifdef INSN_SCHEDULING'. * ddg.c: Ditto. * sched-deps.c: Ditto. Remove nested #ifdef's INSN_SCHEDULING. * sched-int.h: Surround declarations with '#ifdef INSN_SCHEDULING'. (print_insn): Move declaration to ... * rtl.h (print_insn): ... here. From-SVN: r129417
This commit is contained in:
parent
fb7803cb2b
commit
a750daa285
6 changed files with 34 additions and 21 deletions
|
@ -1,3 +1,19 @@
|
|||
2007-10-17 Maxim Kuvyrkov <maxim@codesourcery.com>
|
||||
|
||||
* sched-ebb.c: Surround code with '#ifdef INSN_SCHEDULING'.
|
||||
* ddg.c: Ditto.
|
||||
* sched-deps.c: Ditto. Remove nested #ifdef's INSN_SCHEDULING.
|
||||
* sched-int.h: Surround declarations with '#ifdef INSN_SCHEDULING'.
|
||||
(print_insn): Move declaration to ...
|
||||
* rtl.h (print_insn): ... here.
|
||||
|
||||
2007-10-17 Maxim Kuvyrkov <maxim@codesourcery.com>
|
||||
|
||||
* config/m68k/m68k.h (m68k_sched_cpu, m68k_sched_attr_opx_type,
|
||||
m68k_sched_attr_opy_type, m68k_sched_attr_size, m68k_sched_attr_op_mem,
|
||||
m68k_sched_branch_type): Move declarations to ...
|
||||
* config/m68/m68k-protos.h: ... here.
|
||||
|
||||
2007-10-17 Maxim Kuvyrkov <maxim@codesourcery.com>
|
||||
|
||||
* genattrtab.c (main): Rearrange output of insn-attrtab.c headers.
|
||||
|
|
|
@ -44,6 +44,8 @@ along with GCC; see the file COPYING3. If not see
|
|||
#include "bitmap.h"
|
||||
#include "ddg.h"
|
||||
|
||||
#ifdef INSN_SCHEDULING
|
||||
|
||||
/* A flag indicating that a ddg edge belongs to an SCC or not. */
|
||||
enum edge_flag {NOT_IN_SCC = 0, IN_SCC};
|
||||
|
||||
|
@ -1104,3 +1106,5 @@ longest_simple_path (struct ddg * g, int src, int dest, sbitmap nodes)
|
|||
sbitmap_free (tmp);
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif /* INSN_SCHEDULING */
|
||||
|
|
|
@ -2110,6 +2110,7 @@ extern void dump_combine_total_stats (FILE *);
|
|||
extern void delete_dead_jumptables (void);
|
||||
|
||||
/* In sched-vis.c. */
|
||||
extern void print_insn (char *, rtx, int);
|
||||
extern void print_rtl_slim_with_bb (FILE *, rtx, int);
|
||||
extern void dump_insn_slim (FILE *f, rtx x);
|
||||
extern void debug_insn_slim (rtx x);
|
||||
|
|
|
@ -42,6 +42,8 @@ along with GCC; see the file COPYING3. If not see
|
|||
#include "params.h"
|
||||
#include "cselib.h"
|
||||
|
||||
#ifdef INSN_SCHEDULING
|
||||
|
||||
#ifdef ENABLE_CHECKING
|
||||
#define CHECK (true)
|
||||
#else
|
||||
|
@ -437,11 +439,9 @@ static enum DEPS_ADJUST_RESULT maybe_add_or_update_dep_1 (dep_t, bool,
|
|||
static enum DEPS_ADJUST_RESULT add_or_update_dep_1 (dep_t, bool, rtx, rtx);
|
||||
|
||||
static dw_t estimate_dep_weak (rtx, rtx);
|
||||
#ifdef INSN_SCHEDULING
|
||||
#ifdef ENABLE_CHECKING
|
||||
static void check_dep (dep_t, bool);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Return nonzero if a load of the memory reference MEM can cause a trap. */
|
||||
|
||||
|
@ -752,11 +752,9 @@ maybe_add_or_update_dep_1 (dep_t dep, bool resolved_p, rtx mem1, rtx mem2)
|
|||
/* Don't depend an insn on itself. */
|
||||
if (insn == elem)
|
||||
{
|
||||
#ifdef INSN_SCHEDULING
|
||||
if (current_sched_info->flags & DO_SPECULATION)
|
||||
/* INSN has an internal dependence, which we can't overcome. */
|
||||
HAS_INTERNAL_DEP (insn) = 1;
|
||||
#endif
|
||||
|
||||
return DEP_NODEP;
|
||||
}
|
||||
|
@ -764,7 +762,6 @@ maybe_add_or_update_dep_1 (dep_t dep, bool resolved_p, rtx mem1, rtx mem2)
|
|||
return add_or_update_dep_1 (dep, resolved_p, mem1, mem2);
|
||||
}
|
||||
|
||||
#ifdef INSN_SCHEDULING
|
||||
/* Ask dependency caches what needs to be done for dependence DEP.
|
||||
Return DEP_CREATED if new dependence should be created and there is no
|
||||
need to try to find one searching the dependencies lists.
|
||||
|
@ -935,7 +932,6 @@ change_spec_dep_to_hard (sd_iterator_def sd_it)
|
|||
bitmap_clear_bit (&spec_dependency_cache[INSN_LUID (insn)],
|
||||
INSN_LUID (elem));
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Update DEP to incorporate information from NEW_DEP.
|
||||
SD_IT points to DEP in case it should be moved to another list.
|
||||
|
@ -959,7 +955,6 @@ update_dep (dep_t dep, dep_t new_dep,
|
|||
res = DEP_CHANGED;
|
||||
}
|
||||
|
||||
#ifdef INSN_SCHEDULING
|
||||
if (current_sched_info->flags & USE_DEPS_LIST)
|
||||
/* Update DEP_STATUS. */
|
||||
{
|
||||
|
@ -1009,7 +1004,6 @@ update_dep (dep_t dep, dep_t new_dep,
|
|||
if (true_dependency_cache != NULL
|
||||
&& res == DEP_CHANGED)
|
||||
update_dependency_caches (dep, old_type);
|
||||
#endif
|
||||
|
||||
return res;
|
||||
}
|
||||
|
@ -1031,8 +1025,6 @@ add_or_update_dep_1 (dep_t new_dep, bool resolved_p,
|
|||
gcc_assert (INSN_P (DEP_PRO (new_dep)) && INSN_P (DEP_CON (new_dep))
|
||||
&& DEP_PRO (new_dep) != DEP_CON (new_dep));
|
||||
|
||||
#ifdef INSN_SCHEDULING
|
||||
|
||||
#ifdef ENABLE_CHECKING
|
||||
check_dep (new_dep, mem1 != NULL);
|
||||
#endif
|
||||
|
@ -1059,7 +1051,6 @@ add_or_update_dep_1 (dep_t new_dep, bool resolved_p,
|
|||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Check that we don't already have this dependence. */
|
||||
if (maybe_present_p)
|
||||
|
@ -1148,7 +1139,6 @@ sd_add_dep (dep_t dep, bool resolved_p)
|
|||
|
||||
add_to_deps_list (DEP_NODE_BACK (n), con_back_deps);
|
||||
|
||||
#ifdef INSN_SCHEDULING
|
||||
#ifdef ENABLE_CHECKING
|
||||
check_dep (dep, false);
|
||||
#endif
|
||||
|
@ -1159,7 +1149,6 @@ sd_add_dep (dep_t dep, bool resolved_p)
|
|||
in the bitmap caches of dependency information. */
|
||||
if (true_dependency_cache != NULL)
|
||||
set_dependency_caches (dep);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Add or update backward dependence between INSN and ELEM
|
||||
|
@ -2202,7 +2191,6 @@ sched_analyze_insn (struct deps *deps, rtx x, rtx insn)
|
|||
if (SCHED_GROUP_P (insn))
|
||||
fixup_sched_groups (insn);
|
||||
|
||||
#ifdef INSN_SCHEDULING
|
||||
if ((current_sched_info->flags & DO_SPECULATION)
|
||||
&& !sched_insn_is_legitimate_for_speculation_p (insn, 0))
|
||||
/* INSN has an internal dependency (e.g. r14 = [r14]) and thus cannot
|
||||
|
@ -2215,7 +2203,6 @@ sched_analyze_insn (struct deps *deps, rtx x, rtx insn)
|
|||
sd_iterator_cond (&sd_it, &dep);)
|
||||
change_spec_dep_to_hard (sd_it);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Analyze every insn between HEAD and TAIL inclusive, creating backward
|
||||
|
@ -2788,7 +2775,6 @@ debug_ds (ds_t s)
|
|||
fprintf (stderr, "\n");
|
||||
}
|
||||
|
||||
#ifdef INSN_SCHEDULING
|
||||
#ifdef ENABLE_CHECKING
|
||||
/* Verify that dependence type and status are consistent.
|
||||
If RELAXED_P is true, then skip dep_weakness checks. */
|
||||
|
@ -2871,5 +2857,6 @@ check_dep (dep_t dep, bool relaxed_p)
|
|||
gcc_assert (ds & BEGIN_CONTROL);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif /* ENABLE_CHECKING */
|
||||
|
||||
#endif /* INSN_SCHEDULING */
|
||||
|
|
|
@ -44,6 +44,8 @@ along with GCC; see the file COPYING3. If not see
|
|||
#include "output.h"
|
||||
|
||||
|
||||
#ifdef INSN_SCHEDULING
|
||||
|
||||
/* The number of insns scheduled so far. */
|
||||
static int sched_n_insns;
|
||||
|
||||
|
@ -696,3 +698,5 @@ fix_recovery_cfg (int bbi ATTRIBUTE_UNUSED, int jump_bbi, int jump_bb_nexti)
|
|||
if (jump_bb_nexti == last_bb->index)
|
||||
last_bb = BASIC_BLOCK (jump_bbi);
|
||||
}
|
||||
|
||||
#endif /* INSN_SCHEDULING */
|
||||
|
|
|
@ -22,6 +22,8 @@ along with GCC; see the file COPYING3. If not see
|
|||
#ifndef GCC_SCHED_INT_H
|
||||
#define GCC_SCHED_INT_H
|
||||
|
||||
#ifdef INSN_SCHEDULING
|
||||
|
||||
/* For state_t. */
|
||||
#include "insn-attr.h"
|
||||
/* For regset_head. */
|
||||
|
@ -807,9 +809,6 @@ enum INSN_TRAP_CLASS
|
|||
#define HAIFA_INLINE __inline
|
||||
#endif
|
||||
|
||||
/* Functions in sched-vis.c. */
|
||||
extern void print_insn (char *, rtx, int);
|
||||
|
||||
/* Functions in sched-deps.c. */
|
||||
extern bool sched_insns_conditions_mutex_p (const_rtx, const_rtx);
|
||||
extern void add_dependence (rtx, rtx, enum reg_note);
|
||||
|
@ -992,4 +991,6 @@ extern void sd_copy_back_deps (rtx, rtx, bool);
|
|||
extern void sd_delete_dep (sd_iterator_def);
|
||||
extern void sd_debug_lists (rtx, sd_list_types_def);
|
||||
|
||||
#endif /* INSN_SCHEDULING */
|
||||
|
||||
#endif /* GCC_SCHED_INT_H */
|
||||
|
|
Loading…
Add table
Reference in a new issue