/* Expands front end tree to back end RTL for GCC
- Copyright (C) 1987-2015 Free Software Foundation, Inc.
+ Copyright (C) 1987-2017 Free Software Foundation, Inc.
This file is part of GCC.
#include "system.h"
#include "coretypes.h"
#include "backend.h"
-#include "predict.h"
+#include "target.h"
+#include "rtl.h"
#include "tree.h"
#include "gimple.h"
-#include "rtl.h"
+#include "predict.h"
+#include "alloc-pool.h"
+#include "memmodel.h"
+#include "tm_p.h"
+#include "optabs.h"
+#include "regs.h"
+#include "emit-rtl.h"
+#include "pretty-print.h"
+#include "diagnostic-core.h"
-#include "alias.h"
#include "fold-const.h"
#include "varasm.h"
#include "stor-layout.h"
-#include "tm_p.h"
-#include "flags.h"
-#include "except.h"
-#include "insn-config.h"
-#include "expmed.h"
#include "dojump.h"
#include "explow.h"
-#include "calls.h"
-#include "emit-rtl.h"
#include "stmt.h"
#include "expr.h"
-#include "libfuncs.h"
-#include "recog.h"
-#include "diagnostic-core.h"
-#include "output.h"
#include "langhooks.h"
-#include "insn-codes.h"
-#include "optabs.h"
-#include "target.h"
#include "cfganal.h"
-#include "internal-fn.h"
-#include "regs.h"
-#include "alloc-pool.h"
-#include "pretty-print.h"
#include "params.h"
#include "dumpfile.h"
#include "builtins.h"
int subtree_prob;
};
-typedef struct case_node case_node;
typedef struct case_node *case_node_ptr;
extern basic_block label_to_block_fn (struct function *, tree);
gcc_assert (function);
- forced_labels = gen_rtx_INSN_LIST (VOIDmode, ref, forced_labels);
+ vec_safe_push (forced_labels, ref);
return ref;
}
}
if (FORCED_LABEL (label))
- forced_labels = gen_rtx_INSN_LIST (VOIDmode, label_r, forced_labels);
+ vec_safe_push<rtx_insn *> (forced_labels, label_r);
if (DECL_NONLOCAL (label) || FORCED_LABEL (label))
maybe_set_first_label_num (label_r);
if (reg_class_for_constraint (cn) != NO_REGS
|| insn_extra_address_constraint (cn))
*allows_reg = true;
- else if (insn_extra_memory_constraint (cn))
+ else if (insn_extra_memory_constraint (cn)
+ || insn_extra_special_memory_constraint (cn))
*allows_mem = true;
else
insn_extra_constraint_allows_reg_mem (cn, allows_reg, allows_mem);
tree decl = *declp;
const HARD_REG_SET *const regs = (const HARD_REG_SET *) data;
- if (TREE_CODE (decl) == VAR_DECL)
+ if (VAR_P (decl))
{
if (DECL_HARD_REGISTER (decl)
&& REG_P (DECL_RTL (decl))
static struct case_node *
add_case_node (struct case_node *head, tree low, tree high,
- tree label, int prob, pool_allocator<case_node> &case_node_pool)
+ tree label, int prob,
+ object_allocator<case_node> &case_node_pool)
{
struct case_node *r;
{
index = copy_to_reg (index);
if (TREE_CODE (index_expr) == SSA_NAME)
- set_reg_attrs_for_decl_rtl (SSA_NAME_VAR (index_expr), index);
+ set_reg_attrs_for_decl_rtl (index_expr, index);
}
balance_case_nodes (&case_list, NULL);
struct case_node *case_list = 0;
/* A pool for case nodes. */
- pool_allocator<case_node> case_node_pool ("struct case_node pool", 100);
+ object_allocator<case_node> case_node_pool ("struct case_node pool");
/* An ERROR_MARK occurs for various reasons including invalid data type.
??? Can this still happen, with GIMPLE and all? */
{
/* Similar to expand_case, but much simpler. */
struct case_node *case_list = 0;
- pool_allocator<case_node> case_node_pool ("struct sjlj_case pool",
- ncases);
+ object_allocator<case_node> case_node_pool ("struct sjlj_case pool");
tree index_expr = make_tree (index_type, dispatch_index);
tree minval = build_int_cst (index_type, 0);
tree maxval = CASE_LOW (dispatch_table.last ());