From 3708a38963254cbb3708317ab61f8aac54defeeb Mon Sep 17 00:00:00 2001
From: David Malcolm <dmalcolm@redhat.com>
Date: Thu, 10 May 2018 06:31:40 -0400
Subject: [PATCH 28/33] FIXME: rename thing_enabled_p to optinfo_enabled_p

---
 gcc/dumpfile.h            |   2 +-
 gcc/tree-vect-data-refs.c | 224 ++++++++++++++--------------
 gcc/tree-vect-loop.c      | 368 +++++++++++++++++++++++-----------------------
 gcc/tree-vect-slp.c       | 126 ++++++++--------
 gcc/tree-vect-stmts.c     | 304 +++++++++++++++++++-------------------
 5 files changed, 512 insertions(+), 512 deletions(-)

diff --git a/gcc/dumpfile.h b/gcc/dumpfile.h
index 044c3ad..5a837c1 100644
--- a/gcc/dumpfile.h
+++ b/gcc/dumpfile.h
@@ -202,7 +202,7 @@ dump_enabled_p (void)
 }
 
 // FIXME:
-extern bool thing_enabled_p ();
+extern bool optinfo_enabled_p ();
 
 extern void fancy_dump_start ();
 extern void fancy_dump_finish ();
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index ad924d8..c8c8f67 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -72,7 +72,7 @@ vect_lanes_optab_supported_p (const char *name, convert_optab optab,
       limit_p = !targetm.array_mode_supported_p (mode, count);
       if (!int_mode_for_size (bits, limit_p).exists (&array_mode))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "no array mode for %s["
 			     HOST_WIDE_INT_PRINT_DEC "]\n",
@@ -83,14 +83,14 @@ vect_lanes_optab_supported_p (const char *name, convert_optab optab,
 
   if (convert_optab_handler (optab, array_mode, mode) == CODE_FOR_nothing)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
                          "cannot use %s<%s><%s>\n", name,
                          GET_MODE_NAME (array_mode), GET_MODE_NAME (mode));
       return false;
     }
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK,
                      "can use %s<%s><%s>\n", name, GET_MODE_NAME (array_mode),
                      GET_MODE_NAME (mode));
@@ -181,7 +181,7 @@ vect_check_nonzero_value (loop_vec_info loop_vinfo, tree value)
     if (checks[i] == value)
       return;
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     {
       vect_location_writeln (OPT_RECORD_REMARK, "need run-time check that ");
       dump_generic_expr (MSG_NOTE, TDF_SLIM, value);
@@ -338,7 +338,7 @@ vect_analyze_data_ref_dependence (struct data_dependence_relation *ddr,
       if (STMT_VINFO_GATHER_SCATTER_P (stmtinfo_a)
 	  || STMT_VINFO_GATHER_SCATTER_P (stmtinfo_b))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_FAILURE,
 			       "versioning for alias not supported for: "
@@ -353,7 +353,7 @@ vect_analyze_data_ref_dependence (struct data_dependence_relation *ddr,
 	  return true;
 	}
 
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	{
 	  vect_location_writeln (OPT_RECORD_FAILURE,
 			   "versioning for alias required: "
@@ -386,7 +386,7 @@ vect_analyze_data_ref_dependence (struct data_dependence_relation *ddr,
       if (STMT_VINFO_GATHER_SCATTER_P (stmtinfo_a)
 	  || STMT_VINFO_GATHER_SCATTER_P (stmtinfo_b))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_FAILURE,
 			       "versioning for alias not supported for: "
@@ -401,7 +401,7 @@ vect_analyze_data_ref_dependence (struct data_dependence_relation *ddr,
 	  return true;
 	}
 
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         {
           vect_location_writeln (OPT_RECORD_FAILURE,
                            "versioning for alias required: "
@@ -426,13 +426,13 @@ vect_analyze_data_ref_dependence (struct data_dependence_relation *ddr,
     {
       int dist = dist_v[loop_depth];
 
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_REMARK,
                          "dependence distance  = %d.\n", dist);
 
       if (dist == 0)
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_REMARK,
 	                       "dependence distance == 0 between ");
@@ -462,7 +462,7 @@ vect_analyze_data_ref_dependence (struct data_dependence_relation *ddr,
 	     where loads from the group interleave with the store.  */
 	  if (!vect_preserves_scalar_order_p (DR_STMT (dra), DR_STMT (drb)))
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		vect_location_writeln (OPT_RECORD_FAILURE,
 				 "READ_WRITE dependence in interleaving.\n");
 	      return true;
@@ -475,7 +475,7 @@ vect_analyze_data_ref_dependence (struct data_dependence_relation *ddr,
 		vect_check_nonzero_value (loop_vinfo, indicator);
 	      else if (integer_zerop (indicator))
 		{
-		  if (thing_enabled_p ())
+		  if (optinfo_enabled_p ())
 		    vect_location_writeln (OPT_RECORD_FAILURE,
 				 "access also has a zero step\n");
 		  return true;
@@ -489,7 +489,7 @@ vect_analyze_data_ref_dependence (struct data_dependence_relation *ddr,
 	  /* If DDR_REVERSED_P the order of the data-refs in DDR was
 	     reversed (to make distance vector positive), and the actual
 	     distance is negative.  */
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 	                     "dependence distance negative.\n");
 	  /* Record a negative dependence distance to later limit the
@@ -508,7 +508,7 @@ vect_analyze_data_ref_dependence (struct data_dependence_relation *ddr,
 	  /* The dependence distance requires reduction of the maximal
 	     vectorization factor.  */
 	  *max_vf = abs (dist);
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_REMARK,
 	                     "adjusting maximal vectorization factor to %i\n",
 	                     *max_vf);
@@ -518,13 +518,13 @@ vect_analyze_data_ref_dependence (struct data_dependence_relation *ddr,
 	{
 	  /* Dependence distance does not create dependence, as far as
 	     vectorization is concerned, in this case.  */
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_REMARK,
 	                     "dependence distance >= VF.\n");
 	  continue;
 	}
 
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	{
 	  vect_location_writeln (OPT_RECORD_FAILURE,
 	               "not vectorized, possible dependence "
@@ -554,7 +554,7 @@ vect_analyze_data_ref_dependences (loop_vec_info loop_vinfo,
   unsigned int i;
   struct data_dependence_relation *ddr;
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK,
                      "=== vect_analyze_data_ref_dependences ===\n");
 
@@ -619,7 +619,7 @@ vect_slp_analyze_data_ref_dependence (struct data_dependence_relation *ddr)
   /* Unknown data dependence.  */
   if (DDR_ARE_DEPENDENT (ddr) == chrec_dont_know)
     {
-      if  (thing_enabled_p ())
+      if  (optinfo_enabled_p ())
 	{
 	  vect_location_writeln (OPT_RECORD_FAILURE,
 			   "can't determine dependence between ");
@@ -629,7 +629,7 @@ vect_slp_analyze_data_ref_dependence (struct data_dependence_relation *ddr)
 	  dump_printf (MSG_MISSED_OPTIMIZATION,  "\n");
 	}
     }
-  else if (thing_enabled_p ())
+  else if (optinfo_enabled_p ())
     {
       vect_location_writeln (OPT_RECORD_REMARK,
 		       "determined dependence between ");
@@ -724,7 +724,7 @@ vect_slp_analyze_node_dependences (slp_instance instance, slp_tree node,
 bool
 vect_slp_analyze_instance_dependence (slp_instance instance)
 {
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK,
                      "=== vect_slp_analyze_instance_dependence ===\n");
 
@@ -784,7 +784,7 @@ vect_record_base_alignment (vec_info *vinfo, gimple *stmt,
   if (!existed || entry->base_alignment < drb->base_alignment)
     {
       entry = drb;
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	{
 	  vect_location_writeln (OPT_RECORD_REMARK,
 			   "recording new base alignment for ");
@@ -867,7 +867,7 @@ vect_compute_data_ref_alignment (struct data_reference *dr)
   tree ref = DR_REF (dr);
   tree vectype = STMT_VINFO_VECTYPE (stmt_info);
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK,
                      "vect_compute_data_ref_alignment:\n");
 
@@ -902,7 +902,7 @@ vect_compute_data_ref_alignment (struct data_reference *dr)
       step_preserves_misalignment_p
 	= (DR_STEP_ALIGNMENT (dr) % vector_alignment) == 0;
 
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	{
 	  if (step_preserves_misalignment_p)
 	    vect_location_writeln (OPT_RECORD_REMARK,
@@ -924,7 +924,7 @@ vect_compute_data_ref_alignment (struct data_reference *dr)
       step_preserves_misalignment_p
 	= multiple_p (DR_STEP_ALIGNMENT (dr) * vf, vector_alignment);
 
-      if (!step_preserves_misalignment_p && thing_enabled_p ())
+      if (!step_preserves_misalignment_p && optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "step doesn't divide the vector alignment.\n");
     }
@@ -947,7 +947,7 @@ vect_compute_data_ref_alignment (struct data_reference *dr)
 	 negative when computing the starting misalignment below.  */
       || TREE_CODE (drb->step) != INTEGER_CST)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	{
 	  vect_location_writeln (OPT_RECORD_FAILURE,
 	                   "Unknown alignment for access: ");
@@ -965,7 +965,7 @@ vect_compute_data_ref_alignment (struct data_reference *dr)
 	  || !vect_can_force_dr_alignment_p (base,
 					     vector_alignment * BITS_PER_UNIT))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_REMARK,
 	                       "can't force alignment of ref: ");
@@ -978,7 +978,7 @@ vect_compute_data_ref_alignment (struct data_reference *dr)
       /* Force the alignment of the decl.
 	 NOTE: This is the only change to the code we make during
 	 the analysis phase, before deciding to vectorize the loop.  */
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         {
           vect_location_writeln (OPT_RECORD_REMARK, "force alignment of ");
           dump_generic_expr (MSG_NOTE, TDF_SLIM, ref);
@@ -1004,7 +1004,7 @@ vect_compute_data_ref_alignment (struct data_reference *dr)
   if (!known_misalignment (misalignment, vector_alignment,
 			   &const_misalignment))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	{
 	  vect_location_writeln (OPT_RECORD_FAILURE,
 			   "Non-constant misalignment for access: ");
@@ -1016,7 +1016,7 @@ vect_compute_data_ref_alignment (struct data_reference *dr)
 
   SET_DR_MISALIGNMENT (dr, const_misalignment);
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     {
       vect_location_writeln (OPT_RECORD_FAILURE,
                        "misalign = %d bytes of ref ", DR_MISALIGNMENT (dr));
@@ -1085,7 +1085,7 @@ vect_update_misalignment_for_peel (struct data_reference *dr,
       return;
     }
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK, "Setting misalignment " \
 		     "to unknown (-1).\n");
   SET_DR_MISALIGNMENT (dr, DR_MISALIGNMENT_UNKNOWN);
@@ -1103,7 +1103,7 @@ verify_data_ref_alignment (data_reference_p dr)
     = vect_supportable_dr_alignment (dr, false);
   if (!supportable_dr_alignment)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	{
 	  if (DR_IS_READ (dr))
 	    vect_location_writeln (OPT_RECORD_FAILURE,
@@ -1120,7 +1120,7 @@ verify_data_ref_alignment (data_reference_p dr)
       return false;
     }
 
-  if (supportable_dr_alignment != dr_aligned && thing_enabled_p ())
+  if (supportable_dr_alignment != dr_aligned && optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK,
 		     "Vectorizing an unaligned access.\n");
 
@@ -1216,7 +1216,7 @@ vector_alignment_reachable_p (struct data_reference *dr)
     {
       HOST_WIDE_INT elmsize =
 		int_cst_value (TYPE_SIZE_UNIT (TREE_TYPE (vectype)));
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	{
 	  vect_location_writeln (OPT_RECORD_REMARK,
 	                   "data size =" HOST_WIDE_INT_PRINT_DEC, elmsize);
@@ -1225,7 +1225,7 @@ vector_alignment_reachable_p (struct data_reference *dr)
 	}
       if (DR_MISALIGNMENT (dr) % elmsize)
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 	                     "data size does not divide the misalignment.\n");
 	  return false;
@@ -1236,7 +1236,7 @@ vector_alignment_reachable_p (struct data_reference *dr)
     {
       tree type = TREE_TYPE (DR_REF (dr));
       bool is_packed = not_size_aligned (DR_REF (dr));
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 	                 "Unknown misalignment, %snaturally aligned\n",
 			 is_packed ? "not " : "");
@@ -1271,7 +1271,7 @@ vect_get_data_access_cost (struct data_reference *dr,
   else
     vect_get_store_cost (dr, ncopies, inside_cost, body_cost_vec);
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK,
                      "vect_get_data_access_cost: inside_cost = %d, "
                      "outside_cost = %d.\n", *inside_cost, *outside_cost);
@@ -1662,7 +1662,7 @@ vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo)
   unsigned int mis, same_align_drs_max = 0;
   hash_table<peel_info_hasher> peeling_htab (1);
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK,
                      "=== vect_enhance_data_refs_alignment ===\n");
 
@@ -1828,7 +1828,7 @@ vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo)
         {
           if (!aligned_access_p (dr))
             {
-              if (thing_enabled_p ())
+              if (optinfo_enabled_p ())
                 vect_location_writeln (OPT_RECORD_FAILURE,
                                  "vector alignment may not be reachable\n");
               break;
@@ -2022,7 +2022,7 @@ vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo)
 	  if (STMT_VINFO_GROUPED_ACCESS (stmt_info))
 	    npeel /= GROUP_SIZE (stmt_info);
 
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
             vect_location_writeln (OPT_RECORD_REMARK,
                              "Try peeling by %d\n", npeel);
         }
@@ -2057,7 +2057,7 @@ vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo)
               if (max_peel > max_allowed_peel)
                 {
                   do_peeling = false;
-                  if (thing_enabled_p ())
+                  if (optinfo_enabled_p ())
                     vect_location_writeln (OPT_RECORD_REMARK,
                         "Disable peeling, max peels reached: %d\n", max_peel);
                 }
@@ -2107,7 +2107,7 @@ vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo)
             LOOP_VINFO_PEELING_FOR_ALIGNMENT (loop_vinfo)
 	      = DR_MISALIGNMENT (dr0);
 	  SET_DR_MISALIGNMENT (dr0, 0);
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
             {
               vect_location_writeln (OPT_RECORD_REMARK,
                                "Alignment of access forced using peeling.\n");
@@ -2232,12 +2232,12 @@ vect_enhance_data_refs_alignment (loop_vec_info loop_vinfo)
           stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
           dr = STMT_VINFO_DATA_REF (stmt_info);
 	  SET_DR_MISALIGNMENT (dr, 0);
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
             vect_location_writeln (OPT_RECORD_REMARK,
                              "Alignment of access forced using versioning.\n");
         }
 
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_REMARK,
                          "Versioning for alignment will be applied.\n");
 
@@ -2300,7 +2300,7 @@ vect_find_same_alignment_drs (struct data_dependence_relation *ddr)
 
   STMT_VINFO_SAME_ALIGN_REFS (stmtinfo_a).safe_push (drb);
   STMT_VINFO_SAME_ALIGN_REFS (stmtinfo_b).safe_push (dra);
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     {
       vect_location_writeln (OPT_RECORD_REMARK,
 		       "accesses have the same alignment: ");
@@ -2320,7 +2320,7 @@ vect_find_same_alignment_drs (struct data_dependence_relation *ddr)
 bool
 vect_analyze_data_refs_alignment (loop_vec_info vinfo)
 {
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK,
                      "=== vect_analyze_data_refs_alignment ===\n");
 
@@ -2349,7 +2349,7 @@ vect_analyze_data_refs_alignment (loop_vec_info vinfo)
 	      && !STMT_VINFO_GROUPED_ACCESS (stmt_info))
 	    continue;
 
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "not vectorized: can't calculate alignment "
 			     "for data ref.\n");
@@ -2383,7 +2383,7 @@ vect_slp_analyze_and_verify_node_alignment (slp_tree node)
 	  && ! vect_compute_data_ref_alignment (first_dr))
       || ! verify_data_ref_alignment (dr))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "not vectorized: bad data alignment in basic "
 			 "block.\n");
@@ -2401,7 +2401,7 @@ vect_slp_analyze_and_verify_node_alignment (slp_tree node)
 bool
 vect_slp_analyze_and_verify_instance_alignment (slp_instance instance)
 {
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK,
                      "=== vect_slp_analyze_and_verify_instance_alignment ===\n");
 
@@ -2455,7 +2455,7 @@ vect_analyze_group_access_1 (struct data_reference *dr)
 	 simply not include that gap.  */
       if ((dr_step % type_size) != 0)
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_REMARK,
 	                       "Step ");
@@ -2487,7 +2487,7 @@ vect_analyze_group_access_1 (struct data_reference *dr)
 	  GROUP_FIRST_ELEMENT (vinfo_for_stmt (stmt)) = stmt;
 	  GROUP_SIZE (vinfo_for_stmt (stmt)) = groupsize;
 	  GROUP_GAP (stmt_info) = groupsize - 1;
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_REMARK,
 	                       "Detected single element interleaving ");
@@ -2500,7 +2500,7 @@ vect_analyze_group_access_1 (struct data_reference *dr)
 	  return true;
 	}
 
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         {
  	  vect_location_writeln (OPT_RECORD_FAILURE,
 	                   "not consecutive access ");
@@ -2542,13 +2542,13 @@ vect_analyze_group_access_1 (struct data_reference *dr)
             {
               if (DR_IS_WRITE (data_ref))
                 {
-                  if (thing_enabled_p ())
+                  if (optinfo_enabled_p ())
                     vect_location_writeln (OPT_RECORD_FAILURE,
                                      "Two store stmts share the same dr.\n");
                   return false;
                 }
 
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		vect_location_writeln (OPT_RECORD_FAILURE,
 				 "Two or more load stmts share the same dr.\n");
 
@@ -2576,7 +2576,7 @@ vect_analyze_group_access_1 (struct data_reference *dr)
 	      slp_impossible = true;
 	      if (DR_IS_WRITE (data_ref))
 		{
-                  if (thing_enabled_p ())
+                  if (optinfo_enabled_p ())
                     vect_location_writeln (OPT_RECORD_FAILURE,
                                      "interleaved store with gaps\n");
 		  return false;
@@ -2604,7 +2604,7 @@ vect_analyze_group_access_1 (struct data_reference *dr)
          inefficient way we have to cap earlier.  See PR78699 for example.  */
       if (groupsize > 4096)
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "group is too large\n");
 	  return false;
@@ -2615,7 +2615,7 @@ vect_analyze_group_access_1 (struct data_reference *dr)
       if (groupsize != count
 	  && !DR_IS_READ (dr))
         {
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "interleaved store with gaps\n");
 	  return false;
@@ -2628,7 +2628,7 @@ vect_analyze_group_access_1 (struct data_reference *dr)
       GROUP_GAP (vinfo_for_stmt (stmt)) = groupsize - last_accessed_element;
 
       GROUP_SIZE (vinfo_for_stmt (stmt)) = groupsize;
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	{
 	  vect_location_writeln (OPT_RECORD_REMARK,
 			   "Detected interleaving ");
@@ -2707,7 +2707,7 @@ vect_analyze_data_ref_access (struct data_reference *dr)
 
   if (loop_vinfo && !step)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 	                 "bad data-ref access in loop\n");
       return false;
@@ -2724,7 +2724,7 @@ vect_analyze_data_ref_access (struct data_reference *dr)
 	 loop-carried dependencies between inner loop iterations.  */
       if (loop->safelen < 2)
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_REMARK,
 			     "zero step in inner loop of nest\n");
 	  return false;
@@ -2741,7 +2741,7 @@ vect_analyze_data_ref_access (struct data_reference *dr)
       step = STMT_VINFO_DR_STEP (stmt_info);
       if (integer_zerop (step))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_REMARK,
 	                     "zero step in outer loop.\n");
 	  return DR_IS_READ (dr);
@@ -2764,7 +2764,7 @@ vect_analyze_data_ref_access (struct data_reference *dr)
 
   if (loop && nested_in_vect_loop_p (loop, stmt))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_REMARK,
 	                 "grouped access in outer loop.\n");
       return false;
@@ -2906,7 +2906,7 @@ vect_analyze_data_ref_accesses (vec_info *vinfo)
   vec<data_reference_p> datarefs = vinfo->datarefs;
   struct data_reference *dr;
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK,
                      "=== vect_analyze_data_ref_accesses ===\n");
 
@@ -3030,7 +3030,7 @@ vect_analyze_data_ref_accesses (vec_info *vinfo)
 		break;
 	    }
 
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_REMARK,
 			       "Detected interleaving ");
