6 ms·
Jump threading can also enables additional optimizations. For instance, if you apply jump threading to int eight(int a) { int b; if (a) { b = 1
by UniQP 11y ago
Jump threading can also enables additional optimizations. For instance, if you apply jump threading to
int eight(int a) {
int b;
if (a) {
b = 1;
} else {
b = a;
}
b += 3;
if (a) {
return b + b;
} else {
return b + 5;
}
}
you duplicate the "b += 3;" but both branches can be optimized afterwards. In fact, the function always returns 8.