aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKito Cheng <kito.cheng@sifive.com>2022-12-27 23:18:26 +0800
committerKito Cheng <kito.cheng@sifive.com>2022-12-28 09:35:28 +0800
commit31ec203247413f150d5244198efd586fc6d2ef5e (patch)
treeb8063376f7903f232e7b8406d729da58bbcb38ec
parent7b885ecc05fef0e7437ace59254336f8e8d9ebe6 (diff)
downloadgcc-31ec203247413f150d5244198efd586fc6d2ef5e.zip
gcc-31ec203247413f150d5244198efd586fc6d2ef5e.tar.gz
gcc-31ec203247413f150d5244198efd586fc6d2ef5e.tar.bz2
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.
-rw-r--r--gcc/config/riscv/riscv-vsetvl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/riscv/riscv-vsetvl.h b/gcc/config/riscv/riscv-vsetvl.h
index 6f27004..a5d3f25 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; }