@@ -3060,7 +3060,7 @@ vect_analyze_data_ref_accesses (vec_info *vinfo)
     if (STMT_VINFO_VECTORIZABLE (vinfo_for_stmt (DR_STMT (dr))) 
         && !vect_analyze_data_ref_access (dr))
       {
-	if (thing_enabled_p ())
+	if (optinfo_enabled_p ())
 	  vect_location_writeln (OPT_RECORD_FAILURE,
 	                   "not vectorized: complicated access pattern.\n");
 
@@ -3213,7 +3213,7 @@ dependence_distance_ge_vf (data_dependence_relation *ddr,
 	return false;
     }
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     {
       vect_location_writeln (OPT_RECORD_REMARK,
 		       "dependence distance between ");
@@ -3255,7 +3255,7 @@ vect_check_lower_bound (loop_vec_info loop_vinfo, tree expr, bool unsigned_p,
 	  {
 	    lower_bounds[i].unsigned_p = unsigned_p;
 	    lower_bounds[i].min_value = min_value;
-	    if (thing_enabled_p ())
+	    if (optinfo_enabled_p ())
 	      {
 		vect_location_writeln (OPT_RECORD_REMARK,
 				 "updating run-time check to ");
@@ -3267,7 +3267,7 @@ vect_check_lower_bound (loop_vec_info loop_vinfo, tree expr, bool unsigned_p,
       }
 
   vec_lower_bound lower_bound (expr, unsigned_p, min_value);
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     {
       vect_location_writeln (OPT_RECORD_REMARK, "need a run-time check that ");
       dump_lower_bound (MSG_NOTE, lower_bound);
@@ -3353,7 +3353,7 @@ vect_prune_runtime_alias_test_list (loop_vec_info loop_vinfo)
   unsigned int i;
   tree length_factor;
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK,
                      "=== vect_prune_runtime_alias_test_list ===\n");
 
@@ -3401,7 +3401,7 @@ vect_prune_runtime_alias_test_list (loop_vec_info loop_vinfo)
 	  vec_object_pair new_pair (DDR_OBJECT_A (ddr), DDR_OBJECT_B (ddr));
 	  if (!compared_objects.add (new_pair))
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		{
 		  vect_location_writeln (OPT_RECORD_REMARK, "checking that ");
 		  dump_generic_expr (MSG_NOTE, TDF_SLIM, new_pair.first);
@@ -3426,7 +3426,7 @@ vect_prune_runtime_alias_test_list (loop_vec_info loop_vinfo)
 	  && (vect_preserves_scalar_order_p (stmt_a, stmt_b)
 	      || vectorizable_with_step_bound_p (dr_a, dr_b, &lower_bound)))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_REMARK,
 			       "no need for alias check between ");
@@ -3449,7 +3449,7 @@ vect_prune_runtime_alias_test_list (loop_vec_info loop_vinfo)
 	      || vect_small_gap_p (loop_vinfo, dr_b, lower_bound)))
 	{
 	  bool unsigned_p = dr_known_forward_stride_p (dr_a);
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_REMARK, "no alias between ");
 	      dump_generic_expr (MSG_NOTE, TDF_SLIM, DR_REF (dr_a));
@@ -3525,7 +3525,7 @@ vect_prune_runtime_alias_test_list (loop_vec_info loop_vinfo)
 					     segment_length_b,
 					     access_size_a,
 					     access_size_b);
-	  if (res >= 0 && thing_enabled_p ())
+	  if (res >= 0 && optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_REMARK,
 			       "can tell at compile time that ");
@@ -3543,7 +3543,7 @@ vect_prune_runtime_alias_test_list (loop_vec_info loop_vinfo)
 
 	  if (res == 1)
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		vect_location_writeln (OPT_RECORD_REMARK,
 				 "not vectorized: compilation time alias.\n");
 	      return false;
@@ -3571,7 +3571,7 @@ vect_prune_runtime_alias_test_list (loop_vec_info loop_vinfo)
 		   may_alias_ddrs.length (), count);
   if ((int) count > PARAM_VALUE (PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "number of versioning for alias "
 			 "run-time tests exceeds %d "
@@ -3951,7 +3951,7 @@ vect_analyze_data_refs (vec_info *vinfo, poly_uint64 *min_vf)
   struct data_reference *dr;
   tree scalar_type;
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK,
 		     "=== vect_analyze_data_refs ===\n");
 
@@ -3974,7 +3974,7 @@ vect_analyze_data_refs (vec_info *vinfo, poly_uint64 *min_vf)
 again:
       if (!dr || !DR_REF (dr))
         {
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 	                     "not vectorized: unhandled data-ref\n");
           return false;
@@ -4094,7 +4094,7 @@ again:
 
 	  if (gatherscatter == SG_NONE && !simd_lane_access)
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		{
 		  vect_location_writeln (OPT_RECORD_FAILURE,
                                    "not vectorized: data ref analysis "
@@ -4111,7 +4111,7 @@ again:
 
       if (TREE_CODE (DR_BASE_ADDRESS (dr)) == INTEGER_CST)
         {
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
             vect_location_writeln (OPT_RECORD_FAILURE,
                              "not vectorized: base addr of dr is a "
                              "constant\n");
@@ -4126,7 +4126,7 @@ again:
 
       if (TREE_THIS_VOLATILE (DR_REF (dr)))
         {
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
             {
               vect_location_writeln (OPT_RECORD_FAILURE,
                                "not vectorized: volatile type ");
@@ -4141,7 +4141,7 @@ again:
 
       if (stmt_can_throw_internal (stmt))
         {
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
             {
               vect_location_writeln (OPT_RECORD_FAILURE,
                                "not vectorized: statement can throw an "
@@ -4160,7 +4160,7 @@ again:
       if (TREE_CODE (DR_REF (dr)) == COMPONENT_REF
 	  && DECL_BIT_FIELD (TREE_OPERAND (DR_REF (dr), 1)))
 	{
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
             {
               vect_location_writeln (OPT_RECORD_FAILURE,
                                "not vectorized: statement is bitfield "
@@ -4185,7 +4185,7 @@ again:
 	      || (gimple_call_internal_fn (stmt) != IFN_MASK_LOAD
 		  && gimple_call_internal_fn (stmt) != IFN_MASK_STORE)))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      dump_printf_loc (MSG_MISSED_OPTIMIZATION,  vect_location,
 	                       "not vectorized: dr in a call ");
@@ -4219,7 +4219,7 @@ again:
 	  tree init_addr = fold_build_pointer_plus (base, init_offset);
 	  tree init_ref = build_fold_indirect_ref (init_addr);
 
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_REMARK,
                                "analyze in outer loop: ");
@@ -4232,7 +4232,7 @@ again:
 	    /* dr_analyze_innermost already explained the failure.  */
 	    return false;
 
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_REMARK,
                                "\touter base_address: ");
@@ -4261,7 +4261,7 @@ again:
 
       if (STMT_VINFO_DATA_REF (stmt_info))
         {
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
             {
               vect_location_writeln (OPT_RECORD_FAILURE,
                                "not vectorized: more than one data ref "
@@ -4289,7 +4289,7 @@ again:
 	  && VAR_P (TREE_OPERAND (DR_BASE_ADDRESS (dr), 0))
 	  && DECL_NONALIASED (TREE_OPERAND (DR_BASE_ADDRESS (dr), 0)))
 	{
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
             {
               vect_location_writeln (OPT_RECORD_FAILURE,
                                "not vectorized: base object not addressable "
@@ -4312,7 +4312,7 @@ again:
 	= get_vectype_for_scalar_type (scalar_type);
       if (!STMT_VINFO_VECTYPE (stmt_info))
         {
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
             {
               vect_location_writeln (OPT_RECORD_FAILURE,
                                "not vectorized: no vectype for stmt: ");
@@ -4341,7 +4341,7 @@ again:
         }
       else
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_REMARK,
 			       "got vectype for stmt: ");
@@ -4366,7 +4366,7 @@ again:
 	    {
 	      STMT_VINFO_DATA_REF (stmt_info) = NULL;
 	      free_data_ref (dr);
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		{
 		  vect_location_writeln (OPT_RECORD_FAILURE,
 				   (gatherscatter == GATHER) ?
@@ -4389,7 +4389,7 @@ again:
 	{
 	  if (nested_in_vect_loop_p (loop, stmt))
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		{
 		  vect_location_writeln (OPT_RECORD_FAILURE,
                                    "not vectorized: not suitable for strided "
@@ -4621,7 +4621,7 @@ vect_create_addr_base_for_vector_ref (gimple *stmt,
 	mark_ptr_info_alignment_unknown (SSA_NAME_PTR_INFO (addr_base));
     }
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     {
       vect_location_writeln (OPT_RECORD_REMARK, "created ");
       dump_generic_expr (MSG_NOTE, TDF_SLIM, addr_base);
@@ -4748,7 +4748,7 @@ vect_create_data_ref_ptr (gimple *stmt, tree aggr_type, struct loop *at_loop,
      in LOOP.  */
   base_name = get_name (DR_BASE_ADDRESS (dr));
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     {
       tree dr_base_type = TREE_TYPE (DR_BASE_OBJECT (dr));
       vect_location_writeln (OPT_RECORD_REMARK,
@@ -5078,7 +5078,7 @@ vect_grouped_store_supported (tree vectype, unsigned HOST_WIDE_INT count)
      be a power of two.  */
   if (count != 3 && exact_log2 (count) == -1)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "the size of the group of accesses"
 			 " is not a power of 2 or not eqaul to 3\n");
@@ -5097,7 +5097,7 @@ vect_grouped_store_supported (tree vectype, unsigned HOST_WIDE_INT count)
 	  unsigned int nelt;
 	  if (!GET_MODE_NUNITS (mode).is_constant (&nelt))
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		vect_location_writeln (OPT_RECORD_FAILURE,
 				 "cannot handle groups of 3 stores for"
 				 " variable-length vectors\n");
@@ -5124,7 +5124,7 @@ vect_grouped_store_supported (tree vectype, unsigned HOST_WIDE_INT count)
 	      indices.new_vector (sel, 2, nelt);
 	      if (!can_vec_perm_const_p (mode, indices))
 		{
-		  if (thing_enabled_p ())
+		  if (optinfo_enabled_p ())
 		    dump_printf (MSG_MISSED_OPTIMIZATION,
 				 "permutation op not supported by target.\n");
 		  return false;
@@ -5142,7 +5142,7 @@ vect_grouped_store_supported (tree vectype, unsigned HOST_WIDE_INT count)
 	      indices.new_vector (sel, 2, nelt);
 	      if (!can_vec_perm_const_p (mode, indices))
 		{
-		  if (thing_enabled_p ())
+		  if (optinfo_enabled_p ())
 		    dump_printf (MSG_MISSED_OPTIMIZATION,
 				 "permutation op not supported by target.\n");
 		  return false;
@@ -5176,7 +5176,7 @@ vect_grouped_store_supported (tree vectype, unsigned HOST_WIDE_INT count)
 	}
     }
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     dump_printf (MSG_MISSED_OPTIMIZATION,
 		 "permutaion op not supported by target.\n");
   return false;
@@ -5689,7 +5689,7 @@ vect_grouped_load_supported (tree vectype, bool single_element_p,
      see PR65518).  */
   if (single_element_p && maybe_gt (count, TYPE_VECTOR_SUBPARTS (vectype)))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "single-element interleaving not supported "
 			 "for not adjacent vector loads\n");
@@ -5700,7 +5700,7 @@ vect_grouped_load_supported (tree vectype, bool single_element_p,
      be a power of two.  */
   if (count != 3 && exact_log2 (count) == -1)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "the size of the group of accesses"
 			 " is not a power of 2 or not equal to 3\n");
@@ -5716,7 +5716,7 @@ vect_grouped_load_supported (tree vectype, bool single_element_p,
 	  unsigned int nelt;
 	  if (!GET_MODE_NUNITS (mode).is_constant (&nelt))
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		vect_location_writeln (OPT_RECORD_FAILURE,
 				 "cannot handle groups of 3 loads for"
 				 " variable-length vectors\n");
@@ -5737,7 +5737,7 @@ vect_grouped_load_supported (tree vectype, bool single_element_p,
 	      indices.new_vector (sel, 2, nelt);
 	      if (!can_vec_perm_const_p (mode, indices))
 		{
-		  if (thing_enabled_p ())
+		  if (optinfo_enabled_p ())
 		    vect_location_writeln (OPT_RECORD_FAILURE,
 				     "shuffle of 3 loads is not supported by"
 				     " target\n");
@@ -5751,7 +5751,7 @@ vect_grouped_load_supported (tree vectype, bool single_element_p,
 	      indices.new_vector (sel, 2, nelt);
 	      if (!can_vec_perm_const_p (mode, indices))
 		{
-		  if (thing_enabled_p ())
+		  if (optinfo_enabled_p ())
 		    vect_location_writeln (OPT_RECORD_FAILURE,
 				     "shuffle of 3 loads is not supported by"
 				     " target\n");
@@ -5783,7 +5783,7 @@ vect_grouped_load_supported (tree vectype, bool single_element_p,
         }
     }
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_FAILURE,
 		     "extract even/odd not supported by target\n");
   return false;
@@ -6126,7 +6126,7 @@ vect_shift_permute_load_chain (vec<tree> dr_chain,
       vec_perm_indices indices (sel, 2, nelt);
       if (!can_vec_perm_const_p (TYPE_MODE (vectype), indices))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "shuffle of 2 fields structure is not \
 			      supported by target\n");
@@ -6141,7 +6141,7 @@ vect_shift_permute_load_chain (vec<tree> dr_chain,
       indices.new_vector (sel, 2, nelt);
       if (!can_vec_perm_const_p (TYPE_MODE (vectype), indices))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "shuffle of 2 fields structure is not \
 			      supported by target\n");
@@ -6156,7 +6156,7 @@ vect_shift_permute_load_chain (vec<tree> dr_chain,
       indices.new_vector (sel, 2, nelt);
       if (!can_vec_perm_const_p (TYPE_MODE (vectype), indices))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "shift permutation is not supported by target\n");
 	  return false;
@@ -6172,7 +6172,7 @@ vect_shift_permute_load_chain (vec<tree> dr_chain,
       indices.new_vector (sel, 2, nelt);
       if (!can_vec_perm_const_p (TYPE_MODE (vectype), indices))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "select is not supported by target\n");
 	  return false;
@@ -6236,7 +6236,7 @@ vect_shift_permute_load_chain (vec<tree> dr_chain,
       vec_perm_indices indices (sel, 2, nelt);
       if (!can_vec_perm_const_p (TYPE_MODE (vectype), indices))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "shuffle of 3 fields structure is not \
 			      supported by target\n");
@@ -6251,7 +6251,7 @@ vect_shift_permute_load_chain (vec<tree> dr_chain,
       indices.new_vector (sel, 2, nelt);
       if (!can_vec_perm_const_p (TYPE_MODE (vectype), indices))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "shift permutation is not supported by target\n");
 	  return false;
@@ -6265,7 +6265,7 @@ vect_shift_permute_load_chain (vec<tree> dr_chain,
       indices.new_vector (sel, 2, nelt);
       if (!can_vec_perm_const_p (TYPE_MODE (vectype), indices))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "shift permutation is not supported by target\n");
 	  return false;
@@ -6279,7 +6279,7 @@ vect_shift_permute_load_chain (vec<tree> dr_chain,
       indices.new_vector (sel, 2, nelt);
       if (!can_vec_perm_const_p (TYPE_MODE (vectype), indices))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "shift permutation is not supported by target\n");
 	  return false;
@@ -6293,7 +6293,7 @@ vect_shift_permute_load_chain (vec<tree> dr_chain,
       indices.new_vector (sel, 2, nelt);
       if (!can_vec_perm_const_p (TYPE_MODE (vectype), indices))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "shift permutation is not supported by target\n");
 	  return false;
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 49b2f8a..a7c036e 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -157,7 +157,7 @@ along with GCC; see the file COPYING3.  If not see
 
 static void vect_estimate_min_profitable_iters (loop_vec_info, int *, int *);
 
-bool thing_enabled_p ()
+bool optinfo_enabled_p ()
 {
   return dump_enabled_p () || optimization_record_enabled_p ();
 }
@@ -254,7 +254,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
   bool bool_result;
   auto_vec<stmt_vec_info> mask_producers;
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK,
                      "=== vect_determine_vectorization_factor ===");
 
@@ -267,7 +267,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
 	{
 	  phi = si.phi ();
 	  stmt_info = vinfo_for_stmt (phi);
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_REMARK, "==> examining phi: ");
 	      dump_gimple_stmt (MSG_NOTE, TDF_SLIM, phi, 0);
@@ -281,7 +281,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
 	      gcc_assert (!STMT_VINFO_VECTYPE (stmt_info));
               scalar_type = TREE_TYPE (PHI_RESULT (phi));
 
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		{
 		  vect_location_writeln (OPT_RECORD_REMARK,
                                    "get vectype for scalar type:  ");
@@ -292,7 +292,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
 	      vectype = get_vectype_for_scalar_type (scalar_type);
 	      if (!vectype)
 		{
-		  if (thing_enabled_p ())
+		  if (optinfo_enabled_p ())
 		    {
 		      vect_location_writeln (OPT_RECORD_FAILURE,
                                        "not vectorized: unsupported "
@@ -305,14 +305,14 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
 		}
 	      STMT_VINFO_VECTYPE (stmt_info) = vectype;
 
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		{
 		  vect_location_writeln (OPT_RECORD_REMARK, "vectype: ");
 		  dump_generic_expr (MSG_NOTE, TDF_SLIM, vectype);
                   dump_printf (MSG_NOTE, "\n");
 		}
 
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		{
 		  vect_location_writeln (OPT_RECORD_REMARK, "nunits = ");
 		  dump_dec (MSG_NOTE, TYPE_VECTOR_SUBPARTS (vectype));
@@ -335,7 +335,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
 
           stmt_info = vinfo_for_stmt (stmt);
 
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_REMARK,
                                "==> examining statement: ");
@@ -356,7 +356,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
                 {
                   stmt = pattern_stmt;
                   stmt_info = vinfo_for_stmt (pattern_stmt);
-                  if (thing_enabled_p ())
+                  if (optinfo_enabled_p ())
                     {
                       vect_location_writeln (OPT_RECORD_REMARK,
                                        "==> examining pattern statement: ");
@@ -365,7 +365,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
                 }
               else
 	        {
-	          if (thing_enabled_p ())
+	          if (optinfo_enabled_p ())
 	            vect_location_writeln (OPT_RECORD_REMARK, "skip.\n");
                   gsi_next (&si);
 	          continue;
@@ -405,7 +405,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
 
 		  if (!gsi_end_p (pattern_def_si))
 		    {
-		      if (thing_enabled_p ())
+		      if (optinfo_enabled_p ())
 			{
 			  vect_location_writeln (OPT_RECORD_REMARK,
                                            "==> examining pattern def stmt: ");
@@ -445,7 +445,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
 		    }
 		  continue;
 		}
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		{
 	          vect_location_writeln (OPT_RECORD_FAILURE,
                                    "not vectorized: irregular stmt.");
@@ -457,7 +457,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
 
 	  if (VECTOR_MODE_P (TYPE_MODE (gimple_expr_type (stmt))))
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 	        {
 	          vect_location_writeln (OPT_RECORD_FAILURE,
                                    "not vectorized: vector stmt in loop:");
@@ -515,7 +515,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
 		    }
 		}
 
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		{
 		  vect_location_writeln (OPT_RECORD_REMARK,
                                    "get vectype for scalar type:  ");
@@ -525,7 +525,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
 	      vectype = get_vectype_for_scalar_type (scalar_type);
 	      if (!vectype)
 		{
-		  if (thing_enabled_p ())
+		  if (optinfo_enabled_p ())
 		    {
 		      vect_location_writeln (OPT_RECORD_FAILURE,
                                        "not vectorized: unsupported "
@@ -540,7 +540,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
 	      if (!bool_result)
 		STMT_VINFO_VECTYPE (stmt_info) = vectype;
 
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		{
 		  vect_location_writeln (OPT_RECORD_REMARK, "vectype: ");
 		  dump_generic_expr (MSG_NOTE, TDF_SLIM, vectype);
@@ -560,7 +560,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
 	      if (!bool_result)
 		scalar_type = vect_get_smallest_scalar_type (stmt, &dummy,
 							     &dummy);
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		{
 		  vect_location_writeln (OPT_RECORD_REMARK,
 				   "get vectype for scalar type:  ");
@@ -571,7 +571,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
 	    }
 	  if (!vf_vectype)
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		{
 		  vect_location_writeln (OPT_RECORD_FAILURE,
                                    "not vectorized: unsupported data-type ");
@@ -585,7 +585,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
 	  if (maybe_ne (GET_MODE_SIZE (TYPE_MODE (vectype)),
 			GET_MODE_SIZE (TYPE_MODE (vf_vectype))))
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		{
 		  vect_location_writeln (OPT_RECORD_FAILURE,
                                    "not vectorized: different sized vector "
@@ -600,14 +600,14 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
 	      return false;
 	    }
 
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_REMARK, "vectype: ");
 	      dump_generic_expr (MSG_NOTE, TDF_SLIM, vf_vectype);
               dump_printf (MSG_NOTE, "\n");
 	    }
 
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_REMARK, "nunits = ");
 	      dump_dec (MSG_NOTE, TYPE_VECTOR_SUBPARTS (vf_vectype));
@@ -625,7 +625,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
     }
 
   /* TODO: Analyze cost. Decide if worth while to vectorize.  */
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     {
       vect_location_writeln (OPT_RECORD_REMARK, "vectorization factor = ");
       dump_dec (MSG_NOTE, vectorization_factor);
@@ -634,7 +634,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
 
   if (known_le (vectorization_factor, 1U))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_FAILURE,
 			       "not vectorized: unsupported data-type");
       return false;
@@ -657,7 +657,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
 
 	  if (!mask_type)
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		vect_location_writeln (OPT_RECORD_FAILURE,
 				       "not vectorized: unsupported mask");
 	      return false;
@@ -675,7 +675,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
 	      if (!vect_is_simple_use (rhs, mask_producers[i]->vinfo,
 				       &def_stmt, &dt, &vectype))
 		{
-		  if (thing_enabled_p ())
+		  if (optinfo_enabled_p ())
 		    {
 		      vect_location_writeln (OPT_RECORD_FAILURE,
 				       "not vectorized: can't compute mask type "
@@ -697,7 +697,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
 	      else if (maybe_ne (TYPE_VECTOR_SUBPARTS (mask_type),
 				 TYPE_VECTOR_SUBPARTS (vectype)))
 		{
-		  if (thing_enabled_p ())
+		  if (optinfo_enabled_p ())
 		    {
 		      vect_location_writeln (OPT_RECORD_FAILURE,
 				       "not vectorized: different sized masks "
@@ -714,7 +714,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
 	      else if (VECTOR_BOOLEAN_TYPE_P (mask_type)
 		       != VECTOR_BOOLEAN_TYPE_P (vectype))
 		{
-		  if (thing_enabled_p ())
+		  if (optinfo_enabled_p ())
 		    {
 		      vect_location_writeln (OPT_RECORD_FAILURE,
 				       "not vectorized: mixed mask and "
@@ -744,7 +744,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
 	 if-conversion.  */
       if (!mask_type)
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_FAILURE,
 			       "not vectorized: can't compute mask type "
@@ -789,7 +789,7 @@ vect_is_simple_iv_evolution (unsigned loop_nb, tree access_fn, tree * init,
   step_expr = evolution_part;
   init_expr = unshare_expr (initial_condition_in_loop_num (access_fn, loop_nb));
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     {
       vect_location_writeln (OPT_RECORD_REMARK, "step: ");
       dump_generic_expr (MSG_NOTE, TDF_SLIM, step_expr);
@@ -811,7 +811,7 @@ vect_is_simple_iv_evolution (unsigned loop_nb, tree access_fn, tree * init,
       && (TREE_CODE (step_expr) != REAL_CST
 	  || !flag_associative_math))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_FAILURE,
 			       "step unknown");
       return false;
@@ -836,7 +836,7 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, struct loop *loop)
   gphi_iterator gsi;
   bool double_reduc;
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK,
 			   "=== vect_analyze_scalar_cycles ===");
 
@@ -850,7 +850,7 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, struct loop *loop)
       tree def = PHI_RESULT (phi);
       stmt_vec_info stmt_vinfo = vinfo_for_stmt (phi);
 
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	{
 	  vect_location_writeln (OPT_RECORD_REMARK, "Analyze phi: ");
 	  dump_gimple_stmt (MSG_NOTE, TDF_SLIM, phi, 0);
@@ -868,7 +868,7 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, struct loop *loop)
       if (access_fn)
 	{
 	  STRIP_NOPS (access_fn);
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_REMARK,
                                "Access function of PHI: ");
@@ -894,7 +894,7 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, struct loop *loop)
 		  != NULL_TREE);
       gcc_assert (STMT_VINFO_LOOP_PHI_EVOLUTION_PART (stmt_vinfo) != NULL_TREE);
 
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_REMARK, "Detected induction");
       STMT_VINFO_DEF_TYPE (stmt_vinfo) = vect_induction_def;
     }
@@ -908,7 +908,7 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, struct loop *loop)
       stmt_vec_info stmt_vinfo = vinfo_for_stmt (phi);
       gimple *reduc_stmt;
 
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         {
           vect_location_writeln (OPT_RECORD_REMARK, "Analyze phi: ");
           dump_gimple_stmt (MSG_NOTE, TDF_SLIM, phi, 0);
@@ -923,7 +923,7 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, struct loop *loop)
         {
           if (double_reduc)
             {
-              if (thing_enabled_p ())
+              if (optinfo_enabled_p ())
                 vect_location_writeln (OPT_RECORD_REMARK,
 				       "Detected double reduction");
 
@@ -935,7 +935,7 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, struct loop *loop)
             {
               if (loop != LOOP_VINFO_LOOP (loop_vinfo))
                 {
-                  if (thing_enabled_p ())
+                  if (optinfo_enabled_p ())
                     vect_location_writeln (OPT_RECORD_REMARK,
 					   "Detected vectorizable nested cycle");
 
@@ -945,7 +945,7 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, struct loop *loop)
                 }
               else
                 {
-                  if (thing_enabled_p ())
+                  if (optinfo_enabled_p ())
                     vect_location_writeln (OPT_RECORD_REMARK,
 					   "Detected reduction");
 
@@ -961,7 +961,7 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, struct loop *loop)
             }
         }
       else
-        if (thing_enabled_p ())
+        if (optinfo_enabled_p ())
           vect_location_writeln (OPT_RECORD_FAILURE,
 				 "Unknown def-use cycle pattern");
     }
@@ -1083,7 +1083,7 @@ vect_get_loop_niters (struct loop *loop, tree *assumptions,
   *assumptions = boolean_true_node;
   *number_of_iterationsm1 = chrec_dont_know;
   *number_of_iterations = chrec_dont_know;
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK,
 			   "=== get_loop_niters ===");
 
@@ -1524,7 +1524,7 @@ vect_analyze_loop_form_1 (struct loop *loop, gcond **loop_cond,
 			  tree *assumptions, tree *number_of_iterationsm1,
 			  tree *number_of_iterations, gcond **inner_loop_cond)
 {
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK,
 			   "=== vect_analyze_loop_form ===");
 
@@ -1548,7 +1548,7 @@ vect_analyze_loop_form_1 (struct loop *loop, gcond **loop_cond,
 
       if (loop->num_nodes != 2)
         {
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
             vect_location_writeln (OPT_RECORD_FAILURE,
 				   "not vectorized: control flow in loop");
           return false;
@@ -1556,7 +1556,7 @@ vect_analyze_loop_form_1 (struct loop *loop, gcond **loop_cond,
 
       if (empty_block_p (loop->header))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 				   "not vectorized: empty loop");
 	  return false;
@@ -1586,7 +1586,7 @@ vect_analyze_loop_form_1 (struct loop *loop, gcond **loop_cond,
 
       if ((loop->inner)->inner || (loop->inner)->next)
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 				   "not vectorized: multiple nested loops");
 	  return false;
@@ -1594,7 +1594,7 @@ vect_analyze_loop_form_1 (struct loop *loop, gcond **loop_cond,
 
       if (loop->num_nodes != 5)
         {
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 				   "not vectorized: control flow in loop");
 	  return false;
@@ -1605,7 +1605,7 @@ vect_analyze_loop_form_1 (struct loop *loop, gcond **loop_cond,
 	  || !single_exit (innerloop)
 	  || single_exit (innerloop)->dest != EDGE_PRED (loop->latch, 0)->src)
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 				   "not vectorized: unsupported outerloop form");
 	  return false;
@@ -1620,7 +1620,7 @@ vect_analyze_loop_form_1 (struct loop *loop, gcond **loop_cond,
 	     loop.  */
 	  || !integer_onep (inner_assumptions))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
             vect_location_writeln (OPT_RECORD_FAILURE,
 				   "not vectorized: bad inner loop");
 	  return false;
@@ -1628,14 +1628,14 @@ vect_analyze_loop_form_1 (struct loop *loop, gcond **loop_cond,
 
       if (!expr_invariant_in_loop_p (loop, inner_niter))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 				   "not vectorized: inner-loop count not"
 				   " invariant");
 	  return false;
 	}
 
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_REMARK,
 			       "Considering outer-loop vectorization");
     }
@@ -1643,7 +1643,7 @@ vect_analyze_loop_form_1 (struct loop *loop, gcond **loop_cond,
   if (!single_exit (loop)
       || EDGE_COUNT (loop->header->preds) != 2)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         {
           if (!single_exit (loop))
 	    vect_location_writeln (OPT_RECORD_FAILURE,
@@ -1662,7 +1662,7 @@ vect_analyze_loop_form_1 (struct loop *loop, gcond **loop_cond,
   if (!empty_block_p (loop->latch)
       || !gimple_seq_empty_p (phi_nodes (loop->latch)))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			       "not vectorized: latch block not empty");
       return false;
@@ -1672,7 +1672,7 @@ vect_analyze_loop_form_1 (struct loop *loop, gcond **loop_cond,
   edge e = single_exit (loop);
   if (e->flags & EDGE_ABNORMAL)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			       "not vectorized: abnormal loop exit edge");
       return false;
@@ -1682,7 +1682,7 @@ vect_analyze_loop_form_1 (struct loop *loop, gcond **loop_cond,
 				     number_of_iterationsm1);
   if (!*loop_cond)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			       "not vectorized: complicated exit condition");
       return false;
@@ -1692,7 +1692,7 @@ vect_analyze_loop_form_1 (struct loop *loop, gcond **loop_cond,
       || !*number_of_iterations
       || chrec_contains_undetermined (*number_of_iterations))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			       "not vectorized: number of iterations cannot be "
 			       "computed");
@@ -1701,7 +1701,7 @@ vect_analyze_loop_form_1 (struct loop *loop, gcond **loop_cond,
 
   if (integer_zerop (*number_of_iterations))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			       "not vectorized: number of iterations = 0");
       return false;
@@ -1751,7 +1751,7 @@ vect_analyze_loop_form (struct loop *loop)
 
   if (!LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         {
 #if 1
 	  emit_optinfo_at_vect_location (OPT_RECORD_REMARK)
@@ -1790,7 +1790,7 @@ vect_update_vf_for_slp (loop_vec_info loop_vinfo)
   poly_uint64 vectorization_factor;
   int i;
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK,
 			   "=== vect_update_vf_for_slp ===");
 
@@ -1844,7 +1844,7 @@ vect_update_vf_for_slp (loop_vec_info loop_vinfo)
     }
 
   LOOP_VINFO_VECT_FACTOR (loop_vinfo) = vectorization_factor;
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     {
       vect_location_writeln (OPT_RECORD_REMARK,
 		       "Updating vectorization factor to ");
@@ -1895,7 +1895,7 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo)
   bool need_to_vectorize = false;
   bool ok;
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK,
 			   "=== vect_analyze_loop_operations ===");
 
@@ -1910,7 +1910,7 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo)
           ok = true;
 
           stmt_info = vinfo_for_stmt (phi);
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
             {
               vect_location_writeln (OPT_RECORD_REMARK, "examining phi: ");
               dump_gimple_stmt (MSG_NOTE, TDF_SLIM, phi, 0);
@@ -1929,7 +1929,7 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo)
               if (STMT_VINFO_LIVE_P (stmt_info)
 		  && !vect_active_double_reduction_p (stmt_info))
                 {
-                  if (thing_enabled_p ())
+                  if (optinfo_enabled_p ())
 		    vect_location_writeln (OPT_RECORD_FAILURE,
 					   "Unsupported loop-closed phi in "
 					   "outer-loop");
@@ -1973,7 +1973,7 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo)
               && STMT_VINFO_DEF_TYPE (stmt_info) != vect_induction_def)
             {
               /* A scalar-dependence cycle that we don't support.  */
-              if (thing_enabled_p ())
+              if (optinfo_enabled_p ())
 		vect_location_writeln (OPT_RECORD_FAILURE,
 				       "not vectorized: scalar dependence cycle");
               return false;
@@ -1999,7 +1999,7 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo)
 
           if (!ok)
             {
-              if (thing_enabled_p ())
+              if (optinfo_enabled_p ())
                 {
 		  vect_location_writeln (OPT_RECORD_FAILURE,
 				   "not vectorized: relevant phi not "
@@ -2027,10 +2027,10 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo)
      touching this loop.  */
   if (!need_to_vectorize)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_REMARK,
 			       "All the computation can be taken out of the loop");
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			       "not vectorized: redundant loop. no profit to "
 			       "vectorize");
@@ -2064,7 +2064,7 @@ vect_analyze_loop_costing (loop_vec_info loop_vinfo)
       if (max_niter != -1
 	  && (unsigned HOST_WIDE_INT) max_niter < assumed_vf)
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 				   "not vectorized: iteration count smaller than "
 				   "vectorization factor");
@@ -2078,10 +2078,10 @@ vect_analyze_loop_costing (loop_vec_info loop_vinfo)
 
   if (min_profitable_iters < 0)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			       "not vectorized: vectorization not profitable");
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			       "not vectorized: vector version will never be "
 			       "profitable");
@@ -2101,10 +2101,10 @@ vect_analyze_loop_costing (loop_vec_info loop_vinfo)
   if (LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)
       && LOOP_VINFO_INT_NITERS (loop_vinfo) < th)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			       "not vectorized: vectorization not profitable");
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_REMARK,
 			       "not vectorized: iteration count smaller than user "
 			       "specified loop bound parameter or minimum profitable "
@@ -2119,11 +2119,11 @@ vect_analyze_loop_costing (loop_vec_info loop_vinfo)
       && ((unsigned HOST_WIDE_INT) estimated_niter
 	  < MAX (th, (unsigned) min_profitable_estimate)))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			       "not vectorized: estimated iteration count too "
 			       "small");
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_REMARK,
 			       "not vectorized: estimated iteration count smaller "
 			       "than specified loop bound parameter or minimum "
@@ -2161,7 +2161,7 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo, bool &fatal)
   loop_p loop = LOOP_VINFO_LOOP (loop_vinfo);
   if (!find_loop_nest (loop, &LOOP_VINFO_LOOP_NEST (loop_vinfo)))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			       "not vectorized: loop nest containing two "
 			       "or more consecutive inner loops cannot be "
@@ -2210,7 +2210,7 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo, bool &fatal)
 		      }
 		  }
 	      }
-	    if (thing_enabled_p ())
+	    if (optinfo_enabled_p ())
 	      vect_location_writeln (OPT_RECORD_FAILURE,
 				     "not vectorized: loop contains function "
 				     "calls or data references that cannot "
@@ -2225,7 +2225,7 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo, bool &fatal)
   ok = vect_analyze_data_refs (loop_vinfo, &min_vf);
   if (!ok)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			       "bad data references");
       return false;
@@ -2245,7 +2245,7 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo, bool &fatal)
   ok = vect_analyze_data_ref_accesses (loop_vinfo);
   if (!ok)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			       "bad data access");
       return false;
@@ -2256,7 +2256,7 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo, bool &fatal)
   ok = vect_mark_stmts_to_be_vectorized (loop_vinfo);
   if (!ok)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			       "unexpected pattern");
       return false;
@@ -2275,7 +2275,7 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo, bool &fatal)
       || (max_vf != MAX_VECTORIZATION_FACTOR
 	  && maybe_lt (max_vf, min_vf)))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "bad data dependence.\n");
       return false;
@@ -2285,7 +2285,7 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo, bool &fatal)
   ok = vect_determine_vectorization_factor (loop_vinfo);
   if (!ok)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "can't determine vectorization factor.\n");
       return false;
@@ -2293,7 +2293,7 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo, bool &fatal)
   if (max_vf != MAX_VECTORIZATION_FACTOR
       && maybe_lt (max_vf, LOOP_VINFO_VECT_FACTOR (loop_vinfo)))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "bad data dependence.\n");
       return false;
@@ -2334,7 +2334,7 @@ start_over:
   poly_uint64 vectorization_factor = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
   gcc_assert (known_ne (vectorization_factor, 0U));
 
-  if (LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo) && thing_enabled_p ())
+  if (LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo) && optinfo_enabled_p ())
     {
       vect_location_writeln (OPT_RECORD_REMARK,
 		       "vectorization_factor = ");
@@ -2352,7 +2352,7 @@ start_over:
   ok = vect_analyze_data_refs_alignment (loop_vinfo);
   if (!ok)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "bad data alignment.\n");
       return false;
@@ -2374,7 +2374,7 @@ start_over:
     ok = vect_enhance_data_refs_alignment (loop_vinfo);
     if (!ok)
       {
-	if (thing_enabled_p ())
+	if (optinfo_enabled_p ())
 	  vect_location_writeln (OPT_RECORD_FAILURE,
 			   "bad data alignment.\n");
         return false;
@@ -2397,7 +2397,7 @@ start_over:
   ok = vect_analyze_loop_operations (loop_vinfo);
   if (!ok)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "bad operation or unsupported loop bound.\n");
       return false;
@@ -2408,7 +2408,7 @@ start_over:
   LOOP_VINFO_FULLY_MASKED_P (loop_vinfo)
     = (LOOP_VINFO_CAN_FULLY_MASK_P (loop_vinfo)
        && vect_verify_full_masking (loop_vinfo));
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     {
       if (LOOP_VINFO_FULLY_MASKED_P (loop_vinfo))
 	vect_location_writeln (OPT_RECORD_REMARK,
@@ -2430,7 +2430,7 @@ start_over:
 
       if (known_lt (wi::to_widest (scalar_niters), vf))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_REMARK,
 			     "loop has no enough iterations to support"
 			     " peeling for gaps.\n");
@@ -2444,7 +2444,7 @@ start_over:
     goto again;
   if (!res)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "Loop costings not worthwhile.\n");
       return false;
@@ -2482,14 +2482,14 @@ start_over:
   if (LOOP_VINFO_PEELING_FOR_GAPS (loop_vinfo)
       || LOOP_VINFO_PEELING_FOR_NITER (loop_vinfo))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_REMARK, "epilog loop required\n");
       if (!vect_can_advance_ivs_p (loop_vinfo)
 	  || !slpeel_can_duplicate_loop_p (LOOP_VINFO_LOOP (loop_vinfo),
 					   single_exit (LOOP_VINFO_LOOP
 							 (loop_vinfo))))
         {
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "not vectorized: can't create required "
 			     "epilog loop\n");
@@ -2577,7 +2577,7 @@ again:
 	}
     }
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK,
 		     "re-trying with SLP disabled\n");
 
