From c361741a271db0330f17dbebec18dcb4779a6252 Mon Sep 17 00:00:00 2001 From: Philip Reames Date: Tue, 14 Mar 2023 14:05:00 -0700 Subject: [BasicBlockUtils] Expose an internal utility in API [nfc] Shrinking a patch about to be posted for review. --- llvm/lib/Transforms/Utils/BasicBlockUtils.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'llvm/lib/Transforms/Utils/BasicBlockUtils.cpp') diff --git a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp index 2d1be2c..f0e2465 100644 --- a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp +++ b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp @@ -1600,12 +1600,8 @@ void llvm::SplitBlockAndInsertIfThenElse(Value *Cond, Instruction *SplitBefore, } } -/// Insert a for (int i = 0; i < End; i++) loop structure (with the exception -/// that \p End is assumed > 0, and thus not checked on entry) at \p -/// SplitBefore. Returns the first insert point in the loop body, and the -/// PHINode for the induction variable (i.e. "i" above). -static std::pair -SplitBlockAndInsertSimpleForLoop(Value *End, Instruction *SplitBefore) { +std::pair +llvm::SplitBlockAndInsertSimpleForLoop(Value *End, Instruction *SplitBefore) { BasicBlock *LoopPred = SplitBefore->getParent(); BasicBlock *LoopBody = SplitBlock(SplitBefore->getParent(), SplitBefore); BasicBlock *LoopExit = SplitBlock(SplitBefore->getParent(), SplitBefore); -- cgit v1.1