diff options
author | Richard Biener <rguenther@suse.de> | 2015-02-09 11:51:05 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2015-02-09 11:51:05 +0000 |
commit | 28002f1ad17bb0c19c5371ecf2de364303eff0d3 (patch) | |
tree | f193ea4343a7a901db1e91508978c01605179767 /gcc/tree-ssa-loop-ivopts.c | |
parent | a8adc78f494c920da7786b4639f827d2422d3215 (diff) | |
download | gcc-28002f1ad17bb0c19c5371ecf2de364303eff0d3.zip gcc-28002f1ad17bb0c19c5371ecf2de364303eff0d3.tar.gz gcc-28002f1ad17bb0c19c5371ecf2de364303eff0d3.tar.bz2 |
re PR tree-optimization/54000 (Performance breakdown for gcc-4.{6,7} vs. gcc-4.5 using std::vector in matrix vector multiplication (IVopts / inliner))
2015-02-09 Richard Biener <rguenther@suse.de>
PR tree-optimization/54000
* tree-ssa-looo-ivopts.c: Include tree-vectorizer.h.
(struct ivopts_data): Add loop_loc member.
(tree_ssa_iv_optimize_loop): Dump loop location.
(create_new_ivs): Likewise, also dump number of IVs generated.
* g++.dg/tree-ssa/ivopts-3.C: New testcase.
From-SVN: r220536
Diffstat (limited to 'gcc/tree-ssa-loop-ivopts.c')
-rw-r--r-- | gcc/tree-ssa-loop-ivopts.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index a701636..438ff96 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -138,6 +138,7 @@ along with GCC; see the file COPYING3. If not see #include "tree-ssa-propagate.h" #include "tree-ssa-address.h" #include "builtins.h" +#include "tree-vectorizer.h" /* FIXME: Expressions are expanded to RTL in this pass to determine the cost of different addressing modes. This should be moved to a TBD @@ -318,6 +319,7 @@ struct ivopts_data { /* The currently optimized loop. */ struct loop *current_loop; + source_location loop_loc; /* Numbers of iterations for all exits of the current loop. */ hash_map<edge, tree_niter_desc *> *niters; @@ -6340,7 +6342,12 @@ create_new_ivs (struct ivopts_data *data, struct iv_ca *set) if (dump_file && (dump_flags & TDF_DETAILS)) { - fprintf (dump_file, "\nSelected IV set: \n"); + fprintf (dump_file, "Selected IV set for loop %d", + data->current_loop->num); + if (data->loop_loc != UNKNOWN_LOCATION) + fprintf (dump_file, " at %s:%d", LOCATION_FILE (data->loop_loc), + LOCATION_LINE (data->loop_loc)); + fprintf (dump_file, ", %lu IVs:\n", bitmap_count_bits (set->cands)); EXECUTE_IF_SET_IN_BITMAP (set->cands, 0, i, bi) { cand = iv_cand (data, i); @@ -6943,11 +6950,16 @@ tree_ssa_iv_optimize_loop (struct ivopts_data *data, struct loop *loop) gcc_assert (!data->niters); data->current_loop = loop; + data->loop_loc = find_loop_location (loop); data->speed = optimize_loop_for_speed_p (loop); if (dump_file && (dump_flags & TDF_DETAILS)) { - fprintf (dump_file, "Processing loop %d\n", loop->num); + fprintf (dump_file, "Processing loop %d", loop->num); + if (data->loop_loc != UNKNOWN_LOCATION) + fprintf (dump_file, " at %s:%d", LOCATION_FILE (data->loop_loc), + LOCATION_LINE (data->loop_loc)); + fprintf (dump_file, "\n"); if (exit) { |