diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2023-06-29 17:29:03 +0200 |
---|---|---|
committer | Uros Bizjak <ubizjak@gmail.com> | 2023-06-29 17:29:47 +0200 |
commit | c41332abe7da981abdc23440e7e859b92ba065ec (patch) | |
tree | 506f6ba2316c1c57f609d11a323f74608e9deaf3 /gcc/cselib.h | |
parent | 5dfdf0ae4dca44a4f572c346d322fd6244598190 (diff) | |
download | gcc-c41332abe7da981abdc23440e7e859b92ba065ec.zip gcc-c41332abe7da981abdc23440e7e859b92ba065ec.tar.gz gcc-c41332abe7da981abdc23440e7e859b92ba065ec.tar.bz2 |
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.
Diffstat (limited to 'gcc/cselib.h')
-rw-r--r-- | gcc/cselib.h | 10 |
1 files changed, 5 insertions, 5 deletions
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); } |