@@ -56,18 +56,18 @@ signature module InputSig<LocationSig Location, TypSig ControlFlowNode, TypSig B
5656 predicate isLiveAtEndOfBlock ( BasicBlock b ) ;
5757 }
5858
59- class SsaWriteDefinition extends SsaDefinition {
60- Expr getDefinition ( ) ;
59+ class SsaExplicitWrite extends SsaDefinition {
60+ Expr getValue ( ) ;
6161 }
6262
63- class SsaPhiNode extends SsaDefinition {
63+ class SsaPhiDefinition extends SsaDefinition {
6464 /** Holds if `inp` is an input to the phi node along the edge originating in `bb`. */
6565 predicate hasInputFromBlock ( SsaDefinition inp , BasicBlock bb ) ;
6666
6767 SsaDefinition getAnInput ( ) ;
6868 }
6969
70- class SsaUncertainDefinition extends SsaDefinition {
70+ class SsaUncertainWrite extends SsaDefinition {
7171 /**
7272 * Gets the immediately preceding definition. Since this update is uncertain,
7373 * the value from the preceding definition might still be valid.
@@ -274,9 +274,9 @@ module Make<
274274 * If multiple values apply, including a singleton, then we only include the
275275 * singleton.
276276 */
277- private predicate ssaHasValue ( SsaWriteDefinition def , GuardValue gv ) {
277+ private predicate ssaHasValue ( SsaExplicitWrite def , GuardValue gv ) {
278278 exists ( Expr e |
279- def .getDefinition ( ) = e and
279+ def .getValue ( ) = e and
280280 exprHasValue ( e , gv ) and
281281 ( any ( GuardValue gv0 | exprHasValue ( e , gv0 ) ) .isSingleton ( ) implies gv .isSingleton ( ) )
282282 )
@@ -398,7 +398,7 @@ module Make<
398398 }
399399
400400 private predicate uncertainStep ( SsaDefinition def1 , SsaDefinition def2 ) {
401- def2 .( SsaUncertainDefinition ) .getPriorDefinition ( ) = def1 and
401+ def2 .( SsaUncertainWrite ) .getPriorDefinition ( ) = def1 and
402402 Config:: uncertainFlow ( )
403403 }
404404
@@ -459,7 +459,7 @@ module Make<
459459
460460 pragma [ nomagic]
461461 private predicate phiBlock ( BasicBlock bb , SourceVariable v ) {
462- exists ( SsaPhiNode phi | phi .getBasicBlock ( ) = bb and phi .getSourceVariable ( ) = v )
462+ exists ( SsaPhiDefinition phi | phi .getBasicBlock ( ) = bb and phi .getSourceVariable ( ) = v )
463463 }
464464
465465 /** Holds if `def1` in `bb1` may step to `def2` in `bb2`. */
@@ -468,7 +468,7 @@ module Make<
468468 not Config:: barrierEdge ( bb1 , bb2 ) and
469469 not ssaValueBarrierEdge ( def1 , bb1 , bb2 ) and
470470 (
471- def2 .( SsaPhiNode ) .hasInputFromBlock ( def1 , bb1 ) and bb2 = def2 .getBasicBlock ( )
471+ def2 .( SsaPhiDefinition ) .hasInputFromBlock ( def1 , bb1 ) and bb2 = def2 .getBasicBlock ( )
472472 or
473473 exists ( SourceVariable v |
474474 ssaRelevantAtEndOfBlock ( def1 , bb1 ) and
@@ -661,10 +661,10 @@ module Make<
661661 |
662662 def .getBasicBlock ( ) .dominates ( loopEntry )
663663 or
664- exists ( SsaPhiNode phi |
664+ exists ( SsaPhiDefinition phi |
665665 phi .definesAt ( var , loopEntry , _) and
666666 phi .getAnInput + ( ) = def and
667- def .( SsaPhiNode ) .getAnInput * ( ) = phi
667+ def .( SsaPhiDefinition ) .getAnInput * ( ) = phi
668668 )
669669 )
670670 }
@@ -703,7 +703,7 @@ module Make<
703703 pathEdge ( src , bb1 , bb2 ) and
704704 relevantSplit ( src , var , condgv ) and
705705 lastDefInBlock ( var , t , bb2 ) and
706- not t instanceof SsaPhiNode and
706+ not t instanceof SsaPhiDefinition and
707707 (
708708 exists ( GuardValue gv |
709709 ssaHasValue ( t , gv ) and
@@ -730,7 +730,7 @@ module Make<
730730 pathEdge ( src , bb1 , bb2 ) and
731731 relevantSplit ( src , var , condgv ) and
732732 lastDefInBlock ( var , t2 , bb2 ) and
733- t2 .( SsaPhiNode ) .hasInputFromBlock ( t1 , bb1 ) and
733+ t2 .( SsaPhiDefinition ) .hasInputFromBlock ( t1 , bb1 ) and
734734 (
735735 exists ( GuardValue gv |
736736 ssaControlsPathEdge ( src , t1 , _, gv , bb1 , bb2 ) and
0 commit comments