Commit a750daa2 by Maxim Kuvyrkov Committed by Maxim Kuvyrkov

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