public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-4910] RISC-V: Return const ref. for vl_vtype_info::get_avl_info
@ 2022-12-28  1:36 Kito Cheng
  0 siblings, 0 replies; only message in thread
From: Kito Cheng @ 2022-12-28  1:36 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:31ec203247413f150d5244198efd586fc6d2ef5e

commit r13-4910-g31ec203247413f150d5244198efd586fc6d2ef5e
Author: Kito Cheng <kito.cheng@sifive.com>
Date:   Tue Dec 27 23:18:26 2022 +0800

    RISC-V: Return const ref. for vl_vtype_info::get_avl_info
    
    Return const reference could prevent unnecessary copying.
    
    gcc/
    
            * config/riscv/riscv-vsetvl.h (vl_vtype_info::get_avl_info):
            Return const reference rather than value.

Diff:
---
 gcc/config/riscv/riscv-vsetvl.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/riscv/riscv-vsetvl.h b/gcc/config/riscv/riscv-vsetvl.h
index 6f27004fab1..a5d3f256412 100644
--- a/gcc/config/riscv/riscv-vsetvl.h
+++ b/gcc/config/riscv/riscv-vsetvl.h
@@ -173,7 +173,7 @@ public:
   bool has_non_zero_avl () const;
 
   rtx get_avl () const { return m_avl.get_value (); }
-  avl_info get_avl_info () const { return m_avl; }
+  const avl_info &get_avl_info () const { return m_avl; }
   void set_avl_info (const avl_info &avl) { m_avl = avl; }
   uint8_t get_sew () const { return m_sew; }
   riscv_vector::vlmul_type get_vlmul () const { return m_vlmul; }

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

only message in thread, other threads:[~2022-12-28  1:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-28  1:36 [gcc r13-4910] RISC-V: Return const ref. for vl_vtype_info::get_avl_info 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).