fn mk_fake_predecessors(
basic_blocks: &IndexVec<BasicBlock, BasicBlockData<'_>>,
) -> IndexVec<BasicBlock, usize>
Expand description
The FalseEdge/imaginary_target
edges mess up the is_join_point
computation which creates spurious
join points that lose information e.g. in match arms, the k+1-th arm has the k-th arm as a “fake”
predecessor so we lose the assumptions specific to the k+1-th arm due to a spurious join. This code
corrects for this problem by computing the number of “fake” predecessors and decreasing them from
the total number of “predecessors” returned by rustc
. The option is to recompute “predecessors”
from scratch but we may miss some cases there. (see also is_join_point
)