Skip to content

Commit 1564b82

Browse files
committed
add description of updateCycleLoopInfo
1 parent 5efb1ee commit 1564b82

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

llvm/lib/Transforms/Utils/ControlFlowUtils.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,14 @@ std::pair<BasicBlock *, bool> ControlFlowHub::finalize(
346346
return {FirstGuardBlock, true};
347347
}
348348

349+
/// Helper function to update the cycle or loop information after inserting a
350+
/// new block between a callbr instruction and one of its target blocks. Adds
351+
/// the new block to the innermost cycle or loop that the callbr instruction and
352+
/// the original target block share.
353+
/// \p LCI cycle or loop information to update
354+
/// \p CallBrBlock block containing the callbr instruction
355+
/// \p CallBrTarget new target block of the callbr instruction
356+
/// \p Succ original target block of the callbr instruction
349357
template <typename TI, typename T>
350358
static bool updateCycleLoopInfo(TI *LCI, BasicBlock *CallBrBlock,
351359
BasicBlock *CallBrTarget, BasicBlock *Succ) {

0 commit comments

Comments
 (0)