public virtual Instruction TransformPhiAssignment(PhiAssignment phi) { var args = phi.Src.Arguments; for (int i = 0; i < args.Length; ++i) { var value = args[i].Value.Accept(this); args[i] = new PhiArgument(args[i].Block, value); } phi.Dst = (Identifier)phi.Dst.Accept(this); return(phi); }
public override Instruction TransformPhiAssignment(PhiAssignment phi) { var args = phi.Src.Arguments; for (int i = 0; i < args.Length; ++i) { var value = args[i].Value.Accept(this); args[i] = new PhiArgument(args[i].Block, value); } if (replaceDefinitions) { phi.Dst = (Identifier)phi.Dst.Accept(this); } return(phi); }
public Expression VisitPhiFunction(PhiFunction phi) { var args = new PhiArgument[phi.Arguments.Length]; for (int i = 0; i < args.Length; ++i) { var exp = phi.Arguments[i].Value.Accept(this); if (exp is InvalidConstant) { return(exp); } args[i] = new PhiArgument(phi.Arguments[i].Block, exp); } return(new PhiFunction(phi.DataType, args)); }