public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/113495] RISC-V: Time and memory awful consumption of SPEC2017 wrf benchmark
Date: Wed, 31 Jan 2024 00:29:50 +0000	[thread overview]
Message-ID: <bug-113495-4-xW6k4PDCCN@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113495-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113495

--- Comment #33 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Pan Li <panli@gcc.gnu.org>:

https://gcc.gnu.org/g:9dd10de15b183f7b662905e1383fdc3a08755f2e

commit r14-8639-g9dd10de15b183f7b662905e1383fdc3a08755f2e
Author: Juzhe-Zhong <juzhe.zhong@rivai.ai>
Date:   Mon Jan 29 19:32:02 2024 +0800

    RISC-V: Fix VSETLV PASS compile-time issue

    The compile time issue was discovered in SPEC 2017 wrf:

    Use time and -ftime-report to analyze the profile data of SPEC 2017 wrf
compilation .

    Before this patch (Lazy vsetvl):

    scheduling                         : 121.89 ( 15%)   0.53 ( 11%) 122.72 (
15%)    13M (  1%)
    machine dep reorg                  : 424.61 ( 53%)   1.84 ( 37%) 427.44 (
53%)  5290k (  0%)
    real    13m27.074s
    user    13m19.539s
    sys     0m5.180s

    Simple vsetvl:

    machine dep reorg                  :   0.10 (  0%)   0.00 (  0%)   0.11 ( 
0%)  4138k (  0%)
    real    6m5.780s
    user    6m2.396s
    sys     0m2.373s

    The machine dep reorg is the compile time of VSETVL PASS (424 seconds)
which counts 53% of
    the compilation time, spends much more time than scheduling.

    After investigation, the critical patch of VSETVL pass is
compute_lcm_local_properties which
    is called every iteration of phase 2 (earliest fusion) and phase 3 (global
lcm).

    This patch optimized the codes of compute_lcm_local_properties to reduce
the compilation time.

    After this patch:

    scheduling                         : 117.51 ( 27%)   0.21 (  6%) 118.04 (
27%)    13M (  1%)
    machine dep reorg                  :  80.13 ( 18%)   0.91 ( 26%)  81.26 (
18%)  5290k (  0%)
    real    7m25.374s
    user    7m20.116s
    sys     0m3.795s

    The optimization of this patch is very obvious, lazy VSETVL PASS: 424s
(53%) -> 80s (18%) which
    spend less time than scheduling.

    Tested on both RV32 and RV64 no regression.  Ok for trunk ?

            PR target/113495

    gcc/ChangeLog:

            * config/riscv/riscv-vsetvl.cc (extract_single_source): Remove.
            (pre_vsetvl::compute_vsetvl_def_data): Fix compile time issue.
            (pre_vsetvl::compute_transparent): New function.
            (pre_vsetvl::compute_lcm_local_properties): Fix compile time time
issue.

  parent reply	other threads:[~2024-01-31  0:29 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-19  1:22 [Bug c/113495] New: " juzhe.zhong at rivai dot ai
2024-01-19  1:36 ` [Bug tree-optimization/113495] " juzhe.zhong at rivai dot ai
2024-01-19  1:38 ` juzhe.zhong at rivai dot ai
2024-01-19  1:48 ` juzhe.zhong at rivai dot ai
2024-01-19  1:52 ` juzhe.zhong at rivai dot ai
2024-01-19  1:55 ` [Bug rtl-optimization/113495] " pinskia at gcc dot gnu.org
2024-01-19  1:56 ` juzhe.zhong at rivai dot ai
2024-01-19  3:08 ` patrick at rivosinc dot com
2024-01-19  3:12 ` pinskia at gcc dot gnu.org
2024-01-19  3:14 ` pinskia at gcc dot gnu.org
2024-01-19  3:33 ` juzhe.zhong at rivai dot ai
2024-01-19  3:34 ` juzhe.zhong at rivai dot ai
2024-01-19  3:44 ` juzhe.zhong at rivai dot ai
2024-01-19  3:46 ` juzhe.zhong at rivai dot ai
2024-01-19  3:52 ` juzhe.zhong at rivai dot ai
2024-01-19  3:56 ` pinskia at gcc dot gnu.org
2024-01-19  3:58 ` juzhe.zhong at rivai dot ai
2024-01-19  4:00 ` juzhe.zhong at rivai dot ai
2024-01-19  8:23 ` juzhe.zhong at rivai dot ai
2024-01-19  8:41 ` juzhe.zhong at rivai dot ai
2024-01-19  9:23 ` rguenth at gcc dot gnu.org
2024-01-19  9:24 ` rguenth at gcc dot gnu.org
2024-01-19  9:28 ` juzhe.zhong at rivai dot ai
2024-01-19  9:35 ` kito at gcc dot gnu.org
2024-01-19 10:03 ` cvs-commit at gcc dot gnu.org
2024-01-19 10:05 ` juzhe.zhong at rivai dot ai
2024-01-19 10:22 ` rguenther at suse dot de
2024-01-22 11:42 ` rdapp at gcc dot gnu.org
2024-01-22 11:51 ` juzhe.zhong at rivai dot ai
2024-01-22 12:00 ` rguenth at gcc dot gnu.org
2024-01-22 13:21 ` juzhe.zhong at rivai dot ai
2024-01-22 15:04 ` juzhe.zhong at rivai dot ai
2024-01-24  0:30 ` cvs-commit at gcc dot gnu.org
2024-01-31  0:29 ` cvs-commit at gcc dot gnu.org [this message]
2024-01-31  1:25 ` juzhe.zhong at rivai dot ai

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=bug-113495-4-xW6k4PDCCN@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).