Skip to content

Commit

Permalink
Leave symbol pseudo usage intact when doing phi-node conversion.
Browse files Browse the repository at this point in the history
There's actually a reason we leave a bogus usage list for symbol
pseudo's: they are special, and they traverse the list _while_
doing cleanup, and changing the list while they are traversing
it is a bad idea.

Also, symbol pseudos have special usage rules, and know "where"
the usage is in an instruction, so they can (and do) check when
their usage has changed.
  • Loading branch information
Linus Torvalds committed Apr 8, 2005
1 parent 38284a4 commit 602f6b6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,9 @@ void rewrite_load_instruction(struct instruction *insn, struct pseudo_list *domi
return;

complex_phi:
kill_use(&insn->src);
/* We leave symbol pseudos with a bogus usage list here */
if (insn->src->type != PSEUDO_SYM)
kill_use(&insn->src);
insn->opcode = OP_PHI;
insn->phi_list = dominators;
}
Expand Down

0 comments on commit 602f6b6

Please sign in to comment.