public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-184] RISC-V: Add function comment for cleanup_insns.
@ 2023-04-24  6:20 Kito Cheng
  0 siblings, 0 replies; only message in thread
From: Kito Cheng @ 2023-04-24  6:20 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:c5a1fa59ae3f44059a79086cbc506800d4149b69

commit r14-184-gc5a1fa59ae3f44059a79086cbc506800d4149b69
Author: Juzhe-Zhong <juzhe.zhong@rivai.ai>
Date:   Sun Apr 23 19:33:54 2023 +0800

    RISC-V: Add function comment for cleanup_insns.
    
    Add more comment for cleanup_insns.
    
    gcc/ChangeLog:
    
            * config/riscv/riscv-vsetvl.cc (pass_vsetvl::pre_vsetvl): Add function
            comment for cleanup_insns.

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

diff --git a/gcc/config/riscv/riscv-vsetvl.cc b/gcc/config/riscv/riscv-vsetvl.cc
index ac99028df43..fa68b8a0462 100644
--- a/gcc/config/riscv/riscv-vsetvl.cc
+++ b/gcc/config/riscv/riscv-vsetvl.cc
@@ -3998,6 +3998,21 @@ pass_vsetvl::pre_vsetvl (void)
     commit_edge_insertions ();
 }
 
+/* Before VSETVL PASS, RVV instructions pattern is depending on AVL operand
+   implicitly. Since we will emit VSETVL instruction and make RVV instructions
+   depending on VL/VTYPE global status registers, we remove the such AVL operand
+   in the RVV instructions pattern here in order to remove AVL dependencies when
+   AVL operand is a register operand.
+
+   Before the VSETVL PASS:
+     li a5,32
+     ...
+     vadd.vv (..., a5)
+   After the VSETVL PASS:
+     li a5,32
+     vsetvli zero, a5, ...
+     ...
+     vadd.vv (..., const_int 0).  */
 void
 pass_vsetvl::cleanup_insns (void) const
 {

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

only message in thread, other threads:[~2023-04-24  6:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-24  6:20 [gcc r14-184] RISC-V: Add function comment for cleanup_insns Kito Cheng

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