]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/tree-chkp-opt.c
Update copyright years.
[thirdparty/gcc.git] / gcc / tree-chkp-opt.c
index c4b92ac41f8b99d69641c53b56cb41519be021fa..6c84caee8ce7d3de35c3758969f983155bb7b9b1 100644 (file)
@@ -1,5 +1,5 @@
 /* Pointer Bounds Checker optimization pass.
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2017 Free Software Foundation, Inc.
    Contributed by Ilya Enkovich (ilya.enkovich@intel.com)
 
 This file is part of GCC.
@@ -28,28 +28,12 @@ along with GCC; see the file COPYING3.  If not see
 #include "gimple.h"
 #include "tree-pass.h"
 #include "ssa.h"
-#include "expmed.h"
-#include "insn-config.h"
-#include "emit-rtl.h"
 #include "gimple-pretty-print.h"
 #include "diagnostic.h"
-#include "alias.h"
 #include "fold-const.h"
 #include "tree-cfg.h"
-#include "cfgloop.h"
-#include "tree-ssa-address.h"
-#include "tree-ssa.h"
 #include "tree-ssa-loop-niter.h"
 #include "gimple-iterator.h"
-#include "gimplify.h"
-#include "gimplify-me.h"
-#include "flags.h"
-#include "dojump.h"
-#include "explow.h"
-#include "calls.h"
-#include "varasm.h"
-#include "stmt.h"
-#include "expr.h"
 #include "tree-chkp.h"
 #include "ipa-chkp.h"
 
@@ -100,7 +84,7 @@ static void chkp_collect_value (tree ssa_name, address_t &res);
 #define chkp_checku_fndecl \
   (targetm.builtin_chkp_function (BUILT_IN_CHKP_BNDCU))
 
-static vec<struct bb_checks, va_heap, vl_ptr> check_infos = vNULL;
+static vec<struct bb_checks, va_heap, vl_ptr> check_infos;
 
 /* Comparator for pol_item structures I1 and I2 to be used
    to find items with equal var.  Also used for polynomial
@@ -626,7 +610,7 @@ chkp_get_check_result (struct check_info *ci, tree bounds)
       chkp_collect_value (DECL_INITIAL (bnd_var), bound_val);
       if (ci->type == CHECK_UPPER_BOUND)
        {
-         if (TREE_CODE (var) == VAR_DECL)
+         if (VAR_P (var))
            {
              if (DECL_SIZE (var)
                  && !chkp_variable_size_type (TREE_TYPE (var)))
@@ -1252,6 +1236,8 @@ chkp_reduce_bounds_lifetime (void)
                  gsi_move_before (&i, &gsi);
                }
 
+             gimple_set_vdef (stmt, NULL_TREE);
+             gimple_set_vuse (stmt, NULL_TREE);
              update_stmt (stmt);
            }
        }