diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-11-26 12:09:24 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:04:57 -0700 |
commit | 05f35ab2b4c7a464851090085cf13d39ef22e854 (patch) | |
tree | 67e3c3f1106fc7ac2ab7aca1994b28e6b8d416a8 /linearize.h | |
parent | Make the CSE "repeat" logic be more fine-grained than just (diff) | |
download | sparse-05f35ab2b4c7a464851090085cf13d39ef22e854.tar.gz sparse-05f35ab2b4c7a464851090085cf13d39ef22e854.tar.bz2 sparse-05f35ab2b4c7a464851090085cf13d39ef22e854.zip |
Clean up the tests for "pseudo has use list", since add/remove
has to agree on it or bad things happen.
Diffstat (limited to 'linearize.h')
-rw-r--r-- | linearize.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/linearize.h b/linearize.h index adc900a..da66c9b 100644 --- a/linearize.h +++ b/linearize.h @@ -220,10 +220,15 @@ static inline void add_pseudo_ptr(pseudo_t *ptr, struct pseudo_ptr_list **list) add_ptr_list((struct ptr_list **)list, ptr); } +static inline int has_use_list(pseudo_t p) +{ + return (p && p->type != PSEUDO_VOID && p->type != PSEUDO_VAL); +} + static inline void use_pseudo(pseudo_t p, pseudo_t *pp) { *pp = p; - if (p && p->type != PSEUDO_VOID && p->type != PSEUDO_VAL) + if (has_use_list(p)) add_pseudo_ptr(pp, &p->users); } |