@@ -559,47 +559,44 @@ private predicate boundedCastExpr(
559559private predicate boundedInstruction (
560560 Instruction i , Bound b , int delta , boolean upper , boolean fromBackEdge , int origdelta , Reason reason
561561) {
562- isReducibleCFG ( i .getFunction ( ) ) and
563- (
564- i instanceof PhiInstruction and
565- forex ( PhiOperand op | op = i .getAnOperand ( ) |
566- boundedPhiCandValidForEdge ( i , b , delta , upper , fromBackEdge , origdelta , reason , op )
567- )
568- or
569- i = b .getInstruction ( delta ) and
570- ( upper = true or upper = false ) and
571- fromBackEdge = false and
572- origdelta = delta and
573- reason = TNoReason ( )
574- or
575- exists ( Operand mid , int d1 , int d2 |
576- boundFlowStep ( i , mid , d1 , upper ) and
577- boundedNonPhiOperand ( mid , b , d2 , upper , fromBackEdge , origdelta , reason ) and
578- delta = d1 + d2 and
579- not exists ( getValue ( getConstantValue ( i ) ) )
580- )
581- or
582- exists ( Operand mid , int factor , int d |
583- boundFlowStepMul ( i , mid , factor ) and
584- boundedNonPhiOperand ( mid , b , d , upper , fromBackEdge , origdelta , reason ) and
585- b instanceof ZeroBound and
586- delta = d * factor and
587- not exists ( getValue ( getConstantValue ( i ) ) )
588- )
589- or
590- exists ( Operand mid , int factor , int d |
591- boundFlowStepDiv ( i , mid , factor ) and
592- boundedNonPhiOperand ( mid , b , d , upper , fromBackEdge , origdelta , reason ) and
593- d >= 0 and
594- b instanceof ZeroBound and
595- delta = d / factor and
596- not exists ( getValue ( getConstantValue ( i ) ) )
597- )
598- or
599- exists ( NarrowingCastInstruction cast |
600- cast = i and
601- safeNarrowingCast ( cast , upper .booleanNot ( ) ) and
602- boundedCastExpr ( cast , b , delta , upper , fromBackEdge , origdelta , reason )
603- )
562+ i instanceof PhiInstruction and
563+ forex ( PhiOperand op | op = i .getAnOperand ( ) |
564+ boundedPhiCandValidForEdge ( i , b , delta , upper , fromBackEdge , origdelta , reason , op )
565+ )
566+ or
567+ i = b .getInstruction ( delta ) and
568+ ( upper = true or upper = false ) and
569+ fromBackEdge = false and
570+ origdelta = delta and
571+ reason = TNoReason ( )
572+ or
573+ exists ( Operand mid , int d1 , int d2 |
574+ boundFlowStep ( i , mid , d1 , upper ) and
575+ boundedNonPhiOperand ( mid , b , d2 , upper , fromBackEdge , origdelta , reason ) and
576+ delta = d1 + d2 and
577+ not exists ( getValue ( getConstantValue ( i ) ) )
578+ )
579+ or
580+ exists ( Operand mid , int factor , int d |
581+ boundFlowStepMul ( i , mid , factor ) and
582+ boundedNonPhiOperand ( mid , b , d , upper , fromBackEdge , origdelta , reason ) and
583+ b instanceof ZeroBound and
584+ delta = d * factor and
585+ not exists ( getValue ( getConstantValue ( i ) ) )
586+ )
587+ or
588+ exists ( Operand mid , int factor , int d |
589+ boundFlowStepDiv ( i , mid , factor ) and
590+ boundedNonPhiOperand ( mid , b , d , upper , fromBackEdge , origdelta , reason ) and
591+ d >= 0 and
592+ b instanceof ZeroBound and
593+ delta = d / factor and
594+ not exists ( getValue ( getConstantValue ( i ) ) )
595+ )
596+ or
597+ exists ( NarrowingCastInstruction cast |
598+ cast = i and
599+ safeNarrowingCast ( cast , upper .booleanNot ( ) ) and
600+ boundedCastExpr ( cast , b , delta , upper , fromBackEdge , origdelta , reason )
604601 )
605602}
0 commit comments