You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BOLT does not have support for noreturn functions. Because of this, BOLT assumes that the call to the noreturn function will return, and execution will continue, and adds the following BasicBlock to the successors list.
Take this example:
#include<iostream>__attribute__((noinline, noreturn)) void my_error() {
std::abort();
}
intmain() {
int a = 10;
if (a < 20) {
my_error();
} else {
std::cout << a << std::endl;
}
return0;
}
We can see that the BB starting at a8c is the target of a conditional jump, and it is placed under the BL by the compiler on the assumption, that my_error does not return.
The text was updated successfully, but these errors were encountered:
BOLT does not have support for noreturn functions. Because of this, BOLT assumes that the call to the noreturn function will return, and execution will continue, and adds the following BasicBlock to the successors list.
Take this example:
Compile it:
(I am compiling for aarch64, but the issue is the same regardless of the architecture).
Looking at the BasicBlocks:
BB containing the call to
my_error
The following BB, which is in the successors list:
This is after the call to
my_error
, but it should not be in the successors list.We can also look at the disassembly of the whole main function:
We can see that the BB starting at
a8c
is the target of a conditional jump, and it is placed under theBL
by the compiler on the assumption, thatmy_error
does not return.The text was updated successfully, but these errors were encountered: