aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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)