82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
// bool or
ForType< bool >( []( auto&& lhs, auto&& rhs ) -> Value
{
// Build a CFG that implements the control flow for
// shortcut evaluation.
auto cfg = make_shared< CFG >();
auto pLhsBB = cfg->entryBB();
auto pRhsBB = cfg->createBB();
auto pEndBB = cfg->createBB();
// If the lhs is true, skip to the end directly.
// Otherwise, jump to the BB that computes rhs.
pLhsBB->setTerminator( CondBranch( lhs, pEndBB, pRhsBB ) );
|
>
|
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
// bool or
ForType< bool >( []( auto&& lhs, auto&& rhs ) -> Value
{
// Build a CFG that implements the control flow for
// shortcut evaluation.
auto cfg = make_shared< CFG >();
cfg->createBB();
auto pLhsBB = cfg->entryBB();
auto pRhsBB = cfg->createBB();
auto pEndBB = cfg->createBB();
// If the lhs is true, skip to the end directly.
// Otherwise, jump to the BB that computes rhs.
pLhsBB->setTerminator( CondBranch( lhs, pEndBB, pRhsBB ) );
|
148
149
150
151
152
153
154
155
156
157
158
159
160
161
|
// bool and
ForType< bool >( []( auto&& lhs, auto&& rhs ) -> Value
{
// Build a CFG that implements the control flow for
// shortcut evaluation.
auto cfg = make_shared< CFG >();
auto pLhsBB = cfg->entryBB();
auto pRhsBB = cfg->createBB();
auto pEndBB = cfg->createBB();
// If the lhs is false, skip to the end directly.
// Otherwise, jump to the BB that computes rhs.
pLhsBB->setTerminator( CondBranch( lhs, pRhsBB, pEndBB ) );
|
>
|
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
// bool and
ForType< bool >( []( auto&& lhs, auto&& rhs ) -> Value
{
// Build a CFG that implements the control flow for
// shortcut evaluation.
auto cfg = make_shared< CFG >();
cfg->createBB();
auto pLhsBB = cfg->entryBB();
auto pRhsBB = cfg->createBB();
auto pEndBB = cfg->createBB();
// If the lhs is false, skip to the end directly.
// Otherwise, jump to the BB that computes rhs.
pLhsBB->setTerminator( CondBranch( lhs, pRhsBB, pEndBB ) );
|