Since call instructions in LLVM don't terminate basic blocks, the decision was originally made to split blocks after call instructions, in order to treat all blocks uniformly. This is not currently done. The fact that the two categories of basic blocks draw their predecessors from different locations—normal predecessors within the function vs. return blocks of called functions—is not hidden from InstrumentBasicBlocks and results in a lot of branching, negatively impacting readability.
Call instructions are already handled separately, all in one go, after basic block instrumentation. It would be easier and more readable to not split after call instructions but instead instrument both before and after them, with a clear notion of "this is control flow between functions".
Since call instructions in LLVM don't terminate basic blocks, the decision was originally made to split blocks after call instructions, in order to treat all blocks uniformly. This is not currently done. The fact that the two categories of basic blocks draw their predecessors from different locations—normal predecessors within the function vs. return blocks of called functions—is not hidden from
InstrumentBasicBlocksand results in a lot of branching, negatively impacting readability.Call instructions are already handled separately, all in one go, after basic block instrumentation. It would be easier and more readable to not split after call instructions but instead instrument both before and after them, with a clear notion of "this is control flow between functions".