Goose  Diff

Differences From Artifact [89b31d6990]:

  • File bs/builtins/operators/logic.cpp — part of check-in [2628782ef2] at 2019-09-29 20:30:08 on branch trunk — Added a specific llr instruction for 'not' for the sake of constructing z3 expressions. (user: achavasse size: 10182)

To Artifact [a41ab23a5d]:

  • File bs/builtins/operators/logic.cpp — part of check-in [3ae3c0b3ad] at 2019-10-05 13:58:40 on branch trunk — Implemented the conversion of GetVar/SetVar/GetTemporary/SetTemporary to z3 expressions. (user: achavasse size: 10278)

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 ) );
                } )