public QilNode Choice(QilNode expr, QilList branches) {
if (! debug) {
switch (branches.Count) {
case 1:
// If expr has no side effects, it will be eliminated by optimizer
return f.Loop(f.Let(expr), branches[0]);
case 2:
return f.Conditional(f.Eq(expr, f.LiteralInt32(0)), branches[0], branches[1]);
}
}
return f.Choice(expr, branches);
}