Doubt on phi nodes

Hi all,
I have a doubt on the usage of phi nodes in LLVM: if I define a value in a bb, are phi nodes needed in the blocks that are dominated by the bb where the value is defined?
As an example consider the following trivial example:
// BB0
A = 5;
if (condition) { // BB1
   B = 2;
} else { // BB2
   B = 1;
}
// BB3
is a phi node required for A in BB3?

b.r.,
Carlo Alberto Ferraris

Hi Carlo,

I have a doubt on the usage of phi nodes in LLVM: if I define a value in a bb,
are phi nodes needed in the blocks that are dominated by the bb where the value
is defined?
As an example consider the following trivial example:
// BB0
A = 5;
if (condition) { // BB1
B = 2;
} else { // BB2
B = 1;
}
// BB3
is a phi node required for A in BB3?

no, it is not required AFAIK.

Ciao, Duncan.