aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-11-28 14:34:33 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:05:12 -0700
commit726a641eadca60a59c580744f1277bb29fd7acf7 (patch)
tree3243ed1aab568697f785a448452c7b07e685a5b1 /memops.c
parentFix entrypoint branch rewriting.. (diff)
downloadsparse-726a641eadca60a59c580744f1277bb29fd7acf7.tar.gz
sparse-726a641eadca60a59c580744f1277bb29fd7acf7.tar.bz2
sparse-726a641eadca60a59c580744f1277bb29fd7acf7.zip
Fix test for entrypoint. Since we can rewrite branches
to it, it's not correct to assume that a bb without parents is the entrypoint.
Diffstat (limited to 'memops.c')
-rw-r--r--memops.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/memops.c b/memops.c
index ec0665c..0fc85e5 100644
--- a/memops.c
+++ b/memops.c
@@ -22,7 +22,11 @@ static int find_dominating_parents(pseudo_t pseudo, struct instruction *insn,
{
struct basic_block *parent;
- if (!bb->parents)
+ /*
+ * The entrypoint is special - it dominates all non-local
+ * pseudos, but no local ones.
+ */
+ if (bb == bb->ep->entry)
return !!local;
if (bb_list_size(bb->parents) > 1)