@@ -132,17 +132,7 @@ module SemanticExprConfig {
132
132
133
133
newtype TSsaVariable =
134
134
TSsaInstruction ( IR:: Instruction instr ) { instr .hasMemoryResult ( ) } or
135
- TSsaOperand ( IR:: Operand op ) { op .isDefinitionInexact ( ) } or
136
- TSsaPointerArithmeticGuard ( ValueNumber instr ) {
137
- exists ( Guard g , IR:: Operand use |
138
- use = instr .getAUse ( ) and use .getIRType ( ) instanceof IR:: IRAddressType
139
- |
140
- g .comparesLt ( use , _, _, _, _) or
141
- g .comparesLt ( _, use , _, _, _) or
142
- g .comparesEq ( use , _, _, _, _) or
143
- g .comparesEq ( _, use , _, _, _)
144
- )
145
- }
135
+ TSsaOperand ( IR:: Operand op ) { op .isDefinitionInexact ( ) }
146
136
147
137
class SsaVariable extends TSsaVariable {
148
138
string toString ( ) { none ( ) }
@@ -151,8 +141,6 @@ module SemanticExprConfig {
151
141
152
142
IR:: Instruction asInstruction ( ) { none ( ) }
153
143
154
- ValueNumber asPointerArithGuard ( ) { none ( ) }
155
-
156
144
IR:: Operand asOperand ( ) { none ( ) }
157
145
}
158
146
@@ -168,18 +156,6 @@ module SemanticExprConfig {
168
156
final override IR:: Instruction asInstruction ( ) { result = instr }
169
157
}
170
158
171
- class SsaPointerArithmeticGuard extends SsaVariable , TSsaPointerArithmeticGuard {
172
- ValueNumber vn ;
173
-
174
- SsaPointerArithmeticGuard ( ) { this = TSsaPointerArithmeticGuard ( vn ) }
175
-
176
- final override string toString ( ) { result = vn .toString ( ) }
177
-
178
- final override Location getLocation ( ) { result = vn .getLocation ( ) }
179
-
180
- final override ValueNumber asPointerArithGuard ( ) { result = vn }
181
- }
182
-
183
159
class SsaOperand extends SsaVariable , TSsaOperand {
184
160
IR:: Operand op ;
185
161
@@ -212,11 +188,7 @@ module SemanticExprConfig {
212
188
)
213
189
}
214
190
215
- Expr getAUse ( SsaVariable v ) {
216
- result .( IR:: LoadInstruction ) .getSourceValue ( ) = v .asInstruction ( )
217
- or
218
- result = v .asPointerArithGuard ( ) .getAnInstruction ( )
219
- }
191
+ Expr getAUse ( SsaVariable v ) { result .( IR:: LoadInstruction ) .getSourceValue ( ) = v .asInstruction ( ) }
220
192
221
193
SemType getSsaVariableType ( SsaVariable v ) {
222
194
result = getSemanticType ( v .asInstruction ( ) .getResultIRType ( ) )
@@ -255,10 +227,7 @@ module SemanticExprConfig {
255
227
final override Location getLocation ( ) { result = block .getLocation ( ) }
256
228
257
229
final override predicate hasRead ( SsaVariable v ) {
258
- exists ( IR:: Operand operand |
259
- operand .getDef ( ) = v .asInstruction ( ) or
260
- operand .getDef ( ) = v .asPointerArithGuard ( ) .getAnInstruction ( )
261
- |
230
+ exists ( IR:: Operand operand | operand .getDef ( ) = v .asInstruction ( ) |
262
231
not operand instanceof IR:: PhiInputOperand and
263
232
operand .getUse ( ) .getBlock ( ) = block
264
233
)
@@ -276,10 +245,7 @@ module SemanticExprConfig {
276
245
final override Location getLocation ( ) { result = succ .getLocation ( ) }
277
246
278
247
final override predicate hasRead ( SsaVariable v ) {
279
- exists ( IR:: PhiInputOperand operand |
280
- operand .getDef ( ) = v .asInstruction ( ) or
281
- operand .getDef ( ) = v .asPointerArithGuard ( ) .getAnInstruction ( )
282
- |
248
+ exists ( IR:: PhiInputOperand operand | operand .getDef ( ) = v .asInstruction ( ) |
283
249
operand .getPredecessorBlock ( ) = pred and
284
250
operand .getUse ( ) .getBlock ( ) = succ
285
251
)
0 commit comments