@@ -933,10 +933,8 @@ private module Cached {
933
933
*/
934
934
cached
935
935
predicate firstReadSameVar ( Definition def , ControlFlow:: Node cfn ) {
936
- exists ( ControlFlow:: BasicBlock bb1 , int i1 , ControlFlow:: BasicBlock bb2 , int i2 |
937
- def .definesAt ( _, bb1 , i1 ) and
938
- adjacentDefSkipUncertainReads ( def , bb1 , i1 , bb2 , i2 ) and
939
- cfn = bb2 .getNode ( i2 )
936
+ exists ( ControlFlow:: BasicBlock bb , int i |
937
+ Impl:: firstUse ( def , bb , i , true ) and cfn = bb .getNode ( i )
940
938
)
941
939
}
942
940
@@ -947,10 +945,13 @@ private module Cached {
947
945
*/
948
946
cached
949
947
predicate adjacentReadPairSameVar ( Definition def , ControlFlow:: Node cfn1 , ControlFlow:: Node cfn2 ) {
950
- exists ( ControlFlow:: BasicBlock bb1 , int i1 , ControlFlow:: BasicBlock bb2 , int i2 |
948
+ exists (
949
+ ControlFlow:: BasicBlock bb1 , int i1 , ControlFlow:: BasicBlock bb2 , int i2 ,
950
+ Ssa:: SourceVariable v
951
+ |
952
+ Impl:: ssaDefReachesRead ( v , def , bb1 , i1 ) and
953
+ Impl:: adjacentUseUse ( bb1 , i1 , bb2 , i2 , v , true ) and
951
954
cfn1 = bb1 .getNode ( i1 ) and
952
- variableReadActual ( bb1 , i1 , def .getSourceVariable ( ) ) and
953
- adjacentDefSkipUncertainReads ( def , bb1 , i1 , bb2 , i2 ) and
954
955
cfn2 = bb2 .getNode ( i2 )
955
956
)
956
957
}
0 commit comments