diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2019-09-09 17:59:41 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2019-09-09 17:59:41 +0000 |
commit | a85796511b2b7985f79331c996761f7a87cb8116 (patch) | |
tree | 4a203b9ce5ea6c1edbe21037576b86fa2d0b1107 /gcc/hard-reg-set.h | |
parent | 4897c5aaa7a5db4c1ece28ef66acb3d5e41787b3 (diff) | |
download | gcc-a85796511b2b7985f79331c996761f7a87cb8116.zip gcc-a85796511b2b7985f79331c996761f7a87cb8116.tar.gz gcc-a85796511b2b7985f79331c996761f7a87cb8116.tar.bz2 |
Remove hard_reg_set_equal_p
Use "x == y" instead of "hard_reg_set_equal_p (x, y)".
2019-09-09 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* hard-reg-set.h (HARD_REG_SET::operator==): New function.
(HARD_REG_SET::operator!=): Likewise.
(hard_reg_set_equal_p): Delete.
* cfgcleanup.c (old_insns_match_p): Use == instead of
hard_reg_set_equal_p and != instead of !hard_reg_set_equal_p.
* ira-color.c (allocno_hard_regs_hasher::equal): Likewise.
(add_allocno_hard_regs_to_forest): Likewise.
(setup_allocno_available_regs_num): Likewise.
* ira.c (setup_pressure_classes): Likewise.
(setup_allocno_and_important_classes): Likewise.
(setup_reg_class_relations): Likewise.
* lra-lives.c (process_bb_lives): Likewise.
* reg-stack.c (change_stack, convert_regs_1): Likewise.
From-SVN: r275534
Diffstat (limited to 'gcc/hard-reg-set.h')
-rw-r--r-- | gcc/hard-reg-set.h | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/gcc/hard-reg-set.h b/gcc/hard-reg-set.h index 793b869..e59779d 100644 --- a/gcc/hard-reg-set.h +++ b/gcc/hard-reg-set.h @@ -96,6 +96,21 @@ struct HARD_REG_SET return *this; } + bool + operator== (const HARD_REG_SET &other) const + { + HARD_REG_ELT_TYPE bad = 0; + for (unsigned int i = 0; i < ARRAY_SIZE (elts); ++i) + bad |= (elts[i] ^ other.elts[i]); + return bad == 0; + } + + bool + operator!= (const HARD_REG_SET &other) const + { + return !operator== (other); + } + HARD_REG_ELT_TYPE elts[HARD_REG_SET_LONGS]; }; typedef const HARD_REG_SET &const_hard_reg_set; @@ -129,7 +144,6 @@ struct hard_reg_set_container Also define: hard_reg_set_subset_p (X, Y), which returns true if X is a subset of Y. - hard_reg_set_equal_p (X, Y), which returns true if X and Y are equal. hard_reg_set_intersect_p (X, Y), which returns true if X and Y intersect. hard_reg_set_empty_p (X), which returns true if X is empty. */ @@ -154,12 +168,6 @@ hard_reg_set_subset_p (const_hard_reg_set x, const_hard_reg_set y) } static inline bool -hard_reg_set_equal_p (const_hard_reg_set x, const_hard_reg_set y) -{ - return x == y; -} - -static inline bool hard_reg_set_intersect_p (const_hard_reg_set x, const_hard_reg_set y) { return (x & y) != HARD_CONST (0); @@ -218,15 +226,6 @@ hard_reg_set_subset_p (const_hard_reg_set x, const_hard_reg_set y) } static inline bool -hard_reg_set_equal_p (const_hard_reg_set x, const_hard_reg_set y) -{ - HARD_REG_ELT_TYPE bad = 0; - for (unsigned int i = 0; i < ARRAY_SIZE (x.elts); ++i) - bad |= (x.elts[i] ^ y.elts[i]); - return bad == 0; -} - -static inline bool hard_reg_set_intersect_p (const_hard_reg_set x, const_hard_reg_set y) { HARD_REG_ELT_TYPE good = 0; |