summaryrefslogtreecommitdiff
path: root/gcc/sched-deps.c
diff options
context:
space:
mode:
authormkuvyrkov <mkuvyrkov@138bc75d-0d04-0410-961f-82ee72b054a4>2007-10-17 19:50:55 +0000
committermkuvyrkov <mkuvyrkov@138bc75d-0d04-0410-961f-82ee72b054a4>2007-10-17 19:50:55 +0000
commitdb982eeb20178badf7f509b3523914bf4312b8a9 (patch)
treed4e5bbc949a517476a05b7d58c6980bc7235b670 /gcc/sched-deps.c
parent3041cd4a4724dcf3090f21a278dc8989b19b45db (diff)
downloadgcc-db982eeb20178badf7f509b3523914bf4312b8a9.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129417 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sched-deps.c')
-rw-r--r--gcc/sched-deps.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c
index cdd055b646f..d9f61eb385a 100644
--- a/gcc/sched-deps.c
+++ b/gcc/sched-deps.c
@@ -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 */