forked from OSchip/llvm-project
[BOLT] Fix issue printing CTCs without annotations
Summary: After stripping annotations, conditional tail calls no longer can be identified by their corresponding tag. We can check the number of basic block successors instead. Fixes facebookincubator/BOLT#58. (cherry picked from FBD16444718)
This commit is contained in:
parent
fde5a2b470
commit
2c9c6b164b
|
@ -222,8 +222,9 @@ DynoStats getDynoStats(const BinaryFunction &BF) {
|
|||
continue;
|
||||
}
|
||||
|
||||
// CTCs
|
||||
if (BC.MIB->getConditionalTailCall(*CondBranch)) {
|
||||
// CTCs: instruction annotations could be stripped, hence check the number
|
||||
// of successors to identify conditional tail calls.
|
||||
if (BB->succ_size() == 1) {
|
||||
if (BB->branch_info_begin() != BB->branch_info_end())
|
||||
Stats[DynoStats::UNCOND_BRANCHES] += BB->branch_info_begin()->Count;
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue