aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-11-24 18:29:28 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:04:46 -0700
commitb200a9a69e704c24761d0c8b06198e33dbf8ab6a (patch)
treeabc03f14331513866abaedaf765c98db5b05d93e /linearize.h
parentNow that phi sources are just instructions, we can CSE them. (diff)
downloadsparse-b200a9a69e704c24761d0c8b06198e33dbf8ab6a.tar.gz
sparse-b200a9a69e704c24761d0c8b06198e33dbf8ab6a.tar.bz2
sparse-b200a9a69e704c24761d0c8b06198e33dbf8ab6a.zip
Oops. Forgot to add usage of a dominator list pseudo.
This made the phi-source CSE generate garbage, since the information wasn't updated in the phi list of the user. Move use_pseudo() to header file, since flow wants to use it too now.
Diffstat (limited to 'linearize.h')
-rw-r--r--linearize.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/linearize.h b/linearize.h
index a34a828..813ad27 100644
--- a/linearize.h
+++ b/linearize.h
@@ -214,6 +214,18 @@ static inline int bb_reachable(struct basic_block *bb)
return bb != NULL;
}
+static inline void add_pseudo_ptr(pseudo_t *ptr, struct pseudo_ptr_list **list)
+{
+ add_ptr_list((struct ptr_list **)list, ptr);
+}
+
+static inline void use_pseudo(pseudo_t p, pseudo_t *pp)
+{
+ *pp = p;
+ if (p && p->type != PSEUDO_VOID)
+ add_pseudo_ptr(pp, &p->users);
+}
+
struct entrypoint {
struct symbol *name;
struct symbol_list *syms;