<div dir="ltr">Hello all! (I apologize if I've ended up in the wrong list!)<br><br>I'm trying to get a better understanding of LLVM's critical edge splitting, as documented in `Transforms/Utils/BasicBlockUtils.h`; specifically in the case of critical edges which are indirect transfer.<br><br>The code comments discuss the following example: a CFG with direct edges A->D, B->D, and an indirect critical edge I->D; in this case two identical "dummy" nodes D0A and D0B would be inserted before D, and the edges would be re-routed as such: A->D0A, B->D0A, I->D0B, and D0A/D0B would just be direct jumps to D. <br><br>What I'm not understanding is why it is necessary to split the non-critical edges A->D and B->D? It seems like I->D0B would handle the only edge causing us trouble in this example; since A and B are direct transfer, couldn't their jump targets just remain the original D? <br><br>Also, the comments hint that this is only possible in some "easy cases". I'm guessing this means when D has at most one incoming indirect critical edge?<br><br>Any explanation would be greatly appreciated!<br><br>Thanks,<br>-Stefan<br>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div>Stefan Nagy</div><div>Department of Computer Science</div><div>Virginia Tech<br></div></div></div></div></div></div></div>