@@ -215,7 +215,7 @@ module SemanticExprConfig {
215
215
newtype TSsaVariable =
216
216
TSsaInstruction ( IR:: Instruction instr ) { instr .hasMemoryResult ( ) } or
217
217
TSsaOperand ( IR:: Operand op ) { op .isDefinitionInexact ( ) } or
218
- TSsaPointerArithmeticGuard ( IR :: PointerArithmeticInstruction instr ) {
218
+ TSsaPointerArithmeticGuard ( ValueNumber instr ) {
219
219
exists ( Guard g , IR:: Operand use | use = instr .getAUse ( ) |
220
220
g .comparesLt ( use , _, _, _, _) or
221
221
g .comparesLt ( _, use , _, _, _) or
@@ -231,7 +231,7 @@ module SemanticExprConfig {
231
231
232
232
IR:: Instruction asInstruction ( ) { none ( ) }
233
233
234
- IR :: PointerArithmeticInstruction asPointerArithGuard ( ) { none ( ) }
234
+ ValueNumber asPointerArithGuard ( ) { none ( ) }
235
235
236
236
IR:: Operand asOperand ( ) { none ( ) }
237
237
}
@@ -249,15 +249,15 @@ module SemanticExprConfig {
249
249
}
250
250
251
251
class SsaPointerArithmeticGuard extends SsaVariable , TSsaPointerArithmeticGuard {
252
- IR :: PointerArithmeticInstruction instr ;
252
+ ValueNumber vn ;
253
253
254
- SsaPointerArithmeticGuard ( ) { this = TSsaPointerArithmeticGuard ( instr ) }
254
+ SsaPointerArithmeticGuard ( ) { this = TSsaPointerArithmeticGuard ( vn ) }
255
255
256
- final override string toString ( ) { result = instr .toString ( ) }
256
+ final override string toString ( ) { result = vn .toString ( ) }
257
257
258
- final override Location getLocation ( ) { result = instr .getLocation ( ) }
258
+ final override Location getLocation ( ) { result = vn .getLocation ( ) }
259
259
260
- final override IR :: PointerArithmeticInstruction asPointerArithGuard ( ) { result = instr }
260
+ final override ValueNumber asPointerArithGuard ( ) { result = vn }
261
261
}
262
262
263
263
class SsaOperand extends SsaVariable , TSsaOperand {
@@ -289,7 +289,7 @@ module SemanticExprConfig {
289
289
Expr getAUse ( SsaVariable v ) {
290
290
result .getUnconverted ( ) .( IR:: LoadInstruction ) .getSourceValue ( ) = v .asInstruction ( )
291
291
or
292
- result .getUnconverted ( ) = valueNumber ( v .asPointerArithGuard ( ) ) .getAnInstruction ( )
292
+ result .getUnconverted ( ) = v .asPointerArithGuard ( ) .getAnInstruction ( )
293
293
}
294
294
295
295
SemType getSsaVariableType ( SsaVariable v ) {
@@ -331,7 +331,7 @@ module SemanticExprConfig {
331
331
final override predicate hasRead ( SsaVariable v ) {
332
332
exists ( IR:: Operand operand |
333
333
operand .getDef ( ) = v .asInstruction ( ) or
334
- operand .getDef ( ) = valueNumber ( v .asPointerArithGuard ( ) ) .getAnInstruction ( )
334
+ operand .getDef ( ) = v .asPointerArithGuard ( ) .getAnInstruction ( )
335
335
|
336
336
not operand instanceof IR:: PhiInputOperand and
337
337
operand .getUse ( ) .getBlock ( ) = block
@@ -352,7 +352,7 @@ module SemanticExprConfig {
352
352
final override predicate hasRead ( SsaVariable v ) {
353
353
exists ( IR:: PhiInputOperand operand |
354
354
operand .getDef ( ) = v .asInstruction ( ) or
355
- operand .getDef ( ) = valueNumber ( v .asPointerArithGuard ( ) ) .getAnInstruction ( )
355
+ operand .getDef ( ) = v .asPointerArithGuard ( ) .getAnInstruction ( )
356
356
|
357
357
operand .getPredecessorBlock ( ) = pred and
358
358
operand .getUse ( ) .getBlock ( ) = succ
0 commit comments