summaryrefslogtreecommitdiff
path: root/gcc/sched-deps.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-29 12:37:05 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-29 12:37:05 +0000
commit12cb78d1cca1387a092ec0bd49c250340bff4afc (patch)
tree1eab97da96906e0a2786d51d9f25f20de02befcf /gcc/sched-deps.c
parent31879e18aea3222fe3e56f2c0319c9f230645ff3 (diff)
downloadgcc-12cb78d1cca1387a092ec0bd49c250340bff4afc.tar.gz
2012-08-29 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 190745 using svnmerge, notably C++ conversion. [gcc/] 2012-08-29 Basile Starynkevitch <basile@starynkevitch.net> {{merging with trunk, converted to C++}} * melt-runtime.h (MELT_FLEXIBLE_DIM): Set when C++. * melt-runtime.c (melt_tempdir_path): Don't use choose_tmpdir from libiberty. (meltgc_start_module_by_index): Use address-of & on VEC_index. (melt_really_initialize): When printing builtin settings, handle GCC 4.8 as with implicit ENABLE_BUILD_WITH_CXX. (meltgc_out_edge): Provide additional flag TDF_DETAILS for dump_edge_info. (melt_val2passflag): Handle PROP_referenced_vars only when defined. * melt-module.mk: Use GCCMELT_COMPILER instead of GCCMELT_CC. * melt-build-script.tpl: Transmit GCCMELT_COMPILER on every make using melt-module.mk and improve the error message. * melt-build-script.sh: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@190778 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sched-deps.c')
-rw-r--r--gcc/sched-deps.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c
index b92ba9b9334..1055ef4bba2 100644
--- a/gcc/sched-deps.c
+++ b/gcc/sched-deps.c
@@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see
#include "tm.h"
#include "diagnostic-core.h"
#include "rtl.h"
+#include "tree.h" /* FIXME: Used by call_may_noreturn_p. */
#include "tm_p.h"
#include "hard-reg-set.h"
#include "regs.h"
@@ -1563,24 +1564,15 @@ static void
add_dependence_list_and_free (struct deps_desc *deps, rtx insn, rtx *listp,
int uncond, enum reg_note dep_type)
{
- rtx list, next;
+ add_dependence_list (insn, *listp, uncond, dep_type);
/* We don't want to short-circuit dependencies involving debug
insns, because they may cause actual dependencies to be
disregarded. */
if (deps->readonly || DEBUG_INSN_P (insn))
- {
- add_dependence_list (insn, *listp, uncond, dep_type);
- return;
- }
+ return;
- for (list = *listp, *listp = NULL; list ; list = next)
- {
- next = XEXP (list, 1);
- if (uncond || ! sched_insns_conditions_mutex_p (insn, XEXP (list, 0)))
- add_dependence (insn, XEXP (list, 0), dep_type);
- free_INSN_LIST_node (list);
- }
+ free_INSN_LIST_list (listp);
}
/* Remove all occurrences of INSN from LIST. Return the number of
@@ -1764,6 +1756,15 @@ flush_pending_lists (struct deps_desc *deps, rtx insn, int for_read,
add_dependence_list_and_free (deps, insn, &deps->pending_jump_insns, 1,
REG_DEP_ANTI);
+ if (DEBUG_INSN_P (insn))
+ {
+ if (for_write)
+ free_INSN_LIST_list (&deps->pending_read_insns);
+ free_INSN_LIST_list (&deps->pending_write_insns);
+ free_INSN_LIST_list (&deps->last_pending_memory_flush);
+ free_INSN_LIST_list (&deps->pending_jump_insns);
+ }
+
if (!deps->readonly)
{
free_EXPR_LIST_list (&deps->pending_write_mems);
@@ -2546,10 +2547,7 @@ sched_analyze_2 (struct deps_desc *deps, rtx x, rtx insn)
switch (code)
{
- case CONST_INT:
- case CONST_DOUBLE:
- case CONST_FIXED:
- case CONST_VECTOR:
+ CASE_CONST_ANY:
case SYMBOL_REF:
case CONST:
case LABEL_REF:
@@ -3374,6 +3372,8 @@ sched_analyze_insn (struct deps_desc *deps, rtx x, rtx insn)
/* Return TRUE if INSN might not always return normally (e.g. call exit,
longjmp, loop forever, ...). */
+/* FIXME: Why can't this function just use flags_from_decl_or_type and
+ test for ECF_NORETURN? */
static bool
call_may_noreturn_p (rtx insn)
{