public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] RISC-V: Fix dump FILE of VSETVL PASS[PR111311]
@ 2023-09-11 13:39 Jeff Law
  0 siblings, 0 replies; only message in thread
From: Jeff Law @ 2023-09-11 13:39 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:63b71f2cc603076d04440a33af24a02a6e28b7d0

commit 63b71f2cc603076d04440a33af24a02a6e28b7d0
Author: Juzhe-Zhong <juzhe.zhong@rivai.ai>
Date:   Sun Sep 10 07:57:44 2023 +0800

    RISC-V: Fix dump FILE of VSETVL PASS[PR111311]
    
    To make the dump FILE not too big, add TDF_DETAILS.
    
    This patch fix these following FAILs in
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111311
    
    FAIL: gcc.c-torture/unsorted/dump-noaddr.c.*r.vsetvl,  -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions  comparison
    FAIL: gcc.c-torture/unsorted/dump-noaddr.c.*r.vsetvl,  -O3 -g  comparison
    
    gcc/ChangeLog:
    
            PR target/111311
            * config/riscv/riscv-vsetvl.cc (pass_vsetvl::vsetvl_fusion): Add TDF_DETAILS.
            (pass_vsetvl::pre_vsetvl): Ditto.
            (pass_vsetvl::init): Ditto.
            (pass_vsetvl::lazy_vsetvl): Ditto.
    
    (cherry picked from commit 0d50facd937bda26e3083046dc5dec8fca47e1e6)

Diff:
---
 gcc/config/riscv/riscv-vsetvl.cc | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/gcc/config/riscv/riscv-vsetvl.cc b/gcc/config/riscv/riscv-vsetvl.cc
index ae362a3f6a8c..134b97737ae5 100644
--- a/gcc/config/riscv/riscv-vsetvl.cc
+++ b/gcc/config/riscv/riscv-vsetvl.cc
@@ -3438,7 +3438,7 @@ pass_vsetvl::vsetvl_fusion (void)
 			m_vector_manager->vector_kill,
 			m_vector_manager->vector_earliest);
       changed_p |= earliest_fusion ();
-      if (dump_file)
+      if (dump_file && (dump_flags & TDF_DETAILS))
 	{
 	  fprintf (dump_file, "\nEARLIEST fusion %d\n", fusion_no);
 	  m_vector_manager->dump (dump_file);
@@ -3720,7 +3720,7 @@ pass_vsetvl::pre_vsetvl (void)
 
   /* We should dump the information before CFG is changed. Otherwise it will
      produce ICE (internal compiler error).  */
-  if (dump_file)
+  if (dump_file && (dump_flags & TDF_DETAILS))
     m_vector_manager->dump (dump_file);
 
   refine_vsetvls ();
@@ -4250,7 +4250,7 @@ pass_vsetvl::init (void)
   m_vector_manager = new vector_infos_manager ();
   compute_probabilities ();
 
-  if (dump_file)
+  if (dump_file && (dump_flags & TDF_DETAILS))
     {
       fprintf (dump_file, "\nPrologue: Initialize vector infos\n");
       m_vector_manager->dump (dump_file);
@@ -4334,7 +4334,7 @@ pass_vsetvl::lazy_vsetvl (void)
     fprintf (dump_file, "\nPhase 1: Compute local backward vector infos\n");
   for (const bb_info *bb : crtl->ssa->bbs ())
     compute_local_backward_infos (bb);
-  if (dump_file)
+  if (dump_file && (dump_flags & TDF_DETAILS))
     m_vector_manager->dump (dump_file);
 
   /* Phase 2 - Emit vsetvl instructions within each basic block according to
@@ -4344,7 +4344,7 @@ pass_vsetvl::lazy_vsetvl (void)
 	     "\nPhase 2: Emit vsetvl instruction within each block\n");
   for (const bb_info *bb : crtl->ssa->bbs ())
     emit_local_forward_vsetvls (bb);
-  if (dump_file)
+  if (dump_file && (dump_flags & TDF_DETAILS))
     m_vector_manager->dump (dump_file);
 
   /* Phase 3 - Propagate demanded info across blocks.  */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-09-11 13:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-11 13:39 [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] RISC-V: Fix dump FILE of VSETVL PASS[PR111311] Jeff Law

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).