aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/memops.c
diff options
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
parentee2e63eb742d7afd2ba8021863f18b89792d5078 (diff)
downloadsparse-dev-726a641eadca60a59c580744f1277bb29fd7acf7.tar.gz
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 ec0665c8..0fc85e58 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)