From: David Malcolm <dmalcolm@redhat.com>
To: Christophe Lyon <christophe.lyon@linaro.org>,
Richard Biener <richard.guenther@gmail.com>
Cc: gcc Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] -fopt-info: add indentation via DUMP_VECT_SCOPE
Date: Mon, 02 Jul 2018 17:00:00 -0000 [thread overview]
Message-ID: <1530550809.3068.16.camel@redhat.com> (raw)
In-Reply-To: <CAKdteOb_e4dR0z+o1131jHy7eHNmBkkGdYc5+jqz3-P7cogErw@mail.gmail.com>
On Mon, 2018-07-02 at 14:23 +0200, Christophe Lyon wrote:
> On Fri, 29 Jun 2018 at 10:09, Richard Biener <richard.guenther@gmail.
> com> wrote:
> >
> > On Tue, Jun 26, 2018 at 5:43 PM David Malcolm <dmalcolm@redhat.com>
> > wrote:
> > >
> > > This patch adds a concept of nested "scopes" to dumpfile.c's
> > > dump_*_loc
> > > calls, and wires it up to the DUMP_VECT_SCOPE macro in tree-
> > > vectorizer.h,
> > > so that the nested structure is shown in -fopt-info by
> > > indentation.
> > >
> > > For example, this converts -fopt-info-all e.g. from:
> > >
> > > test.c:8:3: note: === analyzing loop ===
> > > test.c:8:3: note: === analyze_loop_nest ===
> > > test.c:8:3: note: === vect_analyze_loop_form ===
> > > test.c:8:3: note: === get_loop_niters ===
> > > test.c:8:3: note: symbolic number of iterations is (unsigned int)
> > > n_9(D)
> > > test.c:8:3: note: not vectorized: loop contains function calls or
> > > data references that cannot be analyzed
> > > test.c:8:3: note: vectorized 0 loops in function
> > >
> > > to:
> > >
> > > test.c:8:3: note: === analyzing loop ===
> > > test.c:8:3: note: === analyze_loop_nest ===
> > > test.c:8:3: note: === vect_analyze_loop_form ===
> > > test.c:8:3: note: === get_loop_niters ===
> > > test.c:8:3: note: symbolic number of iterations is (unsigned
> > > int) n_9(D)
> > > test.c:8:3: note: not vectorized: loop contains function calls
> > > or data references that cannot be analyzed
> > > test.c:8:3: note: vectorized 0 loops in function
> > >
> > > showing that the "symbolic number of iterations" message is
> > > within
> > > the "=== analyze_loop_nest ===" (and not within the
> > > "=== vect_analyze_loop_form ===").
> > >
> > > This is also enabling work for followups involving optimization
> > > records
> > > (allowing the records to directly capture the nested structure of
> > > the
> > > dump messages).
> > >
> > > Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
> > >
> > > OK for trunk?
>
> Hi,
>
> I've noticed that this patch (r262246) caused regressions on aarch64:
> gcc.dg/vect/slp-perm-1.c -flto -ffat-lto-objects scan-tree-dump
> vect "note: Built SLP cancelled: can use load/store-lanes"
> gcc.dg/vect/slp-perm-1.c scan-tree-dump vect "note: Built SLP
> cancelled: can use load/store-lanes"
> gcc.dg/vect/slp-perm-2.c -flto -ffat-lto-objects scan-tree-dump
> vect "note: Built SLP cancelled: can use load/store-lanes"
> gcc.dg/vect/slp-perm-2.c scan-tree-dump vect "note: Built SLP
> cancelled: can use load/store-lanes"
> gcc.dg/vect/slp-perm-3.c -flto -ffat-lto-objects scan-tree-dump
> vect "note: Built SLP cancelled: can use load/store-lanes"
> gcc.dg/vect/slp-perm-3.c scan-tree-dump vect "note: Built SLP
> cancelled: can use load/store-lanes"
> gcc.dg/vect/slp-perm-5.c -flto -ffat-lto-objects scan-tree-dump
> vect "note: Built SLP cancelled: can use load/store-lanes"
> gcc.dg/vect/slp-perm-5.c scan-tree-dump vect "note: Built SLP
> cancelled: can use load/store-lanes"
> gcc.dg/vect/slp-perm-6.c -flto -ffat-lto-objects scan-tree-dump
> vect "note: Built SLP cancelled: can use load/store-lanes"
> gcc.dg/vect/slp-perm-6.c scan-tree-dump vect "note: Built SLP
> cancelled: can use load/store-lanes"
> gcc.dg/vect/slp-perm-7.c -flto -ffat-lto-objects scan-tree-dump
> vect "note: Built SLP cancelled: can use load/store-lanes"
> gcc.dg/vect/slp-perm-7.c scan-tree-dump vect "note: Built SLP
> cancelled: can use load/store-lanes"
> gcc.dg/vect/slp-perm-8.c -flto -ffat-lto-objects scan-tree-dump
> vect "note: Built SLP cancelled: can use load/store-lanes"
> gcc.dg/vect/slp-perm-8.c scan-tree-dump vect "note: Built SLP
> cancelled: can use load/store-lanes"
>
> The problem is that now there are more spaces between "note:" and
> "Built", the attached small patch does that for slp-perm-1.c.
Sorry about the breakage.
> Is it the right way of fixing it or do we want to accept any amount
> of
> spaces for instance?
I don't think we want to hardcode the amount of space in the dumpfile.
The idea of my patch was to make the dump more human-readable (I hope)
by visualizing the nesting structure of the dump messages, but I think
we shouldn't "bake" that into the expected strings, as someone might
want to add an intermediate nesting level.
Do we really need to look for the "note:" in the scan-tree-dump?
Should that directive be rewritten to:
-/* { dg-final { scan-tree-dump "note: Built SLP cancelled: can use load/store-lanes" "vect" { target { vect_perm3_int && vect_load_lanes } } } } */
+/* { dg-final { scan-tree-dump "Built SLP cancelled: can use load/store-lanes" "vect" { target { vect_perm3_int && vect_load_lanes } } } } */
which I believe would match any amount of spaces.
Alternatively a regex accepting any amount of space ought to work, if
we care that the message begins with "note: ".
The "note: " comes from dumpfile.c's dump_loc, and is emitted
regardless of whether it's a MSG_NOTE vs a MSG_MISSED_OPTIMIZATION or
whatever. Given that, maybe we should just drop the "note: " prefix
from these scan-tree-dump expected regexes? (assuming that works)
> I'm surprised there is such little impact on the testsuite though.
I see lots of scan-tree-dump* directives in the vect part of the
testsuite, but it seems that only these ones use the "note: " prefix; I
think everything else was matching against the message whilst ignoring
the prefix, so it didn't matter when the prefix changed
(I double-checked and these scan-tree-dump directives didn't trigger on
my x86_64 testing of the patch, due to { target { vect_perm3_int &&
vect_load_lanes } }, where I see
check_effective_target_vect_load_lanes: returning 0 in the log)
> If OK, I'll update the patch to take the other slp-perm-[235678].c
> tests into account.
>
> Thanks,
>
> Christophe
Sorry again about the breakage.
Dave
next prev parent reply other threads:[~2018-07-02 17:00 UTC|newest]
Thread overview: 80+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-29 20:32 [PATCH 00/10] RFC: Prototype of compiler-assisted performance analysis David Malcolm
2018-05-29 20:32 ` [PATCH 06/10] Experiments with using optinfo for inlining David Malcolm
2018-05-29 20:32 ` [PATCH 04/10] Use indentation to show nesting for -fopt-info David Malcolm
2018-05-29 20:32 ` [PATCH 08/10] Experiment with using optinfo for devirtualization David Malcolm
2018-05-29 20:32 ` [PATCH 02/10] Add JSON implementation David Malcolm
2018-05-30 17:31 ` Eric Gallager
2018-05-30 17:32 ` David Malcolm
2018-05-30 21:23 ` Eric Gallager
2018-05-29 20:32 ` [PATCH 05/10] Experiment with using optinfo for vectorization David Malcolm
2018-05-29 20:32 ` [PATCH 10/10] Experiment with optinfo in tree-ssa-loop-im.c David Malcolm
2018-05-29 20:32 ` [PATCH 07/10] Experiment with using optinfo for loop-handling David Malcolm
2018-05-29 20:32 ` [PATCH 03/10] Add optinfo, remarks and optimization records David Malcolm
2018-05-29 20:32 ` [PATCH 09/10] Experiment with using optinfo in gimple-loop-interchange.cc David Malcolm
2018-06-01 9:51 ` Richard Biener
2018-06-01 13:40 ` David Malcolm
2018-06-01 15:32 ` Richard Biener
2018-06-01 22:22 ` David Malcolm
2018-06-04 13:20 ` Richard Biener
2018-06-14 19:50 ` [PATCH 0/8] v2 of optimization records patch kit David Malcolm
2018-06-14 19:50 ` [PATCH 5/8] gimple-loop-interchange.cc: use the dump API in a few places David Malcolm
2018-06-14 19:50 ` [PATCH 1/8] Add GCC_LIKELY and GCC_UNLIKELY David Malcolm
2018-06-15 6:10 ` Alexander Monakov
2018-06-15 16:31 ` Jeff Law
2018-06-15 16:35 ` Jakub Jelinek
2018-06-15 16:36 ` Jeff Law
2018-06-15 20:04 ` David Malcolm
2018-06-14 19:50 ` [PATCH 2/8] Introduce VECT_SCOPE macro David Malcolm
2018-06-15 20:11 ` Jeff Law
2018-06-18 9:26 ` Richard Biener
2018-06-18 19:07 ` David Malcolm
2018-06-14 19:50 ` [PATCH 3/8] v2 of optinfo, remarks and optimization records David Malcolm
2018-06-14 19:50 ` [PATCH 4/8] tree-vect-loop.c: use MSG_OPTIMIZED_LOCATIONS in a few places David Malcolm
2018-06-14 19:50 ` [PATCH 6/8] ipa-inline.c/tree-inline.c: port from fprintf to dump API David Malcolm
2018-06-14 19:50 ` [PATCH 8/8] Add lots of pointless churn to tree-vect-*.c David Malcolm
2018-06-14 19:50 ` [PATCH 7/8] tree-ssa-loop-im.c port from fprintf to the dump API David Malcolm
2018-06-20 16:35 ` [PATCH] v3 of optinfo, remarks and optimization records David Malcolm
2018-06-25 13:35 ` Richard Biener
2018-06-26 13:54 ` [committed] Introduce dump_location_t David Malcolm
2018-06-28 11:29 ` Richard Biener
2018-06-28 14:29 ` David Malcolm
2018-06-29 7:14 ` Richard Biener
2018-07-02 20:51 ` [PATCH 0/2] v4: optinfo framework and remarks David Malcolm
2018-07-02 20:51 ` [PATCH 2/2] optinfo: add diagnostic remarks David Malcolm
2018-07-09 13:05 ` Richard Biener
2018-07-11 10:53 ` [PATCH 1/2] v5: Add "optinfo" framework David Malcolm
2018-07-11 10:53 ` [PATCH 2/2] Add "-fsave-optimization-record" David Malcolm
2018-07-19 12:39 ` Richard Biener
2018-07-20 15:45 ` David Malcolm
2018-07-18 20:20 ` [PING] Re: [PATCH 1/2] v5: Add "optinfo" framework David Malcolm
2018-07-19 12:18 ` Richard Biener
2018-07-02 20:51 ` [PATCH 1/2] " David Malcolm
2018-07-09 13:01 ` Richard Biener
2018-07-10 11:01 ` David Malcolm
2018-07-10 11:25 ` Richard Biener
2018-06-26 15:43 ` [PATCH] -fopt-info: add indentation via DUMP_VECT_SCOPE David Malcolm
2018-06-29 8:13 ` Richard Biener
2018-07-02 12:25 ` Christophe Lyon
2018-07-02 17:00 ` David Malcolm [this message]
2018-07-02 17:09 ` Christophe Lyon
2018-07-03 7:37 ` Richard Biener
2018-07-03 13:52 ` David Malcolm
2018-07-03 13:53 ` Richard Biener
2018-07-03 14:10 ` [PATCH] Remove "note: " prefix from some scan-tree-dump directives David Malcolm
2018-07-03 14:11 ` Richard Biener
2018-07-09 9:03 ` Christophe Lyon
2018-07-05 8:42 ` [PATCH] -fopt-info: add indentation via DUMP_VECT_SCOPE Christophe Lyon
2018-07-05 9:03 ` Richard Biener
2018-06-26 20:27 ` [PATCH] Hide alt_dump_file within dumpfile.c David Malcolm
2018-06-28 9:50 ` Richard Biener
2018-05-29 20:35 ` [PATCH 01/10] Convert dump and optgroup flags to enums David Malcolm
2018-06-01 10:00 ` Richard Biener
2018-06-05 8:44 ` Trevor Saunders
2018-06-05 14:49 ` Sharing gdb's enum-flags.h with gcc? (was Re: [PATCH 01/10] Convert dump and optgroup flags to enums) David Malcolm
2018-06-05 16:13 ` Pedro Alves
2018-06-05 17:13 ` [PATCH (for gdb)] enum-flags.h: Add trailing semicolon to example in comment David Malcolm
2018-06-05 17:32 ` Pedro Alves
2018-06-06 12:54 ` David Malcolm
2018-06-06 0:48 ` Eric Gallager
2018-06-05 16:17 ` Sharing gdb's enum-flags.h with gcc? (was Re: [PATCH 01/10] Convert dump and optgroup flags to enums) Richard Biener
2018-06-08 12:59 ` [committed] v2: Convert dump and optgroup flags to enums David Malcolm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1530550809.3068.16.camel@redhat.com \
--to=dmalcolm@redhat.com \
--cc=christophe.lyon@linaro.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=richard.guenther@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).