From c41332abe7da981abdc23440e7e859b92ba065ec Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Thu, 29 Jun 2023 17:29:03 +0200 Subject: cselib+expr+bitmap: Change return type of predicate functions from int to bool gcc/ChangeLog: * cselib.h (rtx_equal_for_cselib_1): Change return type from int to bool. (references_value_p): Ditto. (rtx_equal_for_cselib_p): Ditto. * expr.h (can_store_by_pieces): Ditto. (try_casesi): Ditto. (try_tablejump): Ditto. (safe_from_p): Ditto. * sbitmap.h (bitmap_equal_p): Ditto. * cselib.cc (references_value_p): Change return type from int to void and adjust function body accordingly. (rtx_equal_for_cselib_1): Ditto. * expr.cc (is_aligning_offset): Ditto. (can_store_by_pieces): Ditto. (mostly_zeros_p): Ditto. (all_zeros_p): Ditto. (safe_from_p): Ditto. (is_aligning_offset): Ditto. (try_casesi): Ditto. (try_tablejump): Ditto. (store_constructor): Change "need_to_clear" and "const_bounds_p" variables to bool. * sbitmap.cc (bitmap_equal_p): Change return type from int to bool. --- gcc/cselib.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gcc/cselib.h') diff --git a/gcc/cselib.h b/gcc/cselib.h index e2fa8e8..0ced5d5 100644 --- a/gcc/cselib.h +++ b/gcc/cselib.h @@ -82,9 +82,9 @@ extern void cselib_finish (void); extern void cselib_process_insn (rtx_insn *); extern bool fp_setter_insn (rtx_insn *); extern machine_mode cselib_reg_set_mode (const_rtx); -extern int rtx_equal_for_cselib_1 (rtx, rtx, machine_mode, int); +extern bool rtx_equal_for_cselib_1 (rtx, rtx, machine_mode, int); extern bool cselib_redundant_set_p (rtx); -extern int references_value_p (const_rtx, int); +extern bool references_value_p (const_rtx, int); extern rtx cselib_expand_value_rtx (rtx, bitmap, int); typedef rtx (*cselib_expand_callback)(rtx, bitmap, int, void *); extern rtx cselib_expand_value_rtx_cb (rtx, bitmap, int, @@ -128,14 +128,14 @@ canonical_cselib_val (cselib_val *val) return canon; } -/* Return nonzero if we can prove that X and Y contain the same value, taking +/* Return true if we can prove that X and Y contain the same value, taking our gathered information into account. */ -inline int +inline bool rtx_equal_for_cselib_p (rtx x, rtx y) { if (x == y) - return 1; + return true; return rtx_equal_for_cselib_1 (x, y, VOIDmode, 0); } -- cgit v1.1