@@ -304,8 +304,8 @@ cached
304
304
private module Cached {
305
305
private predicate defUseFlow ( Node nodeFrom , Node nodeTo ) {
306
306
exists ( IRBlock bb1 , int i1 , IRBlock bb2 , int i2 , DefOrUse defOrUse , Use use |
307
- defOrUse .hasRankInBlock ( bb1 , i1 ) and
308
- use .hasRankInBlock ( bb2 , i2 ) and
307
+ defOrUse .hasIndexInBlock ( bb1 , i1 ) and
308
+ use .hasIndexInBlock ( bb2 , i2 ) and
309
309
adjacentDefRead ( _, bb1 , i1 , bb2 , i2 ) and
310
310
nodeFrom .asInstruction ( ) = toInstruction ( defOrUse ) and
311
311
flowOutOfAddressStep ( use .getOperand ( ) , nodeTo )
@@ -317,9 +317,9 @@ private module Cached {
317
317
exists ( IRBlock bb1 , int i1 , IRBlock bb2 , int i2 , Def def , Use use |
318
318
nodeFrom .isTerminal ( ) and
319
319
def .getInstruction ( ) = nodeFrom .getStoreInstruction ( ) and
320
- def .hasRankInBlock ( bb1 , i1 ) and
320
+ def .hasIndexInBlock ( bb1 , i1 ) and
321
321
adjacentDefRead ( _, bb1 , i1 , bb2 , i2 ) and
322
- use .hasRankInBlock ( bb2 , i2 ) and
322
+ use .hasIndexInBlock ( bb2 , i2 ) and
323
323
flowOutOfAddressStep ( use .getOperand ( ) , nodeTo )
324
324
)
325
325
or
@@ -350,8 +350,8 @@ private module Cached {
350
350
351
351
private predicate fromReadNode ( ReadNode nodeFrom , Node nodeTo ) {
352
352
exists ( IRBlock bb1 , int i1 , IRBlock bb2 , int i2 , Use use1 , Use use2 |
353
- use1 .hasRankInBlock ( bb1 , i1 ) and
354
- use2 .hasRankInBlock ( bb2 , i2 ) and
353
+ use1 .hasIndexInBlock ( bb1 , i1 ) and
354
+ use2 .hasIndexInBlock ( bb2 , i2 ) and
355
355
use1 .getOperand ( ) .getDef ( ) = nodeFrom .getInstruction ( ) and
356
356
adjacentDefRead ( _, bb1 , i1 , bb2 , i2 ) and
357
357
flowOutOfAddressStep ( use2 .getOperand ( ) , nodeTo )
@@ -362,15 +362,15 @@ private module Cached {
362
362
exists ( PhiNode phi , Use use , IRBlock block , int rnk |
363
363
phi = nodeFrom .getPhiNode ( ) and
364
364
adjacentDefRead ( phi , _, _, block , rnk ) and
365
- use .hasRankInBlock ( block , rnk ) and
365
+ use .hasIndexInBlock ( block , rnk ) and
366
366
flowOutOfAddressStep ( use .getOperand ( ) , nodeTo )
367
367
)
368
368
}
369
369
370
370
private predicate toPhiNode ( Node nodeFrom , SsaPhiNode nodeTo ) {
371
371
// Flow to phi nodes
372
372
exists ( Def def , IRBlock block , int rnk |
373
- def .hasRankInBlock ( block , rnk ) and
373
+ def .hasIndexInBlock ( block , rnk ) and
374
374
nodeTo .hasInputAtRankInBlock ( block , rnk )
375
375
|
376
376
exists ( StoreNodeInstr storeNode |
@@ -503,8 +503,8 @@ private module Cached {
503
503
|
504
504
store = def .getInstruction ( ) and
505
505
store .getSourceValueOperand ( ) = operand and
506
- def .hasRankInBlock ( block1 , rnk1 ) and
507
- use .hasRankInBlock ( block2 , rnk2 ) and
506
+ def .hasIndexInBlock ( block1 , rnk1 ) and
507
+ use .hasIndexInBlock ( block2 , rnk2 ) and
508
508
adjacentDefRead ( _, block1 , rnk1 , block2 , rnk2 )
509
509
|
510
510
// The shared SSA library has determined that `use` is the next use of the operand
@@ -534,12 +534,12 @@ private module Cached {
534
534
not operand = getSourceAddressOperand ( _) and
535
535
exists ( Use use1 , Use use2 , IRBlock block1 , int rnk1 , IRBlock block2 , int rnk2 |
536
536
use1 .getOperand ( ) = operand and
537
- use1 .hasRankInBlock ( block1 , rnk1 ) and
537
+ use1 .hasIndexInBlock ( block1 , rnk1 ) and
538
538
// Don't flow to the next use if this use is part of a store operation that totally
539
539
// overrides a variable.
540
540
not explicitWrite ( true , _, use1 .getOperand ( ) .getDef ( ) ) and
541
541
adjacentDefRead ( _, block1 , rnk1 , block2 , rnk2 ) and
542
- use2 .hasRankInBlock ( block2 , rnk2 ) and
542
+ use2 .hasIndexInBlock ( block2 , rnk2 ) and
543
543
flowOutOfAddressStep ( use2 .getOperand ( ) , nodeTo )
544
544
)
545
545
or
@@ -611,7 +611,7 @@ import Cached
611
611
predicate variableWrite ( IRBlock bb , int i , SourceVariable v , boolean certain ) {
612
612
DataFlowImplCommon:: forceCachingInSameStage ( ) and
613
613
exists ( Def def |
614
- def .hasRankInBlock ( bb , i ) and
614
+ def .hasIndexInBlock ( bb , i ) and
615
615
v = def .getSourceVariable ( ) and
616
616
( if def .isCertain ( ) then certain = true else certain = false )
617
617
)
@@ -623,7 +623,7 @@ predicate variableWrite(IRBlock bb, int i, SourceVariable v, boolean certain) {
623
623
*/
624
624
predicate variableRead ( IRBlock bb , int i , SourceVariable v , boolean certain ) {
625
625
exists ( Use use |
626
- use .hasRankInBlock ( bb , i ) and
626
+ use .hasIndexInBlock ( bb , i ) and
627
627
v = use .getSourceVariable ( ) and
628
628
certain = true
629
629
)
0 commit comments