@@ -130,7 +130,7 @@ module SemanticExprConfig {
130
130
131
131
newtype TSsaVariable =
132
132
TSsaInstruction ( IR:: Instruction instr ) { instr .hasMemoryResult ( ) } or
133
- TSsaOperand ( IR:: Operand op ) { op .isDefinitionInexact ( ) }
133
+ TSsaOperand ( IR:: PhiInputOperand op ) { op .isDefinitionInexact ( ) }
134
134
135
135
class SsaVariable extends TSsaVariable {
136
136
string toString ( ) { none ( ) }
@@ -139,7 +139,7 @@ module SemanticExprConfig {
139
139
140
140
IR:: Instruction asInstruction ( ) { none ( ) }
141
141
142
- IR:: Operand asOperand ( ) { none ( ) }
142
+ IR:: PhiInputOperand asOperand ( ) { none ( ) }
143
143
}
144
144
145
145
class SsaInstructionVariable extends SsaVariable , TSsaInstruction {
@@ -155,15 +155,15 @@ module SemanticExprConfig {
155
155
}
156
156
157
157
class SsaOperand extends SsaVariable , TSsaOperand {
158
- IR:: Operand op ;
158
+ IR:: PhiInputOperand op ;
159
159
160
160
SsaOperand ( ) { this = TSsaOperand ( op ) }
161
161
162
162
final override string toString ( ) { result = op .toString ( ) }
163
163
164
164
final override Location getLocation ( ) { result = op .getLocation ( ) }
165
165
166
- final override IR:: Operand asOperand ( ) { result = op }
166
+ final override IR:: PhiInputOperand asOperand ( ) { result = op }
167
167
}
168
168
169
169
predicate explicitUpdate ( SsaVariable v , Expr sourceExpr ) {
@@ -190,12 +190,14 @@ module SemanticExprConfig {
190
190
191
191
SemType getSsaVariableType ( SsaVariable v ) {
192
192
result = getSemanticType ( v .asInstruction ( ) .getResultIRType ( ) )
193
+ or
194
+ result = getSemanticType ( v .asOperand ( ) .getUse ( ) .getResultIRType ( ) )
193
195
}
194
196
195
197
BasicBlock getSsaVariableBasicBlock ( SsaVariable v ) {
196
198
result = v .asInstruction ( ) .getBlock ( )
197
199
or
198
- result = v .asOperand ( ) .getUse ( ) .getBlock ( )
200
+ result = v .asOperand ( ) .getAnyDef ( ) .getBlock ( )
199
201
}
200
202
201
203
/** Holds if `inp` is an input to the phi node along the edge originating in `bb`. */
0 commit comments