@@ -122,8 +122,6 @@ module SemanticExprConfig {
122122 dominator .dominates ( dominated )
123123 }
124124
125- predicate hasDominanceInformation ( BasicBlock block ) { any ( ) }
126-
127125 private predicate id ( Cpp:: Locatable x , Cpp:: Locatable y ) { x = y }
128126
129127 private predicate idOf ( Cpp:: Locatable x , int y ) = equivalenceRelation( id / 2 ) ( x , y )
@@ -132,17 +130,7 @@ module SemanticExprConfig {
132130
133131 newtype TSsaVariable =
134132 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- }
133+ TSsaOperand ( IR:: Operand op ) { op .isDefinitionInexact ( ) }
146134
147135 class SsaVariable extends TSsaVariable {
148136 string toString ( ) { none ( ) }
@@ -151,8 +139,6 @@ module SemanticExprConfig {
151139
152140 IR:: Instruction asInstruction ( ) { none ( ) }
153141
154- ValueNumber asPointerArithGuard ( ) { none ( ) }
155-
156142 IR:: Operand asOperand ( ) { none ( ) }
157143 }
158144
@@ -168,18 +154,6 @@ module SemanticExprConfig {
168154 final override IR:: Instruction asInstruction ( ) { result = instr }
169155 }
170156
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-
183157 class SsaOperand extends SsaVariable , TSsaOperand {
184158 IR:: Operand op ;
185159
@@ -212,11 +186,7 @@ module SemanticExprConfig {
212186 )
213187 }
214188
215- Expr getAUse ( SsaVariable v ) {
216- result .( IR:: LoadInstruction ) .getSourceValue ( ) = v .asInstruction ( )
217- or
218- result = v .asPointerArithGuard ( ) .getAnInstruction ( )
219- }
189+ Expr getAUse ( SsaVariable v ) { result .( IR:: LoadInstruction ) .getSourceValue ( ) = v .asInstruction ( ) }
220190
221191 SemType getSsaVariableType ( SsaVariable v ) {
222192 result = getSemanticType ( v .asInstruction ( ) .getResultIRType ( ) )
@@ -255,10 +225,7 @@ module SemanticExprConfig {
255225 final override Location getLocation ( ) { result = block .getLocation ( ) }
256226
257227 final override predicate hasRead ( SsaVariable v ) {
258- exists ( IR:: Operand operand |
259- operand .getDef ( ) = v .asInstruction ( ) or
260- operand .getDef ( ) = v .asPointerArithGuard ( ) .getAnInstruction ( )
261- |
228+ exists ( IR:: Operand operand | operand .getDef ( ) = v .asInstruction ( ) |
262229 not operand instanceof IR:: PhiInputOperand and
263230 operand .getUse ( ) .getBlock ( ) = block
264231 )
@@ -276,10 +243,7 @@ module SemanticExprConfig {
276243 final override Location getLocation ( ) { result = succ .getLocation ( ) }
277244
278245 final override predicate hasRead ( SsaVariable v ) {
279- exists ( IR:: PhiInputOperand operand |
280- operand .getDef ( ) = v .asInstruction ( ) or
281- operand .getDef ( ) = v .asPointerArithGuard ( ) .getAnInstruction ( )
282- |
246+ exists ( IR:: PhiInputOperand operand | operand .getDef ( ) = v .asInstruction ( ) |
283247 operand .getPredecessorBlock ( ) = pred and
284248 operand .getUse ( ) .getBlock ( ) = succ
285249 )
0 commit comments