Exemplo n.º 1
0
 public StrengthReduction(SsaState ssa, LinearInductionVariable liv, LinearInductionVariableContext ctx)
 {
     this.ssa = ssa;
     this.liv = liv;
     this.ctx = ctx;
     incrUses = new List<IncrementedUse>();
 }
Exemplo n.º 2
0
 private void ModifyTest(LinearInductionVariableContext ctx, IncrementedUse use)
 {
     if (ctx.TestStatement == null)
         return;
     Branch branch;
     BinaryExpression exp ;
     Constant c ;
     if (ctx.TestStatement.Instruction.As(out branch) &&
         branch.Condition.As(out exp) &&
         exp.Right.As(out c))
     {
         exp.Right = Operator.ISub.ApplyConstants(c, use.Increment);
     }
 }