@@ -2655,7 +2655,7 @@ vect_analyze_loop (struct loop *loop, loop_vec_info orig_loop_vinfo)
   targetm.vectorize.autovectorize_vector_sizes (&vector_sizes);
   unsigned int next_size = 0;
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK,
 			   "===== analyze_loop_nest =====");
 
@@ -2663,7 +2663,7 @@ vect_analyze_loop (struct loop *loop, loop_vec_info orig_loop_vinfo)
       && loop_vec_info_for_loop (loop_outer (loop))
       && LOOP_VINFO_VECTORIZABLE_P (loop_vec_info_for_loop (loop_outer (loop))))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_REMARK,
 			 "outer-loop already vectorized.\n");
       return NULL;
@@ -2676,7 +2676,7 @@ vect_analyze_loop (struct loop *loop, loop_vec_info orig_loop_vinfo)
       loop_vinfo = vect_analyze_loop_form (loop);
       if (!loop_vinfo)
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "bad loop form.\n");
 	  return NULL;
@@ -2710,7 +2710,7 @@ vect_analyze_loop (struct loop *loop, loop_vec_info orig_loop_vinfo)
 
       /* Try the next biggest vector size.  */
       current_vector_size = vector_sizes[next_size++];
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	{
 	  vect_location_writeln (OPT_RECORD_REMARK,
 			   "***** Re-trying analysis with "
@@ -3013,7 +3013,7 @@ vect_is_slp_reduction (loop_vec_info loop_info, gimple *phi,
                                   == vect_internal_def
                       && !is_loop_header_bb_p (gimple_bb (def_stmt)))))
   	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		{
 		  vect_location_writeln (OPT_RECORD_REMARK, "swapping oprnds: ");
 		  dump_gimple_stmt (MSG_NOTE, TDF_SLIM, next_stmt, 0);
@@ -3269,7 +3269,7 @@ vect_is_simple_reduction (loop_vec_info loop_info, gimple *phi,
 
       if (!flow_bb_inside_loop_p (loop, gimple_bb (use_stmt)))
         {
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "intermediate value used outside loop.\n");
 
@@ -3279,7 +3279,7 @@ vect_is_simple_reduction (loop_vec_info loop_info, gimple *phi,
       nloop_uses++;
       if (nloop_uses > 1)
         {
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "reduction value used in loop.\n");
           return NULL;
@@ -3292,7 +3292,7 @@ vect_is_simple_reduction (loop_vec_info loop_info, gimple *phi,
   tree loop_arg = PHI_ARG_DEF_FROM_EDGE (phi, latch_e);
   if (TREE_CODE (loop_arg) != SSA_NAME)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	{
 	  vect_location_writeln (OPT_RECORD_FAILURE,
 			   "reduction: not ssa_name: ");
@@ -3315,7 +3315,7 @@ vect_is_simple_reduction (loop_vec_info loop_info, gimple *phi,
     }
   else
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	{
 	  vect_location_writeln (OPT_RECORD_FAILURE,
 			   "reduction: unhandled reduction operation: ");
@@ -3341,7 +3341,7 @@ vect_is_simple_reduction (loop_vec_info loop_info, gimple *phi,
 	lcphis.safe_push (as_a <gphi *> (use_stmt));
       if (nloop_uses > 1)
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "reduction used in loop.\n");
 	  return NULL;
@@ -3357,7 +3357,7 @@ vect_is_simple_reduction (loop_vec_info loop_info, gimple *phi,
       if (gimple_phi_num_args (def_stmt) != 1
           || TREE_CODE (op1) != SSA_NAME)
         {
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "unsupported phi node definition.\n");
 
@@ -3372,7 +3372,7 @@ vect_is_simple_reduction (loop_vec_info loop_info, gimple *phi,
           && is_gimple_assign (def1)
 	  && flow_bb_inside_loop_p (loop->inner, gimple_bb (phi_use_stmt)))
         {
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
             report_vect_op (MSG_NOTE, def_stmt,
 			    "detected double reduction: ");
 
@@ -3426,7 +3426,7 @@ vect_is_simple_reduction (loop_vec_info loop_info, gimple *phi,
         }
       if (op3 == phi_name || op4 == phi_name)
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    report_vect_op (MSG_MISSED_OPTIMIZATION, def_stmt,
 			    "reduction: condition depends on previous"
 			    " iteration: ");
@@ -3438,7 +3438,7 @@ vect_is_simple_reduction (loop_vec_info loop_info, gimple *phi,
     }
   else if (!commutative_tree_code (code) || !associative_tree_code (code))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	report_vect_op (MSG_MISSED_OPTIMIZATION, def_stmt,
 			"reduction: not commutative/associative: ");
       return NULL;
@@ -3450,7 +3450,7 @@ vect_is_simple_reduction (loop_vec_info loop_info, gimple *phi,
     }
   else
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	report_vect_op (MSG_MISSED_OPTIMIZATION, def_stmt,
 			"reduction: not handled operation: ");
       return NULL;
@@ -3458,7 +3458,7 @@ vect_is_simple_reduction (loop_vec_info loop_info, gimple *phi,
 
   if (TREE_CODE (op1) != SSA_NAME && TREE_CODE (op2) != SSA_NAME)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	report_vect_op (MSG_MISSED_OPTIMIZATION, def_stmt,
 			"reduction: both uses not ssa_names: ");
 
@@ -3475,7 +3475,7 @@ vect_is_simple_reduction (loop_vec_info loop_info, gimple *phi,
       || (op4 && TREE_CODE (op4) == SSA_NAME
           && !types_compatible_p (type, TREE_TYPE (op4))))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         {
           vect_location_writeln (OPT_RECORD_REMARK,
 			   "reduction: multiple types: operation type: ");
@@ -3531,7 +3531,7 @@ vect_is_simple_reduction (loop_vec_info loop_info, gimple *phi,
   if (code != COND_EXPR
       && ((!def1 || gimple_nop_p (def1)) && (!def2 || gimple_nop_p (def2))))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	report_vect_op (MSG_NOTE, def_stmt, "reduction: no defs for operands: ");
       return NULL;
     }
@@ -3554,7 +3554,7 @@ vect_is_simple_reduction (loop_vec_info loop_info, gimple *phi,
                           == vect_internal_def
  	              && !is_loop_header_bb_p (gimple_bb (def1)))))))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	report_vect_op (MSG_NOTE, def_stmt, "detected reduction: ");
       return def_stmt;
     }
@@ -3599,7 +3599,7 @@ vect_is_simple_reduction (loop_vec_info loop_info, gimple *phi,
 		}
 	      else
 		{
-		  if (thing_enabled_p ())
+		  if (optinfo_enabled_p ())
 		    report_vect_op (MSG_NOTE, def_stmt,
 				    "detected reduction: cannot swap operands "
 				    "for cond_expr");
@@ -3610,7 +3610,7 @@ vect_is_simple_reduction (loop_vec_info loop_info, gimple *phi,
 	    swap_ssa_operands (def_stmt, gimple_assign_rhs1_ptr (def_stmt),
 			       gimple_assign_rhs2_ptr (def_stmt));
 
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    report_vect_op (MSG_NOTE, def_stmt,
 			    "detected reduction: need to swap operands: ");
 
@@ -3619,7 +3619,7 @@ vect_is_simple_reduction (loop_vec_info loop_info, gimple *phi,
         }
       else
         {
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
             report_vect_op (MSG_NOTE, def_stmt, "detected reduction: ");
         }
 
@@ -3632,7 +3632,7 @@ vect_is_simple_reduction (loop_vec_info loop_info, gimple *phi,
       && orig_code != MINUS_EXPR
       && vect_is_slp_reduction (loop_info, phi, def_stmt))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         report_vect_op (MSG_NOTE, def_stmt,
 			"reduction: detected reduction chain: ");
 
@@ -3654,7 +3654,7 @@ vect_is_simple_reduction (loop_vec_info loop_info, gimple *phi,
 			    code))
     return def_stmt;
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     {
       report_vect_op (MSG_MISSED_OPTIMIZATION, def_stmt,
 		      "reduction: unknown pattern: ");
@@ -3702,7 +3702,7 @@ vect_get_known_peeling_cost (loop_vec_info loop_vinfo, int peel_iters_prologue,
   if (!LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo))
     {
       *peel_iters_epilogue = assumed_vf / 2;
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_REMARK,
 			 "cost model: epilogue peel iters set to vf/2 "
 			 "because loop iterations are unknown .\n");
@@ -4048,7 +4048,7 @@ vect_estimate_min_profitable_iters (loop_vec_info loop_vinfo,
 
   vec_outside_cost = (int)(vec_prologue_cost + vec_epilogue_cost);
   
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     {
       vect_location_writeln (OPT_RECORD_REMARK, "Cost model analysis: \n");
       dump_printf (MSG_NOTE, "  Vector inside of loop cost: %d\n",
@@ -4106,7 +4106,7 @@ vect_estimate_min_profitable_iters (loop_vec_info loop_vinfo,
 	warning_at (vect_location, OPT_Wopenmp_simd, "vectorization "
 		    "did not happen for a simd loop");
 
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_FAILURE,
 			 "cost model: the vector iteration cost = %d "
 			 "divided by the scalar iteration cost = %d "
@@ -4127,7 +4127,7 @@ vect_estimate_min_profitable_iters (loop_vec_info loop_vinfo,
     /* We want the vectorized loop to execute at least once.  */
     min_profitable_iters = assumed_vf + peel_iters_prologue;
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK,
                      "  Runtime profitability threshold = %d\n",
                      min_profitable_iters);
@@ -4153,7 +4153,7 @@ vect_estimate_min_profitable_iters (loop_vec_info loop_vinfo,
 				   - vec_inside_cost);
     }
   min_profitable_estimate = MAX (min_profitable_estimate, min_profitable_iters);
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK,
 		     "  Static estimate profitability threshold = %d\n",
 		     min_profitable_estimate);
@@ -4375,7 +4375,7 @@ vect_model_reduction_cost (stmt_vec_info stmt_info, internal_fn reduc_fn,
 	}
     }
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     dump_printf (MSG_NOTE, 
                  "vect_model_reduction_cost: inside_cost = %d, "
                  "prologue_cost = %d, epilogue_cost = %d .\n", inside_cost,
@@ -4405,7 +4405,7 @@ vect_model_induction_cost (stmt_vec_info stmt_info, int ncopies)
   prologue_cost = add_stmt_cost (target_cost_data, 2, scalar_to_vec,
 				 stmt_info, 0, vect_prologue);
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK,
                      "vect_model_induction_cost: inside_cost = %d, "
                      "prologue_cost = %d .\n", inside_cost, prologue_cost);
@@ -4998,7 +4998,7 @@ vect_create_epilog_for_reduction (vec<tree> vect_defs, gimple *stmt,
           add_phi_arg (as_a <gphi *> (phi), def, loop_latch_edge (loop),
 		       UNKNOWN_LOCATION);
 
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
             {
               vect_location_writeln (OPT_RECORD_REMARK,
 			       "transform reduction: created def-use cycle: ");
@@ -5487,7 +5487,7 @@ vect_create_epilog_for_reduction (vec<tree> vect_defs, gimple *stmt,
       /* Case 1:  Create:
          v_out2 = reduc_expr <v_out1>  */
 
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_REMARK,
 			 "Reduce using direct vector reduction.\n");
 
@@ -5758,7 +5758,7 @@ vect_create_epilog_for_reduction (vec<tree> vect_defs, gimple *stmt,
 
           tree rhs;
 
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
             vect_location_writeln (OPT_RECORD_REMARK,
 			     "Reduce using vector shifts\n");
 
@@ -5787,7 +5787,7 @@ vect_create_epilog_for_reduction (vec<tree> vect_defs, gimple *stmt,
 	  /* 2.4  Extract the final scalar result.  Create:
 	     s_out3 = extract_field <v_out2, bitpos>  */
 
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_REMARK,
 			     "extract scalar result\n");
 
@@ -5811,7 +5811,7 @@ vect_create_epilog_for_reduction (vec<tree> vect_defs, gimple *stmt,
                  Create:  s = op <s, s'>  // For non SLP cases
                }  */
 
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
             vect_location_writeln (OPT_RECORD_REMARK,
 			     "Reduce using scalar code.\n");
 
@@ -6134,7 +6134,7 @@ vect_finalize_reduction:
                                UNKNOWN_LOCATION);
                   add_phi_arg (vect_phi, PHI_RESULT (inner_phi),
                                loop_latch_edge (outer_loop), UNKNOWN_LOCATION);
-                  if (thing_enabled_p ())
+                  if (optinfo_enabled_p ())
                     {
                       vect_location_writeln (OPT_RECORD_REMARK,
 				       "created double reduction phi node: ");
@@ -6817,7 +6817,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
     {
       if (STMT_VINFO_REDUC_TYPE (stmt_info) == FOLD_LEFT_REDUCTION)
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "in-order reduction chain without SLP.\n");
 	  return false;
@@ -6871,7 +6871,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
 	 as a reduction operation.  */
       if (reduc_index == -1)
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "conditional reduction chains not supported\n");
 	  return false;
@@ -6896,7 +6896,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
       else if (direct_internal_fn_supported_p (IFN_FOLD_EXTRACT_LAST,
 					       vectype_in, OPTIMIZE_FOR_SPEED))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "optimizing condition reduction with"
 			     " FOLD_EXTRACT_LAST.\n");
@@ -6937,7 +6937,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
 	    }
 	  if (cond_reduc_val)
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		vect_location_writeln (OPT_RECORD_REMARK,
 				 "condition expression based on "
 				 "integer induction.\n");
@@ -6963,7 +6963,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
 				    cond_initial_val, cond_reduc_val);
 	      if (e && (integer_onep (e) || integer_zerop (e)))
 		{
-		  if (thing_enabled_p ())
+		  if (optinfo_enabled_p ())
 		    vect_location_writeln (OPT_RECORD_REMARK,
 				     "condition expression based on "
 				     "compile time constant.\n");
@@ -7006,7 +7006,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
       if (!vec_stmt && !vectorizable_condition (stmt, gsi, NULL,
 						ops[reduc_index], 0, NULL))
         {
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "unsupported condition in reduction\n");
 	  return false;
@@ -7021,7 +7021,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
 	{
 	  /* Shifts and rotates are only supported by vectorizable_shifts,
 	     not vectorizable_reduction.  */
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "unsupported shift or rotation.\n");
 	  return false;
@@ -7031,7 +7031,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
       optab = optab_for_tree_code (code, vectype_in, optab_default);
       if (!optab)
         {
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "no optab.\n");
 
@@ -7040,14 +7040,14 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
 
       if (optab_handler (optab, vec_mode) == CODE_FOR_nothing)
         {
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
             dump_printf (MSG_NOTE, "op not supported by target.\n");
 
 	  if (maybe_ne (GET_MODE_SIZE (vec_mode), UNITS_PER_WORD)
 	      || !vect_worthwhile_without_simd_p (loop_vinfo, code))
             return false;
 
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
   	    dump_printf (MSG_NOTE, "proceeding using word mode.\n");
         }
 
@@ -7055,7 +7055,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
       if (!VECTOR_MODE_P (TYPE_MODE (vectype_in))
 	  && !vect_worthwhile_without_simd_p (loop_vinfo, code))
         {
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "not worthwhile without SIMD support.\n");
 
@@ -7161,7 +7161,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
 	      && !direct_internal_fn_supported_p (reduc_fn, vectype_out,
 						  OPTIMIZE_FOR_SPEED))
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		vect_location_writeln (OPT_RECORD_FAILURE,
 				 "reduc op not supported by target.\n");
 
@@ -7172,7 +7172,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
 	{
 	  if (!nested_cycle || double_reduc)
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		vect_location_writeln (OPT_RECORD_FAILURE,
 				 "no reduc code for scalar code.\n");
 
@@ -7197,7 +7197,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
       && reduc_fn == IFN_LAST
       && !nunits_out.is_constant ())
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "missing target support for reduction on"
 			 " variable-length vectors.\n");
@@ -7207,7 +7207,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
   if ((double_reduc || reduction_type != TREE_CODE_REDUCTION)
       && ncopies > 1)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "multiple types in double reduction or condition "
 			 "reduction.\n");
@@ -7237,7 +7237,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
 		 l += a[j];
 
 	 which is a reassociation of the original operation.  */
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "in-order double reduction not supported.\n");
 
@@ -7250,7 +7250,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
     {
       /* We cannot use in-order reductions in this case because there is
 	 an implicit reassociation of the operations involved.  */
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "in-order unchained SLP reductions not supported.\n");
       return false;
@@ -7265,7 +7265,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
       && !direct_internal_fn_supported_p (IFN_VEC_SHL_INSERT,
 					  vectype_out, OPTIMIZE_FOR_SPEED))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "reduction on variable-length vectors requires"
 			 " target support for a vector-shift-and-insert"
@@ -7288,7 +7288,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
       if (!neutral_op
 	  && !can_duplicate_and_interleave_p (group_size, elt_mode))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "unsupported form of SLP reduction for"
 			     " variable-length vectors: cannot build"
@@ -7300,7 +7300,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
 	 up the the initial vector does too.  */
       if (!multiple_p (nunits_out, group_size))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "unsupported form of SLP reduction for"
 			     " variable-length vectors: the vector size"
@@ -7321,7 +7321,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
         ops[1] = fold_convert (TREE_TYPE (ops[0]), ops[1]);
       else
         {
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "invalid types in dot-prod\n");
 
@@ -7335,7 +7335,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
 
       if (! max_loop_iterations (loop, &ni))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_REMARK,
 			     "loop count not known, cannot create cond "
 			     "reduction.\n");
@@ -7350,7 +7350,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
       tree max_index = TYPE_MAX_VALUE (cr_index_scalar_type);
       if (wi::geu_p (ni, wi::to_widest (max_index)))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_REMARK,
 			     "loop size is greater than data size.\n");
 	  return false;
@@ -7408,7 +7408,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
 	  || code == WIDEN_SUM_EXPR
 	  || code == SAD_EXPR))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "multi def-use cycle not possible for lane-reducing "
 			 "reduction operation\n");
