3 ms·
Cool, good to know! Another interesting example is: bool f(bool b) { int x; try { if (b) { x = 2; throw 0; } x = 4;
by cokernel_hacker 10y ago
Cool, good to know!
Another interesting example is:
bool f(bool b) {
int x;
try {
if (b) {
x = 2;
throw 0;
}
x = 4;
throw 0.0;
} catch (...) {
}
return x & 1;
}
Here, a phi is needed on the catch.
Out of curiosity, can you give details regarding how your EH representation looks like in SSA?
- gratilup 10y agoThe EH info looks the same when in SSA form - when building SSA the right PHIs are inserted for the values potentially defined in EH blocks.