@@ -45,7 +45,8 @@ private module Cached {
45
45
}
46
46
47
47
class TStageInstruction =
48
- TRawInstruction or TPhiInstruction or TChiInstruction or TUnreachedInstruction ;
48
+ TRawInstruction or TPhiInstruction or TChiInstruction or TUnreachedInstruction or
49
+ TInitializeGroupInstruction ;
49
50
50
51
/**
51
52
* If `oldInstruction` is a `Phi` instruction that has exactly one reachable predecessor block,
@@ -78,6 +79,8 @@ private module Cached {
78
79
or
79
80
instr instanceof TChiInstruction
80
81
or
82
+ instr instanceof TInitializeGroupInstruction
83
+ or
81
84
instr instanceof TUnreachedInstruction
82
85
}
83
86
@@ -123,7 +126,8 @@ private module Cached {
123
126
predicate hasModeledMemoryResult ( Instruction instruction ) {
124
127
canModelResultForOldInstruction ( getOldInstruction ( instruction ) ) or
125
128
instruction instanceof PhiInstruction or // Phis always have modeled results
126
- instruction instanceof ChiInstruction // Chis always have modeled results
129
+ instruction instanceof ChiInstruction or // Chis always have modeled results
130
+ instruction instanceof InitializeGroupInstruction // Group initializers always have modeled results
127
131
}
128
132
129
133
cached
@@ -414,6 +418,11 @@ private module Cached {
414
418
exists ( IRFunctionBase irFunc |
415
419
instr = unreachedInstruction ( irFunc ) and result = irFunc .getFunction ( )
416
420
)
421
+ or
422
+ exists ( Alias:: VariableGroup vg |
423
+ instr = initializeGroup ( vg ) and
424
+ result = vg .getIRFunction ( ) .getFunction ( )
425
+ )
417
426
}
418
427
419
428
cached
@@ -431,6 +440,11 @@ private module Cached {
431
440
result = vvar .getType ( )
432
441
)
433
442
or
443
+ exists ( Alias:: VariableGroup vg |
444
+ instr = initializeGroup ( vg ) and
445
+ result = vg .getType ( )
446
+ )
447
+ or
434
448
instr = reusedPhiInstruction ( _) and
435
449
result = instr .( OldInstruction ) .getResultLanguageType ( )
436
450
or
@@ -456,6 +470,8 @@ private module Cached {
456
470
or
457
471
instr = chiInstruction ( _) and opcode instanceof Opcode:: Chi
458
472
or
473
+ instr = initializeGroup ( _) and opcode instanceof Opcode:: InitializeGroup
474
+ or
459
475
instr = unreachedInstruction ( _) and opcode instanceof Opcode:: Unreached
460
476
}
461
477
@@ -472,6 +488,11 @@ private module Cached {
472
488
instr = chiInstruction ( primaryInstr ) and result = primaryInstr .getEnclosingIRFunction ( )
473
489
)
474
490
or
491
+ exists ( Alias:: VariableGroup vg |
492
+ instr = initializeGroup ( vg ) and
493
+ result = vg .getIRFunction ( )
494
+ )
495
+ or
475
496
instr = unreachedInstruction ( result )
476
497
}
477
498
@@ -1066,4 +1087,6 @@ module Ssa {
1066
1087
predicate hasChiInstruction = Cached:: hasChiInstructionCached / 1 ;
1067
1088
1068
1089
predicate hasUnreachedInstruction = Cached:: hasUnreachedInstructionCached / 1 ;
1090
+
1091
+ class VariableGroup = Alias:: VariableGroup ;
1069
1092
}
0 commit comments