@@ -7434,7 +7434,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
 		  || !direct_internal_fn_supported_p (cond_fn, vectype_in,
 						      OPTIMIZE_FOR_SPEED)))
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		vect_location_writeln (OPT_RECORD_FAILURE,
 				 "can't use a fully-masked loop because no"
 				 " conditional operation is available.\n");
@@ -7442,7 +7442,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
 	    }
 	  else if (reduc_index == -1)
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		vect_location_writeln (OPT_RECORD_FAILURE,
 				 "can't use a fully-masked loop for chained"
 				 " reductions.\n");
@@ -7452,7 +7452,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
 	    vect_record_loop_mask (loop_vinfo, masks, ncopies * vec_num,
 				   vectype_in);
 	}
-      if (thing_enabled_p ()
+      if (optinfo_enabled_p ()
 	  && reduction_type == FOLD_LEFT_REDUCTION)
 	vect_location_writeln (OPT_RECORD_REMARK,
 			 "using an in-order (fold-left) reduction.\n");
@@ -7462,7 +7462,7 @@ vectorizable_reduction (gimple *stmt, gimple_stmt_iterator *gsi,
 
   /* Transform.  */
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK, "transform reduction.\n");
 
   /* FORNOW: Multiple types are not supported for condition.  */
@@ -7757,7 +7757,7 @@ vectorizable_induction (gimple *phi,
 
       if (ncopies > 1)
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "multiple types in nested loop.\n");
 	  return false;
@@ -7788,7 +7788,7 @@ vectorizable_induction (gimple *phi,
 	  if (!(STMT_VINFO_RELEVANT_P (exit_phi_vinfo)
 		&& !STMT_VINFO_LIVE_P (exit_phi_vinfo)))
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		vect_location_writeln (OPT_RECORD_FAILURE,
 				 "inner-loop induction only used outside "
 				 "of the outer vectorized loop.\n");
@@ -7806,7 +7806,7 @@ vectorizable_induction (gimple *phi,
   if (slp_node && !nunits.is_constant ())
     {
       /* The current SLP code creates the initial value element-by-element.  */
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "SLP induction not supported for variable-length"
 			 " vectors.\n");
@@ -7816,7 +7816,7 @@ vectorizable_induction (gimple *phi,
   if (!vec_stmt) /* transformation not required.  */
     {
       STMT_VINFO_TYPE (stmt_info) = induc_vec_info_type;
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_REMARK,
                          "=== vectorizable_induction ===\n");
       vect_model_induction_cost (stmt_info, ncopies);
@@ -7830,7 +7830,7 @@ vectorizable_induction (gimple *phi,
      evolution S, for a vector of 4 units, we want to compute:
      [X, X + S, X + 2*S, X + 3*S].  */
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK, "transform induction phi.\n");
 
   latch_e = loop_latch_edge (iv_loop);
@@ -8222,7 +8222,7 @@ vectorizable_induction (gimple *phi,
 		      && !STMT_VINFO_LIVE_P (stmt_vinfo));
 
 	  STMT_VINFO_VEC_STMT (stmt_vinfo) = new_stmt;
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_REMARK,
 			       "vector of inductions after inner-loop:");
@@ -8232,7 +8232,7 @@ vectorizable_induction (gimple *phi,
     }
 
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     {
       vect_location_writeln (OPT_RECORD_REMARK,
 		       "transform induction: created def-use cycle: ");
@@ -8283,7 +8283,7 @@ vectorizable_live_operation (gimple *stmt,
   if (!STMT_VINFO_RELEVANT_P (stmt_info))
     {
       gcc_assert (is_simple_and_all_uses_invariant (stmt, loop_vinfo));
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_REMARK,
 			 "statement is simple and uses invariant.  Leaving in "
 			 "place.\n");
@@ -8311,7 +8311,7 @@ vectorizable_live_operation (gimple *stmt,
 	 that vector we need.  */
       if (!can_div_trunc_p (pos, nunits, &vec_entry, &vec_index))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "Cannot determine which vector holds the"
 			     " final result.\n");
@@ -8327,7 +8327,7 @@ vectorizable_live_operation (gimple *stmt,
 	  if (!direct_internal_fn_supported_p (IFN_EXTRACT_LAST, vectype,
 					       OPTIMIZE_FOR_SPEED))
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		vect_location_writeln (OPT_RECORD_FAILURE,
 				 "can't use a fully-masked loop because "
 				 "the target doesn't support extract last "
@@ -8336,7 +8336,7 @@ vectorizable_live_operation (gimple *stmt,
 	    }
 	  else if (slp_node)
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		vect_location_writeln (OPT_RECORD_FAILURE,
 				 "can't use a fully-masked loop because an "
 				 "SLP statement is live after the loop.\n");
@@ -8344,7 +8344,7 @@ vectorizable_live_operation (gimple *stmt,
 	    }
 	  else if (ncopies > 1)
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		vect_location_writeln (OPT_RECORD_FAILURE,
 				 "can't use a fully-masked loop because"
 				 " ncopies is greater than 1.\n");
@@ -8492,7 +8492,7 @@ vect_loop_kill_debug_uses (struct loop *loop, gimple *stmt)
 	    {
 	      if (gimple_debug_bind_p (ustmt))
 		{
-		  if (thing_enabled_p ())
+		  if (optinfo_enabled_p ())
 		    vect_location_writeln (OPT_RECORD_REMARK,
                                      "killing debug use\n");
 
@@ -8693,7 +8693,7 @@ vect_transform_loop (loop_vec_info loop_vinfo)
   bool check_profitability = false;
   unsigned int th;
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK, "=== vec_transform_loop ===\n");
 
   /* Use the more conservative vectorization threshold.  If the number
@@ -8705,7 +8705,7 @@ vect_transform_loop (loop_vec_info loop_vinfo)
   if (th >= vect_vf_for_cost (loop_vinfo)
       && !LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_REMARK,
 			 "Profitability threshold is %d loop iterations.\n",
                          th);
@@ -8718,7 +8718,7 @@ vect_transform_loop (loop_vec_info loop_vinfo)
   if (! single_pred_p (e->dest))
     {
       split_loop_exit_edge (e);
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	dump_printf (MSG_NOTE, "split exit edge\n");
     }
 
@@ -8752,7 +8752,7 @@ vect_transform_loop (loop_vec_info loop_vinfo)
       if (! single_pred_p (e->dest))
 	{
 	  split_loop_exit_edge (e);
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    dump_printf (MSG_NOTE, "split exit edge of scalar loop\n");
 	}
     }
@@ -8807,7 +8807,7 @@ vect_transform_loop (loop_vec_info loop_vinfo)
 	   gsi_next (&si))
         {
 	  gphi *phi = si.phi ();
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_REMARK,
                                "------>vectorizing phi: ");
@@ -8827,7 +8827,7 @@ vect_transform_loop (loop_vec_info loop_vinfo)
 	  if (STMT_VINFO_VECTYPE (stmt_info)
 	      && (maybe_ne
 		  (TYPE_VECTOR_SUBPARTS (STMT_VINFO_VECTYPE (stmt_info)), vf))
-	      && thing_enabled_p ())
+	      && optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_REMARK, "multiple-types.\n");
 
 	  if ((STMT_VINFO_DEF_TYPE (stmt_info) == vect_induction_def
@@ -8835,7 +8835,7 @@ vect_transform_loop (loop_vec_info loop_vinfo)
 	       || STMT_VINFO_DEF_TYPE (stmt_info) == vect_nested_cycle)
 	      && ! PURE_SLP_STMT (stmt_info))
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		vect_location_writeln (OPT_RECORD_REMARK, "transform phi.\n");
 	      vect_transform_stmt (phi, NULL, NULL, NULL, NULL);
 	    }
@@ -8862,7 +8862,7 @@ vect_transform_loop (loop_vec_info loop_vinfo)
 		}
 	    }
 
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_REMARK,
 			       "------>vectorizing statement: ");
@@ -8934,7 +8934,7 @@ vect_transform_loop (loop_vec_info loop_vinfo)
 
 		  if (!gsi_end_p (pattern_def_si))
 		    {
-		      if (thing_enabled_p ())
+		      if (optinfo_enabled_p ())
 			{
 			  vect_location_writeln (OPT_RECORD_REMARK,
 					   "==> vectorizing pattern def "
@@ -8962,7 +8962,7 @@ vect_transform_loop (loop_vec_info loop_vinfo)
 		= TYPE_VECTOR_SUBPARTS (STMT_VINFO_VECTYPE (stmt_info));
 	      if (!STMT_SLP_TYPE (stmt_info)
 		  && maybe_ne (nunits, vf)
-		  && thing_enabled_p ())
+		  && optinfo_enabled_p ())
 		  /* For SLP VF is set according to unrolling factor, and not
 		     to vector size, hence for SLP this print is not valid.  */
 		vect_location_writeln (OPT_RECORD_REMARK, "multiple-types.\n");
@@ -8976,7 +8976,7 @@ vect_transform_loop (loop_vec_info loop_vinfo)
 		{
 		  slp_scheduled = true;
 
-		  if (thing_enabled_p ())
+		  if (optinfo_enabled_p ())
 		    vect_location_writeln (OPT_RECORD_REMARK,
 				     "=== scheduling SLP instances ===\n");
 
@@ -8996,7 +8996,7 @@ vect_transform_loop (loop_vec_info loop_vinfo)
 	    }
 
 	  /* -------- vectorize statement ------------ */
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_REMARK, "transform statement.\n");
 
 	  grouped_store = false;
@@ -9108,7 +9108,7 @@ vect_transform_loop (loop_vec_info loop_vinfo)
 	 : wi::udiv_floor (loop->nb_iterations_estimate + bias_for_assumed,
 			   assumed_vf) - 1);
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     {
       if (!LOOP_VINFO_EPILOGUE_P (loop_vinfo))
 	{
@@ -9280,7 +9280,7 @@ optimize_mask_stores (struct loop *loop)
       make_single_succ_edge (store_bb, join_bb, EDGE_FALLTHRU);
       if (dom_info_available_p (CDI_DOMINATORS))
 	set_immediate_dominator (CDI_DOMINATORS, store_bb, bb);
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_REMARK,
 			 "Create new block %d to sink mask stores.",
 			 store_bb->index);
@@ -9319,7 +9319,7 @@ optimize_mask_stores (struct loop *loop)
 	  gsi_move_before (&gsi_from, &gsi_to);
 	  /* Setup GSI_TO to the non-empty block start.  */
 	  gsi_to = gsi_start_bb (store_bb);
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_REMARK,
 			       "Move stmt to created bb\n");
@@ -9387,7 +9387,7 @@ optimize_mask_stores (struct loop *loop)
 		break;
 
 	      /* Can move STMT1 to STORE_BB.  */
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		{
 		  vect_location_writeln (OPT_RECORD_REMARK,
 				   "Move stmt to created bb\n");
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index 99a8104..88556f2 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -350,7 +350,7 @@ again:
 
       if (!vect_is_simple_use (oprnd, vinfo, &def_stmt, &dt))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_FAILURE,
 			       "Build SLP failed: can't analyze def for ");
@@ -386,7 +386,7 @@ again:
 		  goto again;
 		}
 
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		{
 		  vect_location_writeln (OPT_RECORD_FAILURE,
 					 "Build SLP failed: some of the stmts"
@@ -403,7 +403,7 @@ again:
 
           if (dt == vect_unknown_def_type)
             {
-              if (thing_enabled_p ())
+              if (optinfo_enabled_p ())
                 vect_location_writeln (OPT_RECORD_FAILURE,
 				       "Unsupported pattern");
               return -1;
@@ -416,7 +416,7 @@ again:
 	      break;
 
 	    default:
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		vect_location_writeln (OPT_RECORD_FAILURE,
 				 "unsupported defining stmt:\n");
 	      return -1;
@@ -458,7 +458,7 @@ again:
 		  goto again;
 		}
 
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		vect_location_writeln (OPT_RECORD_FAILURE,
 				 "Build SLP failed: different types\n");
 
@@ -471,7 +471,7 @@ again:
 		  || !can_duplicate_and_interleave_p (stmts.length (),
 						      TYPE_MODE (type))))
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		{
 		  vect_location_writeln (OPT_RECORD_FAILURE,
 				   "Build SLP failed: invalid type of def "
@@ -498,7 +498,7 @@ again:
 
 	default:
 	  /* FORNOW: Not supported.  */
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_FAILURE,
 			       "Build SLP failed: illegal type of def ");
@@ -517,7 +517,7 @@ again:
          we've committed to the operand order and can't swap it.  */
       if (STMT_VINFO_NUM_SLP_USES (vinfo_for_stmt (stmt)) != 0)
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_FAILURE,
 			       "Build SLP failed: cannot swap operands of "
@@ -553,7 +553,7 @@ again:
       else
 	swap_ssa_operands (stmt, gimple_assign_rhs1_ptr (stmt),
 			   gimple_assign_rhs2_ptr (stmt));
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	{
 	  vect_location_writeln (OPT_RECORD_REMARK,
 			   "swapped operands to match def types in ");
@@ -578,7 +578,7 @@ vect_record_max_nunits (vec_info *vinfo, gimple *stmt, unsigned int group_size,
 {
   if (!vectype)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	{
 	  vect_location_writeln (OPT_RECORD_FAILURE,
 			   "Build SLP failed: unsupported data-type in ");
@@ -651,7 +651,7 @@ vect_build_slp_tree_1 (vec_info *vinfo, unsigned char *swap,
       swap[i] = 0;
       matches[i] = false;
 
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	{
 	  vect_location_writeln (OPT_RECORD_REMARK, "Build SLP for ");
 	  dump_gimple_stmt (MSG_NOTE, TDF_SLIM, stmt, 0);
@@ -660,7 +660,7 @@ vect_build_slp_tree_1 (vec_info *vinfo, unsigned char *swap,
       /* Fail to vectorize statements marked as unvectorizable.  */
       if (!STMT_VINFO_VECTORIZABLE (vinfo_for_stmt (stmt)))
         {
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
             {
               vect_location_writeln (OPT_RECORD_FAILURE,
 			       "Build SLP failed: unvectorizable statement ");
@@ -674,7 +674,7 @@ vect_build_slp_tree_1 (vec_info *vinfo, unsigned char *swap,
       lhs = gimple_get_lhs (stmt);
       if (lhs == NULL_TREE)
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_FAILURE,
 			       "Build SLP failed: not GIMPLE_ASSIGN nor "
@@ -705,7 +705,7 @@ vect_build_slp_tree_1 (vec_info *vinfo, unsigned char *swap,
 	      || !gimple_call_nothrow_p (call_stmt)
 	      || gimple_call_chain (call_stmt))
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		{
 		  vect_location_writeln (OPT_RECORD_FAILURE, 
 				   "Build SLP failed: unsupported call type ");
@@ -746,7 +746,7 @@ vect_build_slp_tree_1 (vec_info *vinfo, unsigned char *swap,
 
 		  if (!optab)
 		    {
-		      if (thing_enabled_p ())
+		      if (optinfo_enabled_p ())
 			vect_location_writeln (OPT_RECORD_FAILURE,
 					 "Build SLP failed: no optab.\n");
 		      /* Fatal mismatch.  */
@@ -756,7 +756,7 @@ vect_build_slp_tree_1 (vec_info *vinfo, unsigned char *swap,
 		  icode = (int) optab_handler (optab, vec_mode);
 		  if (icode == CODE_FOR_nothing)
 		    {
-		      if (thing_enabled_p ())
+		      if (optinfo_enabled_p ())
 			vect_location_writeln (OPT_RECORD_FAILURE,
 					 "Build SLP failed: "
 					 "op not supported by target.\n");
@@ -802,7 +802,7 @@ vect_build_slp_tree_1 (vec_info *vinfo, unsigned char *swap,
                        || first_stmt_code == COMPONENT_REF
                        || first_stmt_code == MEM_REF)))
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		{
 		  vect_location_writeln (OPT_RECORD_FAILURE, 
 				   "Build SLP failed: different operation "
@@ -820,7 +820,7 @@ vect_build_slp_tree_1 (vec_info *vinfo, unsigned char *swap,
 	  if (need_same_oprnds
 	      && !operand_equal_p (first_op1, gimple_assign_rhs2 (stmt), 0))
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		{
 		  vect_location_writeln (OPT_RECORD_FAILURE, 
 				   "Build SLP failed: different shift "
@@ -840,7 +840,7 @@ vect_build_slp_tree_1 (vec_info *vinfo, unsigned char *swap,
 		  || gimple_call_fntype (first_stmt)
 		     != gimple_call_fntype (stmt))
 		{
-		  if (thing_enabled_p ())
+		  if (optinfo_enabled_p ())
 		    {
 		      vect_location_writeln (OPT_RECORD_FAILURE, 
 				       "Build SLP failed: different calls in ");
@@ -871,7 +871,7 @@ vect_build_slp_tree_1 (vec_info *vinfo, unsigned char *swap,
                      chains in the same node.  */
                   if (prev_first_load != first_load)
                     {
-                      if (thing_enabled_p ())
+                      if (optinfo_enabled_p ())
                         {
                           dump_printf_loc (MSG_MISSED_OPTIMIZATION,
 					   vect_location, 
@@ -893,7 +893,7 @@ vect_build_slp_tree_1 (vec_info *vinfo, unsigned char *swap,
 	  if (TREE_CODE_CLASS (rhs_code) == tcc_reference)
 	    {
 	      /* Not grouped load.  */
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		{
 		  vect_location_writeln (OPT_RECORD_FAILURE, 
 				   "Build SLP failed: not grouped load ");
@@ -913,7 +913,7 @@ vect_build_slp_tree_1 (vec_info *vinfo, unsigned char *swap,
 	      && TREE_CODE_CLASS (rhs_code) != tcc_comparison
 	      && rhs_code != CALL_EXPR)
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		{
 		  vect_location_writeln (OPT_RECORD_FAILURE,
 				   "Build SLP failed: operation");
@@ -951,7 +951,7 @@ vect_build_slp_tree_1 (vec_info *vinfo, unsigned char *swap,
 		swap[i] = 2;
 	      else
 		{
-		  if (thing_enabled_p ())
+		  if (optinfo_enabled_p ())
 		    {
 		      vect_location_writeln (OPT_RECORD_FAILURE,
 				       "Build SLP failed: different"
@@ -981,7 +981,7 @@ vect_build_slp_tree_1 (vec_info *vinfo, unsigned char *swap,
       unsigned HOST_WIDE_INT count;
       if (!nunits.is_constant (&count))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "Build SLP failed: different operations "
 			     "not allowed with variable-length SLP.\n");
@@ -1002,7 +1002,7 @@ vect_build_slp_tree_1 (vec_info *vinfo, unsigned char *swap,
 	    if (gimple_assign_rhs_code (stmts[i]) == alt_stmt_code)
 	      {
 		matches[i] = false;
-		if (thing_enabled_p ())
+		if (optinfo_enabled_p ())
 		  {
 		    vect_location_writeln (OPT_RECORD_FAILURE,
 				     "Build SLP failed: different operation "
@@ -1345,7 +1345,7 @@ vect_build_slp_tree_2 (vec_info *vinfo,
 		    {
 		      if (!swap_not_matching)
 			{
-			  if (thing_enabled_p ())
+			  if (optinfo_enabled_p ())
 			    {
 			      dump_printf_loc (MSG_MISSED_OPTIMIZATION,
 					       vect_location,
@@ -1657,7 +1657,7 @@ vect_supported_load_permutation_p (slp_instance slp_instn)
   slp_tree node;
   gimple *stmt, *load, *next_load;
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     {
       vect_location_writeln (OPT_RECORD_REMARK, "Load permutation ");
       FOR_EACH_VEC_ELT (SLP_INSTANCE_LOADS (slp_instn), i, node)
@@ -2115,7 +2115,7 @@ vect_split_slp_store_group (gimple *first_stmt, unsigned group1_size)
   /* GROUP_GAP of the first group now has to skip over the second group too.  */
   GROUP_GAP (first_vinfo) += group2_size;
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK, "Split group into %d and %d\n",
 		     group1_size, group2_size);
 
@@ -2173,7 +2173,7 @@ vect_analyze_slp_instance (vec_info *vinfo,
 
   if (!vectype)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         {
           vect_location_writeln (OPT_RECORD_FAILURE,
 			   "Build SLP failed: unsupported data-type ");
@@ -2239,7 +2239,7 @@ vect_analyze_slp_instance (vec_info *vinfo,
 	  if (!max_nunits.is_constant (&const_max_nunits)
 	      || const_max_nunits > group_size)
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		vect_location_writeln (OPT_RECORD_FAILURE,
 				 "Build SLP failed: store group "
 				 "size not a multiple of the vector size "
@@ -2302,7 +2302,7 @@ vect_analyze_slp_instance (vec_info *vinfo,
         {
           if (!vect_supported_load_permutation_p (new_instance))
             {
-              if (thing_enabled_p ())
+              if (optinfo_enabled_p ())
                 {
                   vect_location_writeln (OPT_RECORD_FAILURE,
 				   "Build SLP failed: unsupported load "
@@ -2337,7 +2337,7 @@ vect_analyze_slp_instance (vec_info *vinfo,
 	    }
 	  if (i == loads.length ())
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		vect_location_writeln (OPT_RECORD_FAILURE,
 				 "Built SLP cancelled: can use "
 				 "load/store-lanes\n");
@@ -2348,7 +2348,7 @@ vect_analyze_slp_instance (vec_info *vinfo,
 
       vinfo->slp_instances.safe_push (new_instance);
 
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	{
 	  vect_location_writeln (OPT_RECORD_REMARK,
 			   "Final SLP tree for instance:\n");
@@ -2416,7 +2416,7 @@ vect_analyze_slp (vec_info *vinfo, unsigned max_tree_size)
   unsigned int i;
   gimple *first_element;
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK, "=== vect_analyze_slp ===\n");
 
   /* Find SLP sequences starting from groups of grouped stores.  */
@@ -2470,7 +2470,7 @@ vect_make_slp_decision (loop_vec_info loop_vinfo)
   slp_instance instance;
   int decided_to_slp = 0;
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK, "=== vect_make_slp_decision ==="
                      "\n");
 
@@ -2492,7 +2492,7 @@ vect_make_slp_decision (loop_vec_info loop_vinfo)
 
   LOOP_VINFO_SLP_UNROLLING_FACTOR (loop_vinfo) = unrolling_factor;
 
-  if (decided_to_slp && thing_enabled_p ())
+  if (decided_to_slp && optinfo_enabled_p ())
     {
       vect_location_writeln (OPT_RECORD_REMARK,
 		       "Decided to SLP %d instances. Unrolling factor ",
@@ -2554,7 +2554,7 @@ vect_detect_hybrid_slp_stmts (slp_tree node, unsigned i, slp_vect_type stype)
 		&& !(gimple_code (use_stmt) == GIMPLE_PHI
 		     && STMT_VINFO_DEF_TYPE (use_vinfo) == vect_reduction_def))
 	      {
-		if (thing_enabled_p ())
+		if (optinfo_enabled_p ())
 		  {
 		    vect_location_writeln (OPT_RECORD_REMARK, "use of SLP "
 				     "def in non-SLP stmt: ");
@@ -2568,7 +2568,7 @@ vect_detect_hybrid_slp_stmts (slp_tree node, unsigned i, slp_vect_type stype)
   if (stype == hybrid
       && !HYBRID_SLP_STMT (stmt_vinfo))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	{
 	  vect_location_writeln (OPT_RECORD_REMARK, "marking hybrid: ");
 	  dump_gimple_stmt (MSG_NOTE, TDF_SLIM, stmt, 0);
@@ -2599,7 +2599,7 @@ vect_detect_hybrid_slp_1 (tree *tp, int *, void *data)
       if (flow_bb_inside_loop_p (loopp, gimple_bb (def_stmt))
 	  && PURE_SLP_STMT (vinfo_for_stmt (def_stmt)))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_REMARK, "marking hybrid: ");
 	      dump_gimple_stmt (MSG_NOTE, TDF_SLIM, def_stmt, 0);
@@ -2638,7 +2638,7 @@ vect_detect_hybrid_slp (loop_vec_info loop_vinfo)
   vec<slp_instance> slp_instances = LOOP_VINFO_SLP_INSTANCES (loop_vinfo);
   slp_instance instance;
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK, "=== vect_detect_hybrid_slp ==="
                      "\n");
 
@@ -2763,7 +2763,7 @@ vect_slp_analyze_node_operations (vec_info *vinfo, slp_tree node,
       gcc_assert (PURE_SLP_STMT (stmt_info));
 
       tree scalar_type = TREE_TYPE (gimple_get_lhs (stmt));
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	{
 	  vect_location_writeln (OPT_RECORD_REMARK,
 			   "get vectype for scalar type:  ");
@@ -2774,7 +2774,7 @@ vect_slp_analyze_node_operations (vec_info *vinfo, slp_tree node,
       tree vectype = get_vectype_for_scalar_type (scalar_type);
       if (!vectype)
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_FAILURE,
 			       "not SLPed: unsupported data-type ");
@@ -2785,7 +2785,7 @@ vect_slp_analyze_node_operations (vec_info *vinfo, slp_tree node,
 	  return false;
 	}
 
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	{
 	  vect_location_writeln (OPT_RECORD_REMARK, "vectype:  ");
 	  dump_generic_expr (MSG_NOTE, TDF_SLIM, vectype);
@@ -2847,7 +2847,7 @@ vect_slp_analyze_operations (vec_info *vinfo)
   slp_instance instance;
   int i;
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK,
 		     "=== vect_slp_analyze_operations ===\n");
 
@@ -2869,7 +2869,7 @@ vect_slp_analyze_operations (vec_info *vinfo)
 	i++;
     }
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK,
 		     "=== vect_analyze_slp_cost ===\n");
 
@@ -2995,7 +2995,7 @@ vect_bb_vectorization_profitable_p (bb_vec_info bb_vinfo)
 
   vec_outside_cost = vec_prologue_cost + vec_epilogue_cost;
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     {
       vect_location_writeln (OPT_RECORD_REMARK, "Cost model analysis: \n");
       dump_printf (MSG_NOTE, "  Vector inside of basic block cost: %d\n",
@@ -3036,7 +3036,7 @@ vect_slp_analyze_bb_1 (gimple_stmt_iterator region_begin,
 
   if (n_stmts > PARAM_VALUE (PARAM_SLP_MAX_INSNS_IN_BB))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "not vectorized: too many instructions in "
 			 "basic block.\n");
@@ -3054,7 +3054,7 @@ vect_slp_analyze_bb_1 (gimple_stmt_iterator region_begin,
 
   if (!vect_analyze_data_refs (bb_vinfo, &min_vf))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_FAILURE,
 			 "not vectorized: unhandled data-ref in basic "
 			 "block.\n");
@@ -3065,7 +3065,7 @@ vect_slp_analyze_bb_1 (gimple_stmt_iterator region_begin,
 
   if (BB_VINFO_DATAREFS (bb_vinfo).length () < 2)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_FAILURE,
 			 "not vectorized: not enough data-refs in "
 			 "basic block.\n");
@@ -3076,7 +3076,7 @@ vect_slp_analyze_bb_1 (gimple_stmt_iterator region_begin,
 
   if (!vect_analyze_data_ref_accesses (bb_vinfo))
     {
-     if (thing_enabled_p ())
+     if (optinfo_enabled_p ())
        vect_location_writeln (OPT_RECORD_FAILURE,
 			"not vectorized: unhandled data access in "
 			"basic block.\n");
@@ -3090,7 +3090,7 @@ vect_slp_analyze_bb_1 (gimple_stmt_iterator region_begin,
      anyway.  */
   if (bb_vinfo->grouped_stores.is_empty ())
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "not vectorized: no grouped stores in "
 			 "basic block.\n");
@@ -3108,7 +3108,7 @@ vect_slp_analyze_bb_1 (gimple_stmt_iterator region_begin,
      trees.  */
   if (!vect_analyze_slp (bb_vinfo, n_stmts))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	{
 	  vect_location_writeln (OPT_RECORD_FAILURE,
 			   "Failed to SLP the basic block.\n");
@@ -3155,7 +3155,7 @@ vect_slp_analyze_bb_1 (gimple_stmt_iterator region_begin,
 
   if (!vect_slp_analyze_operations (bb_vinfo))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_FAILURE,
 			 "not vectorized: bad operation in basic block.\n");
 
@@ -3167,7 +3167,7 @@ vect_slp_analyze_bb_1 (gimple_stmt_iterator region_begin,
   if (!unlimited_cost_model (NULL)
       && !vect_bb_vectorization_profitable_p (bb_vinfo))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_FAILURE,
 			 "not vectorized: vectorization is not "
 			 "profitable.\n");
@@ -3176,7 +3176,7 @@ vect_slp_analyze_bb_1 (gimple_stmt_iterator region_begin,
       return NULL;
     }
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK,
 		     "Basic block will be vectorized using SLP\n");
 
@@ -3195,7 +3195,7 @@ vect_slp_bb (basic_block bb)
   bool any_vectorized = false;
   auto_vector_sizes vector_sizes;
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     vect_location_writeln (OPT_RECORD_REMARK, "===vect_slp_analyze_bb===\n");
 
   /* Autodetect first vector size we try.  */
@@ -3248,12 +3248,12 @@ vect_slp_bb (basic_block bb)
       if (bb_vinfo
 	  && dbg_cnt (vect_slp))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_REMARK, "SLPing BB part\n");
 
 	  vect_schedule_slp (bb_vinfo);
 
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_REMARK,
 			     "basic block part vectorized\n");
 
@@ -3291,7 +3291,7 @@ vect_slp_bb (basic_block bb)
 	{
 	  /* Try the next biggest vector size.  */
 	  current_vector_size = vector_sizes[next_size++];
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      vect_location_writeln (OPT_RECORD_REMARK,
 			       "***** Re-trying analysis with "
@@ -3955,7 +3955,7 @@ vect_transform_slp_perm_load (slp_tree node, vec<tree> dr_chain,
 	    }
 	  else
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		{
 		  // FIXME: would be better to use "stmt" for location here:
 		  vect_location_writeln (OPT_RECORD_FAILURE,
@@ -3978,7 +3978,7 @@ vect_transform_slp_perm_load (slp_tree node, vec<tree> dr_chain,
 	      indices.new_vector (mask, 2, nunits);
 	      if (!can_vec_perm_const_p (mode, indices))
 		{
-		  if (thing_enabled_p ())
+		  if (optinfo_enabled_p ())
 		    {
 		      dump_printf_loc (MSG_MISSED_OPTIMIZATION,
 				       vect_location, 
@@ -4098,7 +4098,7 @@ vect_schedule_slp_instance (slp_tree node, slp_instance instance,
   if (!SLP_TREE_VEC_STMTS (node).exists ())
     SLP_TREE_VEC_STMTS (node).create (SLP_TREE_NUMBER_OF_VEC_STMTS (node));
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     {
       dump_printf_loc (MSG_NOTE,vect_location,
 		       "------>vectorizing SLP node starting from: ");
@@ -4260,7 +4260,7 @@ vect_schedule_slp (vec_info *vinfo)
       /* Schedule the tree of INSTANCE.  */
       is_store = vect_schedule_slp_instance (SLP_INSTANCE_TREE (instance),
                                              instance, bst_map);
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_REMARK,
                          "vectorizing stmts using SLP.\n");
     }
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 606c7dc..26709f5 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -197,7 +197,7 @@ vect_mark_relevant (vec<gimple *> *worklist, gimple *stmt,
   bool save_live_p = STMT_VINFO_LIVE_P (stmt_info);
   gimple *pattern_stmt;
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     {
       dump_printf_loc (MSG_NOTE, vect_location,
 		       "mark relevant %d, live %d: ", relevant, live_p);
@@ -217,7 +217,7 @@ vect_mark_relevant (vec<gimple *> *worklist, gimple *stmt,
 
       pattern_stmt = STMT_VINFO_RELATED_STMT (stmt_info);
 
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	dump_printf_loc (MSG_NOTE, vect_location,
 			 "last stmt in pattern. don't mark"
 			 " relevant/live.\n");
@@ -235,7 +235,7 @@ vect_mark_relevant (vec<gimple *> *worklist, gimple *stmt,
   if (STMT_VINFO_RELEVANT (stmt_info) == save_relevant
       && STMT_VINFO_LIVE_P (stmt_info) == save_live_p)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         dump_printf_loc (MSG_NOTE, vect_location,
                          "already marked relevant/live.\n");
       return;
@@ -265,7 +265,7 @@ is_simple_and_all_uses_invariant (gimple *stmt, loop_vec_info loop_vinfo)
 
       if (!vect_is_simple_use (op, loop_vinfo, &def_stmt, &dt))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "use not simple.\n");
 	  return false;
@@ -313,7 +313,7 @@ vect_stmt_relevant_p (gimple *stmt, loop_vec_info loop_vinfo,
     if (gimple_vdef (stmt)
 	&& !gimple_clobber_p (stmt))
       {
-	if (thing_enabled_p ())
+	if (optinfo_enabled_p ())
 	  dump_printf_loc (MSG_NOTE, vect_location,
                            "vec_stmt_relevant_p: stmt has vdefs.\n");
 	*relevant = vect_used_in_scope;
@@ -327,7 +327,7 @@ vect_stmt_relevant_p (gimple *stmt, loop_vec_info loop_vinfo,
 	  basic_block bb = gimple_bb (USE_STMT (use_p));
 	  if (!flow_bb_inside_loop_p (loop, bb))
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		dump_printf_loc (MSG_NOTE, vect_location,
                                  "vec_stmt_relevant_p: used out of loop.\n");
 
@@ -347,7 +347,7 @@ vect_stmt_relevant_p (gimple *stmt, loop_vec_info loop_vinfo,
   if (*live_p && *relevant == vect_unused_in_scope
       && !is_simple_and_all_uses_invariant (stmt, loop_vinfo))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	dump_printf_loc (MSG_NOTE, vect_location,
 			 "vec_stmt_relevant_p: stmt live but not relevant.\n");
       *relevant = vect_used_only_live;
@@ -467,7 +467,7 @@ process_use (gimple *stmt, tree use, loop_vec_info loop_vinfo,
 
   if (!vect_is_simple_use (use, loop_vinfo, &def_stmt, &dt))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_FAILURE,
                          "not vectorized: unsupported use in stmt.\n");
       return false;
@@ -479,7 +479,7 @@ process_use (gimple *stmt, tree use, loop_vec_info loop_vinfo,
   def_bb = gimple_bb (def_stmt);
   if (!flow_bb_inside_loop_p (loop, def_bb))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	dump_printf_loc (MSG_NOTE, vect_location, "def_stmt is out of loop.\n");
       return true;
     }
@@ -497,7 +497,7 @@ process_use (gimple *stmt, tree use, loop_vec_info loop_vinfo,
       && STMT_VINFO_DEF_TYPE (dstmt_vinfo) == vect_reduction_def
       && bb->loop_father == def_bb->loop_father)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	dump_printf_loc (MSG_NOTE, vect_location,
                          "reduc-stmt defining reduc-phi in the same nest.\n");
       if (STMT_VINFO_IN_PATTERN_P (dstmt_vinfo))
@@ -517,7 +517,7 @@ process_use (gimple *stmt, tree use, loop_vec_info loop_vinfo,
 		...		  */
   if (flow_loop_nested_p (def_bb->loop_father, bb->loop_father))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	dump_printf_loc (MSG_NOTE, vect_location,
                          "outer-loop def-stmt defining inner-loop stmt.\n");
 
@@ -555,7 +555,7 @@ process_use (gimple *stmt, tree use, loop_vec_info loop_vinfo,
 		stmt # use (d)		*/
   else if (flow_loop_nested_p (bb->loop_father, def_bb->loop_father))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	dump_printf_loc (MSG_NOTE, vect_location,
                          "inner-loop def-stmt defining outer-loop stmt.\n");
 
@@ -590,7 +590,7 @@ process_use (gimple *stmt, tree use, loop_vec_info loop_vinfo,
 	   && (PHI_ARG_DEF_FROM_EDGE (stmt, loop_latch_edge (bb->loop_father))
 	       == use))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	dump_printf_loc (MSG_NOTE, vect_location,
                          "induction value on backedge.\n");
       return true;
@@ -633,7 +633,7 @@ vect_mark_stmts_to_be_vectorized (loop_vec_info loop_vinfo)
   bool live_p;
   enum vect_relevant relevant;
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     dump_printf_loc (MSG_NOTE, vect_location,
                      "=== vect_mark_stmts_to_be_vectorized ===\n");
 
@@ -646,7 +646,7 @@ vect_mark_stmts_to_be_vectorized (loop_vec_info loop_vinfo)
       for (si = gsi_start_phis (bb); !gsi_end_p (si); gsi_next (&si))
 	{
 	  phi = gsi_stmt (si);
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      dump_printf_loc (MSG_NOTE, vect_location, "init: phi relevant? ");
 	      dump_gimple_stmt (MSG_NOTE, TDF_SLIM, phi, 0);
@@ -658,7 +658,7 @@ vect_mark_stmts_to_be_vectorized (loop_vec_info loop_vinfo)
       for (si = gsi_start_bb (bb); !gsi_end_p (si); gsi_next (&si))
 	{
 	  stmt = gsi_stmt (si);
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    {
 	      dump_printf_loc (MSG_NOTE, vect_location, "init: stmt relevant? ");
 	      dump_gimple_stmt (MSG_NOTE, TDF_SLIM, stmt, 0);
@@ -676,7 +676,7 @@ vect_mark_stmts_to_be_vectorized (loop_vec_info loop_vinfo)
       ssa_op_iter iter;
 
       stmt = worklist.pop ();
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	{
           dump_printf_loc (MSG_NOTE, vect_location, "worklist: examine stmt: ");
           dump_gimple_stmt (MSG_NOTE, TDF_SLIM, stmt, 0);
@@ -708,7 +708,7 @@ vect_mark_stmts_to_be_vectorized (loop_vec_info loop_vinfo)
 		&& relevant != vect_used_by_reduction
 		&& relevant != vect_used_only_live)
 	      {
-		if (thing_enabled_p ())
+		if (optinfo_enabled_p ())
 		  vect_location_writeln (OPT_RECORD_FAILURE,
 				   "unsupported use of reduction.\n");
 		return false;
@@ -720,7 +720,7 @@ vect_mark_stmts_to_be_vectorized (loop_vec_info loop_vinfo)
 		&& relevant != vect_used_in_outer_by_reduction
 		&& relevant != vect_used_in_outer)
               {
-                if (thing_enabled_p ())
+                if (optinfo_enabled_p ())
                   vect_location_writeln (OPT_RECORD_FAILURE,
                                    "unsupported use of nested cycle.\n");
 
@@ -733,7 +733,7 @@ vect_mark_stmts_to_be_vectorized (loop_vec_info loop_vinfo)
 		&& relevant != vect_used_by_reduction
 		&& relevant != vect_used_only_live)
               {
-                if (thing_enabled_p ())
+                if (optinfo_enabled_p ())
                   vect_location_writeln (OPT_RECORD_FAILURE,
                                    "unsupported use of double reduction.\n");
 
@@ -840,7 +840,7 @@ vect_model_simple_cost (stmt_vec_info stmt_info, int ncopies,
   inside_cost = record_stmt_cost (body_cost_vec, ncopies, vector_stmt,
 				  stmt_info, 0, vect_body);
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     dump_printf_loc (MSG_NOTE, vect_location,
                      "vect_model_simple_cost: inside_cost = %d, "
                      "prologue_cost = %d .\n", inside_cost, prologue_cost);
@@ -885,7 +885,7 @@ vect_model_promotion_demotion_cost (stmt_vec_info stmt_info,
       prologue_cost += add_stmt_cost (target_cost_data, 1, vector_stmt,
 				      stmt_info, 0, vect_prologue);
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     dump_printf_loc (MSG_NOTE, vect_location,
                      "vect_model_promotion_demotion_cost: inside_cost = %d, "
                      "prologue_cost = %d .\n", inside_cost, prologue_cost);
@@ -939,7 +939,7 @@ vect_model_store_cost (stmt_vec_info stmt_info, int ncopies,
       inside_cost = record_stmt_cost (body_cost_vec, nstmts, vec_perm,
 				      stmt_info, 0, vect_body);
 
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         dump_printf_loc (MSG_NOTE, vect_location,
                          "vect_model_store_cost: strided group_size = %d .\n",
                          group_size);
@@ -969,7 +969,7 @@ vect_model_store_cost (stmt_vec_info stmt_info, int ncopies,
 				       vec_to_scalar, stmt_info, 0, vect_body);
     }
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     dump_printf_loc (MSG_NOTE, vect_location,
                      "vect_model_store_cost: inside_cost = %d, "
                      "prologue_cost = %d .\n", inside_cost, prologue_cost);
@@ -994,7 +994,7 @@ vect_get_store_cost (struct data_reference *dr, int ncopies,
 					  vector_store, stmt_info, 0,
 					  vect_body);
 
-        if (thing_enabled_p ())
+        if (optinfo_enabled_p ())
           dump_printf_loc (MSG_NOTE, vect_location,
                            "vect_model_store_cost: aligned.\n");
         break;
@@ -1006,7 +1006,7 @@ vect_get_store_cost (struct data_reference *dr, int ncopies,
 	*inside_cost += record_stmt_cost (body_cost_vec, ncopies,
 					  unaligned_store, stmt_info,
 					  DR_MISALIGNMENT (dr), vect_body);
-        if (thing_enabled_p ())
+        if (optinfo_enabled_p ())
           dump_printf_loc (MSG_NOTE, vect_location,
                            "vect_model_store_cost: unaligned supported by "
                            "hardware.\n");
@@ -1017,7 +1017,7 @@ vect_get_store_cost (struct data_reference *dr, int ncopies,
       {
         *inside_cost = VECT_MAX_COST;
 
-        if (thing_enabled_p ())
+        if (optinfo_enabled_p ())
           vect_location_writeln (OPT_RECORD_FAILURE,
                            "vect_model_store_cost: unsupported access.\n");
         break;
@@ -1075,7 +1075,7 @@ vect_model_load_cost (stmt_vec_info stmt_info, int ncopies,
       inside_cost = record_stmt_cost (body_cost_vec, nstmts, vec_perm,
 				      stmt_info, 0, vect_body);
 
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         dump_printf_loc (MSG_NOTE, vect_location,
                          "vect_model_load_cost: strided group_size = %d .\n",
                          group_size);
@@ -1101,7 +1101,7 @@ vect_model_load_cost (stmt_vec_info stmt_info, int ncopies,
     inside_cost += record_stmt_cost (body_cost_vec, ncopies, vec_construct,
 				     stmt_info, 0, vect_body);
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     dump_printf_loc (MSG_NOTE, vect_location,
                      "vect_model_load_cost: inside_cost = %d, "
                      "prologue_cost = %d .\n", inside_cost, prologue_cost);
@@ -1128,7 +1128,7 @@ vect_get_load_cost (struct data_reference *dr, int ncopies,
 	*inside_cost += record_stmt_cost (body_cost_vec, ncopies, vector_load,
 					  stmt_info, 0, vect_body);
 
-        if (thing_enabled_p ())
+        if (optinfo_enabled_p ())
           dump_printf_loc (MSG_NOTE, vect_location,
                            "vect_model_load_cost: aligned.\n");
 
@@ -1141,7 +1141,7 @@ vect_get_load_cost (struct data_reference *dr, int ncopies,
 					  unaligned_load, stmt_info,
 					  DR_MISALIGNMENT (dr), vect_body);
 
-        if (thing_enabled_p ())
+        if (optinfo_enabled_p ())
           dump_printf_loc (MSG_NOTE, vect_location,
                            "vect_model_load_cost: unaligned supported by "
                            "hardware.\n");
@@ -1162,7 +1162,7 @@ vect_get_load_cost (struct data_reference *dr, int ncopies,
 	  *inside_cost += record_stmt_cost (body_cost_vec, 1, vector_stmt,
 					    stmt_info, 0, vect_body);
 
-        if (thing_enabled_p ())
+        if (optinfo_enabled_p ())
           dump_printf_loc (MSG_NOTE, vect_location,
                            "vect_model_load_cost: explicit realign\n");
 
@@ -1170,7 +1170,7 @@ vect_get_load_cost (struct data_reference *dr, int ncopies,
       }
     case dr_explicit_realign_optimized:
       {
-        if (thing_enabled_p ())
+        if (optinfo_enabled_p ())
           dump_printf_loc (MSG_NOTE, vect_location,
                            "vect_model_load_cost: unaligned software "
                            "pipelined.\n");
@@ -1198,7 +1198,7 @@ vect_get_load_cost (struct data_reference *dr, int ncopies,
 	*inside_cost += record_stmt_cost (body_cost_vec, ncopies, vec_perm,
 					  stmt_info, 0, vect_body);
 
-        if (thing_enabled_p ())
+        if (optinfo_enabled_p ())
           dump_printf_loc (MSG_NOTE, vect_location,
                            "vect_model_load_cost: explicit realign optimized"
                            "\n");
@@ -1210,7 +1210,7 @@ vect_get_load_cost (struct data_reference *dr, int ncopies,
       {
         *inside_cost = VECT_MAX_COST;
 
-        if (thing_enabled_p ())
+        if (optinfo_enabled_p ())
           vect_location_writeln (OPT_RECORD_FAILURE,
                            "vect_model_load_cost: unsupported access.\n");
         break;
@@ -1260,7 +1260,7 @@ vect_init_vector_1 (gimple *stmt, gimple *new_stmt, gimple_stmt_iterator *gsi)
        }
     }
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     {
       dump_printf_loc (MSG_NOTE, vect_location,
                        "created new init_stmt: ");
@@ -1421,7 +1421,7 @@ vect_get_vec_def_for_operand (tree op, gimple *stmt, tree vectype)
   stmt_vec_info stmt_vinfo = vinfo_for_stmt (stmt);
   loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_vinfo);
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     {
       dump_printf_loc (MSG_NOTE, vect_location,
                        "vect_get_vec_def_for_operand: ");
@@ -1431,7 +1431,7 @@ vect_get_vec_def_for_operand (tree op, gimple *stmt, tree vectype)
 
   is_simple_use = vect_is_simple_use (op, loop_vinfo, &def_stmt, &dt);
   gcc_assert (is_simple_use);
-  if (def_stmt && thing_enabled_p ())
+  if (def_stmt && optinfo_enabled_p ())
     {
       dump_printf_loc (MSG_NOTE, vect_location, "  def_stmt =  ");
       dump_gimple_stmt (MSG_NOTE, TDF_SLIM, def_stmt, 0);
@@ -1612,7 +1612,7 @@ vect_finish_stmt_generation_1 (gimple *stmt, gimple *vec_stmt)
 
   set_vinfo_for_stmt (vec_stmt, new_stmt_vec_info (vec_stmt, vinfo));
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     {
       dump_printf_loc (MSG_NOTE, vect_location, "add new stmt: ");
       dump_gimple_stmt (MSG_NOTE, TDF_SLIM, vec_stmt, 0);
@@ -1749,7 +1749,7 @@ check_load_store_masking (loop_vec_info loop_vinfo, tree vectype,
 	  ? !vect_load_lanes_supported (vectype, group_size, true)
 	  : !vect_store_lanes_supported (vectype, group_size, true))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "can't use a fully-masked loop because the"
 			     " target doesn't have an appropriate masked"
@@ -1773,7 +1773,7 @@ check_load_store_masking (loop_vec_info loop_vinfo, tree vectype,
 						   TYPE_SIGN (offset_type),
 						   gs_info->scale))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "can't use a fully-masked loop because the"
 			     " target doesn't have an appropriate masked"
@@ -1791,7 +1791,7 @@ check_load_store_masking (loop_vec_info loop_vinfo, tree vectype,
     {
       /* Element X of the data must come from iteration i * VF + X of the
 	 scalar loop.  We need more work to support other mappings.  */
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "can't use a fully-masked loop because an access"
 			 " isn't contiguous.\n");
@@ -1805,7 +1805,7 @@ check_load_store_masking (loop_vec_info loop_vinfo, tree vectype,
 	 GET_MODE_SIZE (vecmode)).exists (&mask_mode))
       || !can_vec_mask_load_store_p (vecmode, mask_mode, is_load))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "can't use a fully-masked loop because the target"
 			 " doesn't have the appropriate masked load or"
@@ -1871,7 +1871,7 @@ vect_truncate_gather_scatter_offset (gimple *stmt, loop_vec_info loop_vinfo,
   if (TREE_CODE (step) != INTEGER_CST)
     {
       /* ??? Perhaps we could use range information here?  */
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	dump_printf_loc (MSG_NOTE, vect_location,
 			 "cannot truncate variable step.\n");
       return false;
@@ -1937,7 +1937,7 @@ vect_truncate_gather_scatter_offset (gimple *stmt, loop_vec_info loop_vinfo,
       return true;
     }
 
-  if (overflow_p && thing_enabled_p ())
+  if (overflow_p && optinfo_enabled_p ())
     dump_printf_loc (MSG_NOTE, vect_location,
 		     "truncating gather/scatter offset to %d bits"
 		     " might change its value.\n", element_bits);
@@ -1978,7 +1978,7 @@ vect_use_strided_gather_scatters_p (gimple *stmt, loop_vec_info loop_vinfo,
       gs_info->offset = fold_convert (offset_type, gs_info->offset);
     }
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     dump_printf_loc (MSG_NOTE, vect_location,
 		     "using gather/scatter for strided/grouped access,"
 		     " scale = %d\n", gs_info->scale);
@@ -2116,7 +2116,7 @@ get_group_load_store_type (gimple *stmt, tree vectype, bool slp,
 	    overrun_p = false;
 	  if (overrun_p && !can_overrun_p)
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		vect_location_writeln (OPT_RECORD_FAILURE,
 				 "Peeling for outer loop is not supported\n");
 	      return false;
@@ -2202,7 +2202,7 @@ get_group_load_store_type (gimple *stmt, tree vectype, bool slp,
 	  enum vect_def_type dt;
 	  if (!vect_is_simple_use (op, vinfo, &def_stmt, &dt))
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		vect_location_writeln (OPT_RECORD_FAILURE,
 				 "use not simple.\n");
 	      return false;
@@ -2214,7 +2214,7 @@ get_group_load_store_type (gimple *stmt, tree vectype, bool slp,
   if (overrun_p)
     {
       gcc_assert (can_overrun_p);
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "Data access with gaps requires scalar "
 			 "epilogue loop\n");
@@ -2239,7 +2239,7 @@ get_negative_load_store_type (gimple *stmt, tree vectype,
 
   if (ncopies > 1)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "multiple types with negative step.\n");
       return VMAT_ELEMENTWISE;
@@ -2249,7 +2249,7 @@ get_negative_load_store_type (gimple *stmt, tree vectype,
   if (alignment_support_scheme != dr_aligned
       && alignment_support_scheme != dr_unaligned_supported)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "negative step but alignment required.\n");
       return VMAT_ELEMENTWISE;
@@ -2257,7 +2257,7 @@ get_negative_load_store_type (gimple *stmt, tree vectype,
 
   if (vls_type == VLS_STORE_INVARIANT)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	dump_printf_loc (MSG_NOTE, vect_location,
 			 "negative step with invariant source;"
 			 " no permute needed.\n");
@@ -2266,7 +2266,7 @@ get_negative_load_store_type (gimple *stmt, tree vectype,
 
   if (!perm_mask_for_reverse (vectype))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "negative step and reversing not supported.\n");
       return VMAT_ELEMENTWISE;
@@ -2305,7 +2305,7 @@ get_load_store_type (gimple *stmt, tree vectype, bool slp, bool masked_p,
 				    &gs_info->offset_dt,
 				    &gs_info->offset_vectype))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "%s index use not simple.\n",
 			     vls_type == VLS_LOAD ? "gather" : "scatter");
@@ -2347,7 +2347,7 @@ get_load_store_type (gimple *stmt, tree vectype, bool slp, bool masked_p,
        || *memory_access_type == VMAT_STRIDED_SLP)
       && !nunits.is_constant ())
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "Not using elementwise accesses due to variable "
 			 "vectorization factor.\n");
@@ -2363,7 +2363,7 @@ get_load_store_type (gimple *stmt, tree vectype, bool slp, bool masked_p,
 	   && !GROUP_NEXT_ELEMENT (stmt_info)
 	   && !pow2p_hwi (GROUP_SIZE (stmt_info))))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "not falling back to elementwise accesses\n");
       return false;
@@ -2383,7 +2383,7 @@ vect_check_load_store_mask (gimple *stmt, tree mask,
 {
   if (!VECT_SCALAR_BOOLEAN_TYPE_P (TREE_TYPE (mask)))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "mask argument is not a boolean.\n");
       return false;
@@ -2391,7 +2391,7 @@ vect_check_load_store_mask (gimple *stmt, tree mask,
 
   if (TREE_CODE (mask) != SSA_NAME)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "mask argument is not an SSA name.\n");
       return false;
@@ -2404,7 +2404,7 @@ vect_check_load_store_mask (gimple *stmt, tree mask,
   if (!vect_is_simple_use (mask, stmt_info->vinfo, &def_stmt, &mask_dt,
 			   &mask_vectype))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "mask use not simple.\n");
       return false;
@@ -2416,7 +2416,7 @@ vect_check_load_store_mask (gimple *stmt, tree mask,
 
   if (!mask_vectype || !VECTOR_BOOLEAN_TYPE_P (mask_vectype))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "could not find an appropriate vector mask type.\n");
       return false;
@@ -2425,7 +2425,7 @@ vect_check_load_store_mask (gimple *stmt, tree mask,
   if (maybe_ne (TYPE_VECTOR_SUBPARTS (mask_vectype),
 		TYPE_VECTOR_SUBPARTS (vectype)))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	{
 	  vect_location_writeln (OPT_RECORD_FAILURE,
 			   "vector mask type ");
@@ -2456,7 +2456,7 @@ vect_check_store_rhs (gimple *stmt, tree rhs, vect_def_type *rhs_dt_out,
      native_encode_expr can handle it.  */
   if (CONSTANT_CLASS_P (rhs) && native_encode_expr (rhs, NULL, 64) == 0)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "cannot encode constant as a byte sequence.\n");
       return false;
@@ -2469,7 +2469,7 @@ vect_check_store_rhs (gimple *stmt, tree rhs, vect_def_type *rhs_dt_out,
   if (!vect_is_simple_use (rhs, stmt_info->vinfo, &def_stmt, &rhs_dt,
 			   &rhs_vectype))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "use not simple.\n");
       return false;
@@ -2478,7 +2478,7 @@ vect_check_store_rhs (gimple *stmt, tree rhs, vect_def_type *rhs_dt_out,
   tree vectype = STMT_VINFO_VECTYPE (stmt_info);
   if (rhs_vectype && !useless_type_conversion_p (vectype, rhs_vectype))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "incompatible vector types.\n");
       return false;
@@ -2886,7 +2886,7 @@ vectorizable_bswap (gimple *stmt, gimple_stmt_iterator *gsi,
   if (! vec_stmt)
     {
       STMT_VINFO_TYPE (stmt_info) = call_vec_info_type;
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         dump_printf_loc (MSG_NOTE, vect_location, "=== vectorizable_bswap ==="
                          "\n");
       if (! slp_node)
@@ -3065,7 +3065,7 @@ vectorizable_call (gimple *gs, gimple_stmt_iterator *gsi, gimple **vec_stmt,
       if (rhs_type
 	  && !types_compatible_p (rhs_type, TREE_TYPE (op)))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
                              "argument types differ.\n");
 	  return false;
@@ -3075,7 +3075,7 @@ vectorizable_call (gimple *gs, gimple_stmt_iterator *gsi, gimple **vec_stmt,
 
       if (!vect_is_simple_use (op, vinfo, &def_stmt, &dt[i], &opvectype))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
                              "use not simple.\n");
 	  return false;
@@ -3086,7 +3086,7 @@ vectorizable_call (gimple *gs, gimple_stmt_iterator *gsi, gimple **vec_stmt,
       else if (opvectype
 	       && opvectype != vectype_in)
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
                              "argument vector types differ.\n");
 	  return false;
@@ -3100,7 +3100,7 @@ vectorizable_call (gimple *gs, gimple_stmt_iterator *gsi, gimple **vec_stmt,
     gcc_assert (vectype_in);
   if (!vectype_in)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         {
           vect_location_writeln (OPT_RECORD_FAILURE,
                            "no vectype for scalar type ");
@@ -3126,7 +3126,7 @@ vectorizable_call (gimple *gs, gimple_stmt_iterator *gsi, gimple **vec_stmt,
   /* We only handle functions that do not read or clobber memory.  */
   if (gimple_vuse (stmt))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "function reads from or writes to memory.\n");
       return false;
@@ -3184,7 +3184,7 @@ vectorizable_call (gimple *gs, gimple_stmt_iterator *gsi, gimple **vec_stmt,
 				   vectype_in, dt);
       else
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "function is not vectorizable.\n");
 	  return false;
@@ -3205,7 +3205,7 @@ vectorizable_call (gimple *gs, gimple_stmt_iterator *gsi, gimple **vec_stmt,
   if (!vec_stmt) /* transformation not required.  */
     {
       STMT_VINFO_TYPE (stmt_info) = call_vec_info_type;
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         dump_printf_loc (MSG_NOTE, vect_location, "=== vectorizable_call ==="
                          "\n");
       if (!slp_node)
@@ -3221,7 +3221,7 @@ vectorizable_call (gimple *gs, gimple_stmt_iterator *gsi, gimple **vec_stmt,
 
   /* Transform.  */
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     dump_printf_loc (MSG_NOTE, vect_location, "transform call.\n");
 
   /* Handle def.  */
@@ -3666,7 +3666,7 @@ vectorizable_simd_clone_call (gimple *stmt, gimple_stmt_iterator *gsi,
 			       &thisarginfo.vectype)
 	  || thisarginfo.dt == vect_uninitialized_def)
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "use not simple.\n");
 	  return false;
@@ -3741,7 +3741,7 @@ vectorizable_simd_clone_call (gimple *stmt, gimple_stmt_iterator *gsi,
   unsigned HOST_WIDE_INT vf;
   if (!LOOP_VINFO_VECT_FACTOR (loop_vinfo).is_constant (&vf))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "not considering SIMD clones; not yet supported"
 			 " for variable-width vectors.\n");
@@ -3884,7 +3884,7 @@ vectorizable_simd_clone_call (gimple *stmt, gimple_stmt_iterator *gsi,
 	    STMT_VINFO_SIMD_CLONE_INFO (stmt_info).safe_push (sll);
 	  }
       STMT_VINFO_TYPE (stmt_info) = call_simd_clone_vec_info_type;
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	dump_printf_loc (MSG_NOTE, vect_location,
 			 "=== vectorizable_simd_clone_call ===\n");
 /*      vect_model_simple_cost (stmt_info, ncopies, dt, NULL, NULL); */
@@ -3893,7 +3893,7 @@ vectorizable_simd_clone_call (gimple *stmt, gimple_stmt_iterator *gsi,
 
   /* Transform.  */
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     dump_printf_loc (MSG_NOTE, vect_location, "transform call.\n");
 
   /* Handle def.  */
@@ -4524,7 +4524,7 @@ vectorizable_conversion (gimple *stmt, gimple_stmt_iterator *gsi,
 	  || (INTEGRAL_TYPE_P (rhs_type)
 	      && !type_has_mode_precision_p (rhs_type))))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
                          "type conversion to/from bit-precision unsupported."
                          "\n");
@@ -4534,7 +4534,7 @@ vectorizable_conversion (gimple *stmt, gimple_stmt_iterator *gsi,
   /* Check the operands of the operation.  */
   if (!vect_is_simple_use (op0, vinfo, &def_stmt, &dt[0], &vectype_in))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
                          "use not simple.\n");
       return false;
@@ -4554,7 +4554,7 @@ vectorizable_conversion (gimple *stmt, gimple_stmt_iterator *gsi,
 
       if (!ok)
 	{
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
             vect_location_writeln (OPT_RECORD_FAILURE,
                              "use not simple.\n");
 	  return false;
@@ -4569,7 +4569,7 @@ vectorizable_conversion (gimple *stmt, gimple_stmt_iterator *gsi,
     gcc_assert (vectype_in);
   if (!vectype_in)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	{
 	  vect_location_writeln (OPT_RECORD_FAILURE,
                            "no vectype for scalar type ");
@@ -4583,7 +4583,7 @@ vectorizable_conversion (gimple *stmt, gimple_stmt_iterator *gsi,
   if (VECTOR_BOOLEAN_TYPE_P (vectype_out)
       && !VECTOR_BOOLEAN_TYPE_P (vectype_in))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	{
 	  vect_location_writeln (OPT_RECORD_FAILURE,
                            "can't convert between boolean and non "
@@ -4637,7 +4637,7 @@ vectorizable_conversion (gimple *stmt, gimple_stmt_iterator *gsi,
 	break;
       /* FALLTHRU */
     unsupported:
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
                          "conversion not supported by target.\n");
       return false;
@@ -4737,7 +4737,7 @@ vectorizable_conversion (gimple *stmt, gimple_stmt_iterator *gsi,
 
   if (!vec_stmt)		/* transformation not required.  */
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	dump_printf_loc (MSG_NOTE, vect_location,
                          "=== vectorizable_conversion ===\n");
       if (code == FIX_TRUNC_EXPR || code == FLOAT_EXPR)
@@ -4763,7 +4763,7 @@ vectorizable_conversion (gimple *stmt, gimple_stmt_iterator *gsi,
     }
 
   /* Transform.  */
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     dump_printf_loc (MSG_NOTE, vect_location,
                      "transform conversion. ncopies = %d.\n", ncopies);
 
@@ -5108,7 +5108,7 @@ vectorizable_assignment (gimple *stmt, gimple_stmt_iterator *gsi,
 
   if (!vect_is_simple_use (op, vinfo, &def_stmt, &dt[0], &vectype_in))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_FAILURE,
                          "use not simple.\n");
       return false;
@@ -5140,7 +5140,7 @@ vectorizable_assignment (gimple *stmt, gimple_stmt_iterator *gsi,
       && (!VECTOR_BOOLEAN_TYPE_P (vectype)
 	  || !VECTOR_BOOLEAN_TYPE_P (vectype_in)))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_FAILURE,
                          "type conversion to/from bit-precision "
                          "unsupported.\n");
@@ -5150,7 +5150,7 @@ vectorizable_assignment (gimple *stmt, gimple_stmt_iterator *gsi,
   if (!vec_stmt) /* transformation not required.  */
     {
       STMT_VINFO_TYPE (stmt_info) = assignment_vec_info_type;
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         dump_printf_loc (MSG_NOTE, vect_location,
                          "=== vectorizable_assignment ===\n");
       if (!slp_node)
@@ -5159,7 +5159,7 @@ vectorizable_assignment (gimple *stmt, gimple_stmt_iterator *gsi,
     }
 
   /* Transform.  */
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     dump_printf_loc (MSG_NOTE, vect_location, "transform assignment.\n");
 
   /* Handle def.  */
@@ -5307,7 +5307,7 @@ vectorizable_shift (gimple *stmt, gimple_stmt_iterator *gsi,
   vectype_out = STMT_VINFO_VECTYPE (stmt_info);
   if (!type_has_mode_precision_p (TREE_TYPE (scalar_dest)))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_FAILURE,
                          "bit-precision shifts not supported.\n");
       return false;
@@ -5316,7 +5316,7 @@ vectorizable_shift (gimple *stmt, gimple_stmt_iterator *gsi,
   op0 = gimple_assign_rhs1 (stmt);
   if (!vect_is_simple_use (op0, vinfo, &def_stmt, &dt[0], &vectype))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_FAILURE,
                          "use not simple.\n");
       return false;
@@ -5329,7 +5329,7 @@ vectorizable_shift (gimple *stmt, gimple_stmt_iterator *gsi,
     gcc_assert (vectype);
   if (!vectype)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_FAILURE,
                          "no vectype for scalar type\n");
       return false;
@@ -5343,7 +5343,7 @@ vectorizable_shift (gimple *stmt, gimple_stmt_iterator *gsi,
   op1 = gimple_assign_rhs2 (stmt);
   if (!vect_is_simple_use (op1, vinfo, &def_stmt, &dt[1], &op1_vectype))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_FAILURE,
                          "use not simple.\n");
       return false;
@@ -5395,7 +5395,7 @@ vectorizable_shift (gimple *stmt, gimple_stmt_iterator *gsi,
     }
   else
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_FAILURE,
                          "operand mode requires invariant argument.\n");
       return false;
@@ -5405,7 +5405,7 @@ vectorizable_shift (gimple *stmt, gimple_stmt_iterator *gsi,
   if (!scalar_shift_arg)
     {
       optab = optab_for_tree_code (code, vectype, optab_vector);
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         dump_printf_loc (MSG_NOTE, vect_location,
                          "vector/vector shift/rotate found.\n");
 
@@ -5414,7 +5414,7 @@ vectorizable_shift (gimple *stmt, gimple_stmt_iterator *gsi,
       if (op1_vectype == NULL_TREE
 	  || TYPE_MODE (op1_vectype) != TYPE_MODE (vectype))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
                              "unusable type for last operand in"
                              " vector/vector shift/rotate.\n");
@@ -5429,7 +5429,7 @@ vectorizable_shift (gimple *stmt, gimple_stmt_iterator *gsi,
       if (optab
           && optab_handler (optab, TYPE_MODE (vectype)) != CODE_FOR_nothing)
         {
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
             dump_printf_loc (MSG_NOTE, vect_location,
                              "vector/scalar shift/rotate found.\n");
         }
@@ -5442,7 +5442,7 @@ vectorizable_shift (gimple *stmt, gimple_stmt_iterator *gsi,
             {
 	      scalar_shift_arg = false;
 
-              if (thing_enabled_p ())
+              if (optinfo_enabled_p ())
                 dump_printf_loc (MSG_NOTE, vect_location,
                                  "vector/vector shift/rotate found.\n");
 
@@ -5459,7 +5459,7 @@ vectorizable_shift (gimple *stmt, gimple_stmt_iterator *gsi,
 		      && TYPE_MODE (TREE_TYPE (vectype))
 			 != TYPE_MODE (TREE_TYPE (op1)))
 		    {
-                      if (thing_enabled_p ())
+                      if (optinfo_enabled_p ())
                         vect_location_writeln (OPT_RECORD_FAILURE,
                                          "unusable type for last operand in"
                                          " vector/vector shift/rotate.\n");
@@ -5479,7 +5479,7 @@ vectorizable_shift (gimple *stmt, gimple_stmt_iterator *gsi,
   /* Supportable by target?  */
   if (!optab)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_FAILURE,
                          "no optab.\n");
       return false;
@@ -5488,7 +5488,7 @@ vectorizable_shift (gimple *stmt, gimple_stmt_iterator *gsi,
   icode = (int) optab_handler (optab, vec_mode);
   if (icode == CODE_FOR_nothing)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_FAILURE,
                          "op not supported by target.\n");
       /* Check only during analysis.  */
@@ -5496,7 +5496,7 @@ vectorizable_shift (gimple *stmt, gimple_stmt_iterator *gsi,
 	  || (!vec_stmt
 	      && !vect_worthwhile_without_simd_p (vinfo, code)))
         return false;
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         dump_printf_loc (MSG_NOTE, vect_location,
                          "proceeding using word mode.\n");
     }
@@ -5506,7 +5506,7 @@ vectorizable_shift (gimple *stmt, gimple_stmt_iterator *gsi,
       && !VECTOR_MODE_P (TYPE_MODE (vectype))
       && !vect_worthwhile_without_simd_p (vinfo, code))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_FAILURE,
                          "not worthwhile without SIMD support.\n");
       return false;
@@ -5515,7 +5515,7 @@ vectorizable_shift (gimple *stmt, gimple_stmt_iterator *gsi,
   if (!vec_stmt) /* transformation not required.  */
     {
       STMT_VINFO_TYPE (stmt_info) = shift_vec_info_type;
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         dump_printf_loc (MSG_NOTE, vect_location,
                          "=== vectorizable_shift ===\n");
       if (!slp_node)
@@ -5525,7 +5525,7 @@ vectorizable_shift (gimple *stmt, gimple_stmt_iterator *gsi,
 
   /* Transform.  */
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     dump_printf_loc (MSG_NOTE, vect_location,
                      "transform binary/unary operation.\n");
 
@@ -5547,7 +5547,7 @@ vectorizable_shift (gimple *stmt, gimple_stmt_iterator *gsi,
               optab_op2_mode = insn_data[icode].operand[2].mode;
               if (!VECTOR_MODE_P (optab_op2_mode))
                 {
-                  if (thing_enabled_p ())
+                  if (optinfo_enabled_p ())
                     dump_printf_loc (MSG_NOTE, vect_location,
                                      "operand 1 using scalar mode.\n");
                   vec_oprnd1 = op1;
@@ -5677,7 +5677,7 @@ vectorizable_operation (gimple *stmt, gimple_stmt_iterator *gsi,
   op_type = TREE_CODE_LENGTH (code);
   if (op_type != unary_op && op_type != binary_op && op_type != ternary_op)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_FAILURE,
                          "num. args = %d (not unary/binary/ternary op).\n",
                          op_type);
@@ -5696,7 +5696,7 @@ vectorizable_operation (gimple *stmt, gimple_stmt_iterator *gsi,
       && code != BIT_XOR_EXPR
       && code != BIT_AND_EXPR)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_FAILURE,
                          "bit-precision arithmetic not supported.\n");
       return false;
@@ -5705,7 +5705,7 @@ vectorizable_operation (gimple *stmt, gimple_stmt_iterator *gsi,
   op0 = gimple_assign_rhs1 (stmt);
   if (!vect_is_simple_use (op0, vinfo, &def_stmt, &dt[0], &vectype))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_FAILURE,
                          "use not simple.\n");
       return false;
@@ -5723,7 +5723,7 @@ vectorizable_operation (gimple *stmt, gimple_stmt_iterator *gsi,
 	{
 	  if (!VECT_SCALAR_BOOLEAN_TYPE_P (TREE_TYPE (scalar_dest)))
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		vect_location_writeln (OPT_RECORD_FAILURE,
 				 "not supported operation on bool value.\n");
 	      return false;
@@ -5737,7 +5737,7 @@ vectorizable_operation (gimple *stmt, gimple_stmt_iterator *gsi,
     gcc_assert (vectype);
   if (!vectype)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         {
           vect_location_writeln (OPT_RECORD_FAILURE,
                            "no vectype for scalar type ");
@@ -5759,7 +5759,7 @@ vectorizable_operation (gimple *stmt, gimple_stmt_iterator *gsi,
       op1 = gimple_assign_rhs2 (stmt);
       if (!vect_is_simple_use (op1, vinfo, &def_stmt, &dt[1]))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
                              "use not simple.\n");
 	  return false;
@@ -5770,7 +5770,7 @@ vectorizable_operation (gimple *stmt, gimple_stmt_iterator *gsi,
       op2 = gimple_assign_rhs3 (stmt);
       if (!vect_is_simple_use (op2, vinfo, &def_stmt, &dt[2]))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
                              "use not simple.\n");
 	  return false;
@@ -5802,7 +5802,7 @@ vectorizable_operation (gimple *stmt, gimple_stmt_iterator *gsi,
       optab = optab_for_tree_code (code, vectype, optab_default);
       if (!optab)
 	{
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
             vect_location_writeln (OPT_RECORD_FAILURE,
                              "no optab.\n");
 	  return false;
@@ -5813,14 +5813,14 @@ vectorizable_operation (gimple *stmt, gimple_stmt_iterator *gsi,
 
   if (!target_support_p)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
                          "op not supported by target.\n");
       /* Check only during analysis.  */
       if (maybe_ne (GET_MODE_SIZE (vec_mode), UNITS_PER_WORD)
 	  || (!vec_stmt && !vect_worthwhile_without_simd_p (vinfo, code)))
         return false;
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	dump_printf_loc (MSG_NOTE, vect_location,
                          "proceeding using word mode.\n");
     }
@@ -5830,7 +5830,7 @@ vectorizable_operation (gimple *stmt, gimple_stmt_iterator *gsi,
       && !vec_stmt
       && !vect_worthwhile_without_simd_p (vinfo, code))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_FAILURE,
                          "not worthwhile without SIMD support.\n");
       return false;
@@ -5839,7 +5839,7 @@ vectorizable_operation (gimple *stmt, gimple_stmt_iterator *gsi,
   if (!vec_stmt) /* transformation not required.  */
     {
       STMT_VINFO_TYPE (stmt_info) = op_vec_info_type;
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         dump_printf_loc (MSG_NOTE, vect_location,
                          "=== vectorizable_operation ===\n");
       if (!slp_node)
@@ -5849,7 +5849,7 @@ vectorizable_operation (gimple *stmt, gimple_stmt_iterator *gsi,
 
   /* Transform.  */
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     dump_printf_loc (MSG_NOTE, vect_location,
                      "transform binary/unary operation.\n");
 
@@ -6029,7 +6029,7 @@ get_group_alias_ptr_type (gimple *first_stmt)
       if (get_alias_set (DR_REF (first_dr))
 	  != get_alias_set (DR_REF (next_dr)))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    dump_printf_loc (MSG_NOTE, vect_location,
 			     "conflicting alias set types.\n");
 	  return ptr_type_node;
@@ -6128,7 +6128,7 @@ vectorizable_store (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
 
       if (slp_node != NULL)
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "SLP of masked stores not supported.\n");
 	  return false;
@@ -6174,7 +6174,7 @@ vectorizable_store (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
   /* FORNOW.  This restriction should be relaxed.  */
   if (loop && nested_in_vect_loop_p (loop, stmt) && ncopies > 1)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "multiple types in nested loop.\n");
       return false;
@@ -6206,7 +6206,7 @@ vectorizable_store (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
       else if (memory_access_type != VMAT_LOAD_STORE_LANES
 	       && (memory_access_type != VMAT_GATHER_SCATTER || gs_info.decl))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "unsupported access type for masked store.\n");
 	  return false;
@@ -6450,7 +6450,7 @@ vectorizable_store (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
   else
     ref_type = reference_alias_ptr_type (DR_REF (first_dr));
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     dump_printf_loc (MSG_NOTE, vect_location,
                      "transform store. ncopies = %d\n", ncopies);
 
@@ -7291,7 +7291,7 @@ vectorizable_load (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
 
       if (slp_node != NULL)
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "SLP of masked loads not supported.\n");
 	  return false;
@@ -7335,7 +7335,7 @@ vectorizable_load (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
   /* FORNOW. This restriction should be relaxed.  */
   if (nested_in_vect_loop && ncopies > 1)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_FAILURE,
                          "multiple types in nested loop.\n");
       return false;
@@ -7348,7 +7348,7 @@ vectorizable_load (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
       && maybe_gt (LOOP_VINFO_VECT_FACTOR (loop_vinfo),
 		   STMT_VINFO_MIN_NEG_DIST (stmt_info)))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "cannot perform implicit CSE when unrolling "
 			 "with negative dependence distance\n");
@@ -7362,7 +7362,7 @@ vectorizable_load (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
     (e.g. - data copies).  */
   if (optab_handler (mov_optab, mode) == CODE_FOR_nothing)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_FAILURE,
                          "Aligned load, but unsupported type.\n");
       return false;
@@ -7389,7 +7389,7 @@ vectorizable_load (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
 	  && maybe_gt (LOOP_VINFO_VECT_FACTOR (loop_vinfo),
 		       STMT_VINFO_MIN_NEG_DIST (stmt_info)))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "cannot perform implicit CSE when performing "
 			     "group loads with negative dependence distance\n");
@@ -7404,7 +7404,7 @@ vectorizable_load (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
 	      != STMT_SLP_TYPE (vinfo_for_stmt
 				 (STMT_VINFO_GROUP_SAME_DR_STMT (stmt_info)))))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "conflicting SLP types for CSEd load\n");
 	  return false;
@@ -7435,7 +7435,7 @@ vectorizable_load (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
 	    = TREE_VALUE (TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (arglist))));
 	  if (TREE_CODE (masktype) == INTEGER_TYPE)
 	    {
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		vect_location_writeln (OPT_RECORD_FAILURE,
 				 "masked gather with integer mask not"
 				 " supported.");
@@ -7445,7 +7445,7 @@ vectorizable_load (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
       else if (memory_access_type != VMAT_LOAD_STORE_LANES
 	       && memory_access_type != VMAT_GATHER_SCATTER)
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "unsupported access type for masked load.\n");
 	  return false;
@@ -7474,7 +7474,7 @@ vectorizable_load (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
     gcc_assert (memory_access_type
 		== STMT_VINFO_MEMORY_ACCESS_TYPE (stmt_info));
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     dump_printf_loc (MSG_NOTE, vect_location,
                      "transform load. ncopies = %d\n", ncopies);
 
@@ -8304,7 +8304,7 @@ vectorizable_load (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
 		      && !nested_in_vect_loop
 		      && hoist_defs_of_uses (stmt, loop))
 		    {
-		      if (thing_enabled_p ())
+		      if (optinfo_enabled_p ())
 			{
 			  dump_printf_loc (MSG_NOTE, vect_location,
 					   "hoisting out of the vectorized "
@@ -8566,7 +8566,7 @@ vectorizable_condition (gimple *stmt, gimple_stmt_iterator *gsi,
       /* FORNOW: not yet supported.  */
       if (STMT_VINFO_LIVE_P (stmt_info))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
 			     "value used after loop.\n");
 	  return false;
@@ -8968,7 +8968,7 @@ vectorizable_comparison (gimple *stmt, gimple_stmt_iterator *gsi,
 
   if (STMT_VINFO_LIVE_P (stmt_info))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "value used after loop.\n");
       return false;
@@ -9225,7 +9225,7 @@ vect_analyze_stmt (gimple *stmt, bool *need_to_vectorize, slp_tree node,
   gimple *pattern_stmt;
   gimple_seq pattern_def_seq;
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     {
       dump_printf_loc (MSG_NOTE, vect_location, "==> examining statement: ");
       dump_gimple_stmt (MSG_NOTE, TDF_SLIM, stmt, 0);
@@ -9233,7 +9233,7 @@ vect_analyze_stmt (gimple *stmt, bool *need_to_vectorize, slp_tree node,
 
   if (gimple_has_volatile_ops (stmt))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_FAILURE,
                          "not vectorized: stmt has volatile operands\n");
 
@@ -9266,7 +9266,7 @@ vect_analyze_stmt (gimple *stmt, bool *need_to_vectorize, slp_tree node,
           /* Analyze PATTERN_STMT instead of the original stmt.  */
           stmt = pattern_stmt;
           stmt_info = vinfo_for_stmt (pattern_stmt);
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
             {
               dump_printf_loc (MSG_NOTE, vect_location,
                                "==> examining pattern statement: ");
@@ -9275,7 +9275,7 @@ vect_analyze_stmt (gimple *stmt, bool *need_to_vectorize, slp_tree node,
         }
       else
         {
-          if (thing_enabled_p ())
+          if (optinfo_enabled_p ())
             dump_printf_loc (MSG_NOTE, vect_location, "irrelevant.\n");
 
           return true;
@@ -9288,7 +9288,7 @@ vect_analyze_stmt (gimple *stmt, bool *need_to_vectorize, slp_tree node,
                || STMT_VINFO_LIVE_P (vinfo_for_stmt (pattern_stmt))))
     {
       /* Analyze PATTERN_STMT too.  */
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         {
           dump_printf_loc (MSG_NOTE, vect_location,
                            "==> examining pattern statement: ");
@@ -9313,7 +9313,7 @@ vect_analyze_stmt (gimple *stmt, bool *need_to_vectorize, slp_tree node,
 	      || STMT_VINFO_LIVE_P (vinfo_for_stmt (pattern_def_stmt)))
 	    {
 	      /* Analyze def stmt of STMT if it's a pattern stmt.  */
-	      if (thing_enabled_p ())
+	      if (optinfo_enabled_p ())
 		{
 		  dump_printf_loc (MSG_NOTE, vect_location,
                                    "==> examining pattern def statement: ");
@@ -9402,7 +9402,7 @@ vect_analyze_stmt (gimple *stmt, bool *need_to_vectorize, slp_tree node,
 
   if (!ok)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         {
           vect_location_writeln (OPT_RECORD_FAILURE,
                            "not vectorized: relevant stmt not ");
@@ -9421,7 +9421,7 @@ vect_analyze_stmt (gimple *stmt, bool *need_to_vectorize, slp_tree node,
   if (STMT_VINFO_TYPE (stmt_info) != reduc_vec_info_type
       && !can_vectorize_live_stmts (stmt, NULL, node, NULL))
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         {
           vect_location_writeln (OPT_RECORD_FAILURE,
                            "not vectorized: live stmt not supported: ");
@@ -9540,7 +9540,7 @@ vect_transform_stmt (gimple *stmt, gimple_stmt_iterator *gsi,
     default:
       if (!STMT_VINFO_LIVE_P (stmt_info))
 	{
-	  if (thing_enabled_p ())
+	  if (optinfo_enabled_p ())
 	    vect_location_writeln (OPT_RECORD_FAILURE,
                              "stmt not supported.\n");
 	  gcc_unreachable ();
@@ -9569,7 +9569,7 @@ vect_transform_stmt (gimple *stmt, gimple_stmt_iterator *gsi,
       tree scalar_dest;
       gimple *exit_phi;
 
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         dump_printf_loc (MSG_NOTE, vect_location,
                          "Record the vdef for outer-loop vectorization.\n");
 
@@ -9907,7 +9907,7 @@ vect_is_simple_use (tree operand, vec_info *vinfo,
   *def_stmt = NULL;
   *dt = vect_unknown_def_type;
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     {
       dump_printf_loc (MSG_NOTE, vect_location,
                        "vect_is_simple_use: operand ");
@@ -9929,7 +9929,7 @@ vect_is_simple_use (tree operand, vec_info *vinfo,
 
   if (TREE_CODE (operand) != SSA_NAME)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
 	vect_location_writeln (OPT_RECORD_FAILURE,
 			 "not ssa-name.\n");
       return false;
@@ -9942,7 +9942,7 @@ vect_is_simple_use (tree operand, vec_info *vinfo,
     }
 
   *def_stmt = SSA_NAME_DEF_STMT (operand);
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     {
       dump_printf_loc (MSG_NOTE, vect_location, "def_stmt: ");
       dump_gimple_stmt (MSG_NOTE, TDF_SLIM, *def_stmt, 0);
@@ -9956,7 +9956,7 @@ vect_is_simple_use (tree operand, vec_info *vinfo,
       *dt = STMT_VINFO_DEF_TYPE (stmt_vinfo);
     }
 
-  if (thing_enabled_p ())
+  if (optinfo_enabled_p ())
     {
       dump_printf_loc (MSG_NOTE, vect_location, "type of def: ");
       switch (*dt)
@@ -9993,7 +9993,7 @@ vect_is_simple_use (tree operand, vec_info *vinfo,
 
   if (*dt == vect_unknown_def_type)
     {
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_FAILURE,
                          "Unsupported pattern.\n");
       return false;
@@ -10006,7 +10006,7 @@ vect_is_simple_use (tree operand, vec_info *vinfo,
     case GIMPLE_CALL:
       break;
     default:
-      if (thing_enabled_p ())
+      if (optinfo_enabled_p ())
         vect_location_writeln (OPT_RECORD_FAILURE,
                          "unsupported defining stmt:\n");
       return false;
-- 
1.8.5.3

