@@ -796,28 +796,12 @@ module Make<LocationSig Location, InputSig<Location> Input> {
796
796
liveThroughExt ( bb , pragma [ only_bind_into ] ( v ) )
797
797
}
798
798
799
- pragma [ nomagic]
800
- private predicate phiReadReachesEndOfBlock ( BasicBlock pred , BasicBlock bb , SourceVariable v ) {
801
- exists ( PhiReadNode phi |
802
- ssaDefReachesEndOfBlockExt ( bb , phi , v ) and
803
- pred = getImmediateBasicBlockDominator ( phi .getBasicBlock ( ) )
804
- )
805
- }
806
-
807
799
/**
808
800
* NB: If this predicate is exposed, it should be cached.
809
801
*
810
802
* Same as `ssaDefReachesEndOfBlockExt`, but ignores phi-reads.
811
803
*/
812
- pragma [ nomagic]
813
- predicate ssaDefReachesEndOfBlock ( BasicBlock bb , Definition def , SourceVariable v ) {
814
- ssaDefReachesEndOfBlockExt ( bb , def , v )
815
- or
816
- exists ( BasicBlock mid |
817
- ssaDefReachesEndOfBlock ( mid , def , v ) and
818
- phiReadReachesEndOfBlock ( mid , bb , v )
819
- )
820
- }
804
+ predicate ssaDefReachesEndOfBlock = SsaDefReachesNew:: ssaDefReachesEndOfBlock / 3 ;
821
805
822
806
/**
823
807
* NB: If this predicate is exposed, it should be cached.
@@ -870,14 +854,7 @@ module Make<LocationSig Location, InputSig<Location> Input> {
870
854
*
871
855
* Same as `ssaDefReachesReadExt`, but ignores phi-reads.
872
856
*/
873
- pragma [ nomagic]
874
- predicate ssaDefReachesRead ( SourceVariable v , Definition def , BasicBlock bb , int i ) {
875
- ssaDefReachesReadWithinBlock ( v , def , bb , i )
876
- or
877
- ssaRef ( bb , i , v , SsaActualRead ( ) ) and
878
- ssaDefReachesEndOfBlock ( getABasicBlockPredecessor ( bb ) , def , v ) and
879
- not exists ( Definition other | ssaDefReachesReadWithinBlock ( v , other , bb , i ) )
880
- }
857
+ predicate ssaDefReachesRead = SsaDefReachesNew:: ssaDefReachesRead / 4 ;
881
858
882
859
/**
883
860
* NB: If this predicate is exposed, it should be cached.
0 commit comments