105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
2, cfg->uniqueId(), resultIndex );
// If coming directly from the lhs BB, we know the result is true.
phi.setIncoming( pLhsBB, ToValue( true ) );
// Otherwise, the result is whatever was computed by the rhs block.
phi.setIncoming( pRhsBB, BuildComputedValue( GetValueType< bool >(),
GetTemporary( cfg->uniqueId(), rhsIndex ) ) );
pEndBB->emplace_back( move( phi ) );
// Build the result val which pulls the temporary created by the
// cfg above.
auto resultVal = BuildComputedValue( GetValueType< bool >(),
GetTemporary( cfg->uniqueId(), resultIndex ) );
// Return it
pEndBB->setTerminator( Ret( move( resultVal ) ) );
// Pachage our cfg in a value with an inline CFG instruction.
return BuildComputedValue( GetValueType< bool >(), move( cfg ) );
} )
|
|
|
|
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
2, cfg->uniqueId(), resultIndex );
// If coming directly from the lhs BB, we know the result is true.
phi.setIncoming( pLhsBB, ToValue( true ) );
// Otherwise, the result is whatever was computed by the rhs block.
phi.setIncoming( pRhsBB, BuildComputedValue( GetValueType< bool >(),
GetTemporary( GetValueType< bool >(), cfg->uniqueId(), rhsIndex ) ) );
pEndBB->emplace_back( move( phi ) );
// Build the result val which pulls the temporary created by the
// cfg above.
auto resultVal = BuildComputedValue( GetValueType< bool >(),
GetTemporary( GetValueType< bool >(), cfg->uniqueId(), resultIndex ) );
// Return it
pEndBB->setTerminator( Ret( move( resultVal ) ) );
// Pachage our cfg in a value with an inline CFG instruction.
return BuildComputedValue( GetValueType< bool >(), move( cfg ) );
} )
|
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
|
2, cfg->uniqueId(), resultIndex );
// If coming directly from the lhs BB, we know the result is false.
phi.setIncoming( pLhsBB, ToValue( false ) );
// Otherwise, the result is whatever was computed by the rhs block.
phi.setIncoming( pRhsBB, BuildComputedValue( GetValueType< bool >(),
GetTemporary( cfg->uniqueId(), rhsIndex ) ) );
pEndBB->emplace_back( move( phi ) );
// Build the result val which pulls the temporary created by the
// cfg above.
auto resultVal = BuildComputedValue( GetValueType< bool >(),
GetTemporary( cfg->uniqueId(), resultIndex ) );
// Return it
pEndBB->setTerminator( Ret( move( resultVal ) ) );
// Pachage our cfg in a value with an inline CFG instruction.
return BuildComputedValue( GetValueType< bool >(), move( cfg ) );
} )
|
|
|
|
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
|
2, cfg->uniqueId(), resultIndex );
// If coming directly from the lhs BB, we know the result is false.
phi.setIncoming( pLhsBB, ToValue( false ) );
// Otherwise, the result is whatever was computed by the rhs block.
phi.setIncoming( pRhsBB, BuildComputedValue( GetValueType< bool >(),
GetTemporary( GetValueType< bool >(), cfg->uniqueId(), rhsIndex ) ) );
pEndBB->emplace_back( move( phi ) );
// Build the result val which pulls the temporary created by the
// cfg above.
auto resultVal = BuildComputedValue( GetValueType< bool >(),
GetTemporary( GetValueType< bool >(), cfg->uniqueId(), resultIndex ) );
// Return it
pEndBB->setTerminator( Ret( move( resultVal ) ) );
// Pachage our cfg in a value with an inline CFG instruction.
return BuildComputedValue( GetValueType< bool >(), move( cfg ) );
} )
|