aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.h
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2023-06-29 17:29:03 +0200
committerUros Bizjak <ubizjak@gmail.com>2023-06-29 17:29:47 +0200
commitc41332abe7da981abdc23440e7e859b92ba065ec (patch)
tree506f6ba2316c1c57f609d11a323f74608e9deaf3 /gcc/expr.h
parent5dfdf0ae4dca44a4f572c346d322fd6244598190 (diff)
downloadgcc-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/expr.h')
-rw-r--r--gcc/expr.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/gcc/expr.h b/gcc/expr.h
index 0c059ed..11bff53 100644
--- a/gcc/expr.h
+++ b/gcc/expr.h
@@ -222,16 +222,16 @@ extern bool set_storage_via_setmem (rtx, rtx, rtx, unsigned int,
unsigned HOST_WIDE_INT,
unsigned HOST_WIDE_INT);
-/* Return nonzero if it is desirable to store LEN bytes generated by
+/* Return true if it is desirable to store LEN bytes generated by
CONSTFUN with several move instructions by store_by_pieces
function. CONSTFUNDATA is a pointer which will be passed as argument
in every CONSTFUN call.
ALIGN is maximum alignment we can assume.
MEMSETP is true if this is a real memset/bzero, not a copy
of a const string. */
-extern int can_store_by_pieces (unsigned HOST_WIDE_INT,
- by_pieces_constfn,
- void *, unsigned int, bool);
+extern bool can_store_by_pieces (unsigned HOST_WIDE_INT,
+ by_pieces_constfn,
+ void *, unsigned int, bool);
/* Generate several move instructions to store LEN bytes generated by
CONSTFUN to block TO. (A MEM rtx with BLKmode). CONSTFUNDATA is a
@@ -329,10 +329,12 @@ extern enum tree_code maybe_optimize_mod_cmp (enum tree_code, tree *, tree *);
extern void maybe_optimize_sub_cmp_0 (enum tree_code, tree *, tree *);
/* Two different ways of generating switch statements. */
-extern int try_casesi (tree, tree, tree, tree, rtx, rtx, rtx, profile_probability);
-extern int try_tablejump (tree, tree, tree, tree, rtx, rtx, profile_probability);
+extern bool try_casesi (tree, tree, tree, tree, rtx, rtx, rtx,
+ profile_probability);
+extern bool try_tablejump (tree, tree, tree, tree, rtx, rtx,
+ profile_probability);
-extern int safe_from_p (const_rtx, tree, int);
+extern bool safe_from_p (const_rtx, tree, int);
/* Get the personality libfunc for a function decl. */
rtx get_personality_function (tree);