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. --- 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; } -- 2.37.2