From 729f30e1b001a8435a2592cfe5aa90a632dc1583 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Wed, 23 May 2018 13:01:35 -0400 Subject: [PATCH 14/24] Experiment with optinfo in tree-ssa-loop-im.c --- gcc/tree-ssa-loop-im.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c index 030aac0..fcf5d24 100644 --- a/gcc/tree-ssa-loop-im.c +++ b/gcc/tree-ssa-loop-im.c @@ -45,6 +45,7 @@ along with GCC; see the file COPYING3. If not see #include "gimple-fold.h" #include "tree-scalar-evolution.h" #include "tree-ssa-loop-niter.h" +#include "optinfo.h" /* TODO: Support for predicated code motion. I.e. @@ -1125,6 +1126,12 @@ move_computations_worker (basic_block bb) fprintf (dump_file, "(cost %u) out of loop %d.\n\n", cost, level->num); } + /* FIXME. */ + if (optinfo_enabled_p ()) + OPTINFO_SUCCESS (stmt) + << "moving PHI node " + << stmt + << optinfo_printf (" (cost %u) out of loop %d", cost, level->num); if (gimple_phi_num_args (stmt) == 1) { @@ -1194,6 +1201,12 @@ move_computations_worker (basic_block bb) fprintf (dump_file, "(cost %u) out of loop %d.\n\n", cost, level->num); } + /* FIXME. */ + if (optinfo_enabled_p ()) + OPTINFO_SUCCESS (stmt) + << "moving statement " + << stmt + << optinfo_printf (" (cost %u) out of loop %d", cost, level->num); e = loop_preheader_edge (level); gcc_assert (!gimple_vdef (stmt)); -- 1.8.5.3