/* Post reload partially redundant load elimination
- Copyright (C) 2004-2015 Free Software Foundation, Inc.
+ Copyright (C) 2004-2017 Free Software Foundation, Inc.
This file is part of GCC.
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "tm.h"
-#include "diagnostic-core.h"
-
+#include "backend.h"
+#include "target.h"
#include "rtl.h"
-#include "alias.h"
-#include "symtab.h"
#include "tree.h"
+#include "predict.h"
+#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
-#include "regs.h"
-#include "hard-reg-set.h"
-#include "flags.h"
#include "insn-config.h"
+#include "emit-rtl.h"
#include "recog.h"
-#include "predict.h"
-#include "function.h"
-#include "dominance.h"
-#include "cfg.h"
+
#include "cfgrtl.h"
-#include "basic-block.h"
#include "profile.h"
-#include "expmed.h"
-#include "dojump.h"
-#include "explow.h"
-#include "calls.h"
-#include "emit-rtl.h"
-#include "varasm.h"
-#include "stmt.h"
#include "expr.h"
-#include "except.h"
-#include "intl.h"
-#include "obstack.h"
#include "params.h"
-#include "target.h"
#include "tree-pass.h"
#include "dbgcnt.h"
-#include "df.h"
#include "gcse-common.h"
/* The following code implements gcse after reload, the purpose of this
/* Hashtable helpers. */
-struct expr_hasher : typed_noop_remove <expr>
+struct expr_hasher : nofree_ptr_hash <expr>
{
- typedef expr *value_type;
- typedef expr *compare_type;
static inline hashval_t hash (const expr *);
static inline bool equal (const expr *, const expr *);
};
BITMAP_FREE (blocks_with_calls);
BITMAP_FREE (modify_mem_list_set);
free (reg_avail_info);
+ free (modify_mem_list);
+ free (canon_modify_mem_list);
}
\f
FOR_EACH_EDGE (pred, ei, bb->preds)
{
- if ((pred->flags & EDGE_ABNORMAL) && EDGE_CRITICAL_P (pred))
+ /* commit_one_edge_insertion refuses to insert on abnormal edges even if
+ the source has only one successor so EDGE_CRITICAL_P is too weak. */
+ if ((pred->flags & EDGE_ABNORMAL) && !single_pred_p (pred->dest))
return false;
if ((pred->flags & EDGE_ABNORMAL_CALL) && cfun->has_nonlocal_label)