@@ -1466,8 +1466,10 @@ module Internal {
14661466 PreSsa:: Definition def , AssignableRead read
14671467 ) {
14681468 read = def .getAFirstRead ( ) and
1469- not exists ( AssignableRead other | PreSsa:: adjacentReadPairSameVar ( other , read ) |
1470- other != read
1469+ (
1470+ not PreSsa:: adjacentReadPairSameVar ( _, read )
1471+ or
1472+ read = unique( AssignableRead read0 | PreSsa:: adjacentReadPairSameVar ( read0 , read ) )
14711473 )
14721474 }
14731475
@@ -1651,10 +1653,14 @@ module Internal {
16511653 AssignableRead read1 , AssignableRead read2
16521654 ) {
16531655 PreSsa:: adjacentReadPairSameVar ( read1 , read2 ) and
1654- not exists ( AssignableRead other |
1655- PreSsa:: adjacentReadPairSameVar ( other , read2 ) and
1656- other != read1 and
1657- other != read2
1656+ (
1657+ read1 = read2 and
1658+ read1 = unique( AssignableRead other | PreSsa:: adjacentReadPairSameVar ( other , read2 ) )
1659+ or
1660+ read1 =
1661+ unique( AssignableRead other |
1662+ PreSsa:: adjacentReadPairSameVar ( other , read2 ) and other != read2
1663+ )
16581664 )
16591665 }
16601666
@@ -1887,10 +1893,14 @@ module Internal {
18871893 Ssa:: Definition def , ControlFlow:: Node cfn1 , ControlFlow:: Node cfn2
18881894 ) {
18891895 SsaImpl:: adjacentReadPairSameVar ( def , cfn1 , cfn2 ) and
1890- not exists ( ControlFlow:: Node other |
1891- SsaImpl:: adjacentReadPairSameVar ( def , other , cfn2 ) and
1892- other != cfn1 and
1893- other != cfn2
1896+ (
1897+ cfn1 = cfn2 and
1898+ cfn1 = unique( ControlFlow:: Node other | SsaImpl:: adjacentReadPairSameVar ( def , other , cfn2 ) )
1899+ or
1900+ cfn1 =
1901+ unique( ControlFlow:: Node other |
1902+ SsaImpl:: adjacentReadPairSameVar ( def , other , cfn2 ) and other != cfn2
1903+ )
18941904 )
18951905 }
18961906
0 commit comments