]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/stmt.c
Update copyright years.
[thirdparty/gcc.git] / gcc / stmt.c
index fba72df270efa45e61fbae189d67170f182ffce1..3d4e383c91c8a61a5adfc06b9a6656a84fe82c89 100644 (file)
@@ -1,5 +1,5 @@
 /* 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.
 
@@ -26,39 +26,29 @@ along with GCC; see the file COPYING3.  If not see
 #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"
@@ -106,7 +96,6 @@ struct case_node
   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);
@@ -148,7 +137,7 @@ force_label_rtx (tree label)
 
   gcc_assert (function);
 
-  forced_labels = gen_rtx_INSN_LIST (VOIDmode, ref, forced_labels);
+  vec_safe_push (forced_labels, ref);
   return ref;
 }
 
@@ -202,7 +191,7 @@ expand_label (tree label)
     }
 
   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);
@@ -446,7 +435,8 @@ parse_input_constraint (const char **constraint_p, int input_num,
        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);
@@ -469,7 +459,7 @@ decl_overlaps_hard_reg_set_p (tree *declp, int *walk_subtrees ATTRIBUTE_UNUSED,
   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))
@@ -730,7 +720,8 @@ do_jump_if_equal (machine_mode mode, rtx op0, rtx op1, rtx_code_label *label,
 
 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;
 
@@ -890,7 +881,7 @@ emit_case_decision_tree (tree index_expr, tree index_type,
     {
       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);
@@ -1138,7 +1129,7 @@ expand_case (gswitch *stmt)
   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?  */
@@ -1314,8 +1305,7 @@ expand_sjlj_dispatch_table (rtx dispatch_index,
     {
       /* 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 ());