RISC-V: Add :: for static function calling to avoid confusing
Commit Message
From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
Since we have same function in class and static function calling get_avl.
Adding :: to avoid codes confusing.
gcc/ChangeLog:
* config/riscv/riscv-vsetvl.cc (pass_vsetvl::get_backward_fusion_type): Add ::.
---
gcc/config/riscv/riscv-vsetvl.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 1/17/23 20:16, juzhe.zhong@rivai.ai wrote:
> From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
>
> Since we have same function in class and static function calling get_avl.
> Adding :: to avoid codes confusing.
>
> gcc/ChangeLog:
>
> * config/riscv/riscv-vsetvl.cc (pass_vsetvl::get_backward_fusion_type): Add ::.
Is there any reasonable way to avoid having the same name? ISTM that's
the root of the problem and adding "::" is just papering over the real
issue.
Jeff
@@ -2073,7 +2073,7 @@ pass_vsetvl::get_backward_fusion_type (const bb_info *bb,
reg = get_vl (insn->rtl ());
else
/* Check AVL operand for vsetvl zero,avl. */
- reg = get_avl (insn->rtl ());
+ reg = ::get_avl (insn->rtl ());
}
}