@@ -71,7 +71,7 @@ private module Internal {
71
71
pragma [ noinline]
72
72
private predicate inDefDominanceFrontier ( ReachableJoinBlock bb , SsaSourceVariable v ) {
73
73
exists ( ReachableBasicBlock defbb , SsaDefinition def |
74
- def .definesAt ( defbb , _ , v ) and
74
+ def .definesAt ( v , defbb , _ ) and
75
75
bb .inDominanceFrontierOf ( defbb )
76
76
)
77
77
}
@@ -206,7 +206,7 @@ private module Internal {
206
206
private predicate ssaRef ( ReachableBasicBlock bb , int i , SsaSourceVariable v , RefKind k ) {
207
207
useAt ( bb , i , v ) and k = ReadRef ( )
208
208
or
209
- any ( SsaDefinition def ) .definesAt ( bb , i , v ) and k = WriteRef ( )
209
+ any ( SsaDefinition def ) .definesAt ( v , bb , i ) and k = WriteRef ( )
210
210
}
211
211
212
212
/**
@@ -248,7 +248,7 @@ private module Internal {
248
248
*/
249
249
private SsaDefinition getLocalDefinition ( ReachableBasicBlock bb , int i , SsaSourceVariable v ) {
250
250
exists ( int r | r = rewindReads ( bb , i , v ) |
251
- exists ( int j | result .definesAt ( bb , j , v ) and ssaRefRank ( bb , j , v , _) = r - 1 )
251
+ exists ( int j | result .definesAt ( v , bb , j ) and ssaRefRank ( bb , j , v , _) = r - 1 )
252
252
)
253
253
}
254
254
@@ -270,7 +270,7 @@ private module Internal {
270
270
exists ( int lastRef | lastRef = max ( int i | ssaRef ( bb , i , v , _) ) |
271
271
result = getLocalDefinition ( bb , lastRef , v )
272
272
or
273
- result .definesAt ( bb , lastRef , v ) and
273
+ result .definesAt ( v , bb , lastRef ) and
274
274
liveAtSuccEntry ( bb , v )
275
275
)
276
276
or
@@ -279,7 +279,7 @@ private module Internal {
279
279
// then one must dominate the other, so we can find the reaching definition
280
280
// by following the idominance relation backwards.
281
281
result = getDefReachingEndOfImmediateDominator ( bb , v ) and
282
- not exists ( SsaDefinition ssa | ssa .definesAt ( bb , _ , v ) ) and
282
+ not exists ( SsaDefinition ssa | ssa .definesAt ( v , bb , _ ) ) and
283
283
liveAtSuccEntry ( bb , v )
284
284
}
285
285
@@ -412,7 +412,7 @@ private module Internal {
412
412
predicate firstUse ( SsaDefinition def , IR:: Instruction use ) {
413
413
exists ( SsaSourceVariable v , ReachableBasicBlock b1 , int i1 , ReachableBasicBlock b2 , int i2 |
414
414
adjacentVarRefs ( v , b1 , i1 , b2 , i2 ) and
415
- def .definesAt ( b1 , i1 , v ) and
415
+ def .definesAt ( v , b1 , i1 ) and
416
416
variableUse ( v , use , b2 , i2 )
417
417
)
418
418
or
@@ -421,8 +421,8 @@ private module Internal {
421
421
int i2
422
422
|
423
423
adjacentVarRefs ( v , b1 , i1 , b2 , i2 ) and
424
- def .definesAt ( b1 , i1 , v ) and
425
- redef .definesAt ( b2 , i2 , v ) and
424
+ def .definesAt ( v , b1 , i1 ) and
425
+ redef .definesAt ( v , b2 , i2 ) and
426
426
firstUse ( redef , use )
427
427
)
428
428
}
@@ -457,7 +457,7 @@ private module Internal {
457
457
|
458
458
adjacentVarRefs ( v , b1 , i1 , b2 , i2 ) and
459
459
variableUse ( v , use1 , b1 , i1 ) and
460
- def .definesAt ( b2 , i2 , v ) and
460
+ def .definesAt ( v , b2 , i2 ) and
461
461
firstUse ( def , use2 )
462
462
)
463
463
}
0 commit comments