--- mem2reg.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mem2reg.c b/mem2reg.c index dca409f5d..641a1f65d 100644 --- a/mem2reg.c +++ b/mem2reg.c @@ -107,16 +107,17 @@ found_dominator: } /* - * pseudo: pseudo for a symbol - * insn: is a load of the symbol 'pseudo'. + * sym: a symbol/variable + * insn: is a load of the symbol 'sym'. * local: is the symbol local or externally visible? */ -static int find_dominating_stores(pseudo_t pseudo, struct instruction *insn, +static int find_dominating_stores(struct symbol *sym, struct instruction *insn, unsigned long generation, int local) { struct basic_block *bb = insn->bb; struct instruction *one, *dom = NULL; struct pseudo_list *dominators; + pseudo_t pseudo = sym->pseudo; int partial; /* Unreachable load? Undo it */ @@ -376,7 +377,7 @@ static void promote_symbol(struct entrypoint *ep, struct symbol *sym) FOR_EACH_PTR_REVERSE(pseudo->users, pu) { struct instruction *insn = pu->insn; if (insn->opcode == OP_LOAD) - all &= find_dominating_stores(pseudo, insn, ++bb_generation, !mod); + all &= find_dominating_stores(sym, insn, ++bb_generation, !mod); } END_FOR_EACH_PTR_REVERSE(pu); /* If we converted all the loads, remove the stores. They are dead */ -- 2.14.0 -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html