43 #define DEBUG_TYPE "loop-unroll" 46 STATISTIC(NumCompletelyUnrolled,
"Number of loops completely unrolled");
47 STATISTIC(NumUnrolled,
"Number of loops unrolled (completely or otherwise)");
48 STATISTIC(NumUnrolledWithHeader,
"Number of loops unrolled without a " 49 "conditional latch (completely or otherwise)");
53 cl::desc(
"Allow runtime unrolled loops to be unrolled " 54 "with epilog instead of prolog."));
58 cl::desc(
"Verify domtree after unrolling"),
59 #ifdef EXPENSIVE_CHECKS
74 if (
auto *V = dyn_cast<MetadataAsValue>(Op))
75 if (
auto *Unwrapped = dyn_cast<ValueAsMetadata>(V->getMetadata())) {
76 Op = Unwrapped->getValue();
90 if (
PHINode *PN = dyn_cast<PHINode>(I)) {
91 for (
unsigned i = 0,
e = PN->getNumIncomingValues(); i !=
e; ++i) {
94 PN->setIncomingBlock(i, cast<BasicBlock>(It->
second));
114 for (
Use &U :
I.operands()) {
115 if (
auto Def = dyn_cast<Instruction>(U)) {
137 assert(OldLoop &&
"Should (at least) be in the loop being unrolled!");
139 Loop *&NewLoop = NewLoops[OldLoop];
143 "Header should be first in RPO");
153 NewLoop->addBasicBlockToLoop(ClonedBB, *LI);
189 assert(PreHeader && Header);
191 if (isa<ConstantInt>(PN.getIncomingValueForBlock(PreHeader)))
204 if (SE && SimplifyIVs) {
210 while (!DeadInsts.
empty())
212 dyn_cast_or_null<Instruction>(&*DeadInsts.
pop_back_val()))
228 BB->getInstList().erase(Inst);
281 bool PreserveLCSSA,
Loop **RemainderLoop) {
285 LLVM_DEBUG(
dbgs() <<
" Can't unroll; loop preheader-insertion failed.\n");
291 LLVM_DEBUG(
dbgs() <<
" Can't unroll; loop exit-block-insertion failed.\n");
297 LLVM_DEBUG(
dbgs() <<
" Can't unroll; Loop body cannot be cloned.\n");
313 LLVM_DEBUG(
dbgs() <<
" Can't unroll; loop not terminated by a conditional " 314 "branch in the latch or header.\n");
318 auto CheckLatchSuccessors = [&](
unsigned S1,
unsigned S2) {
319 return BI->isConditional() && BI->getSuccessor(S1) == Header &&
324 if (BI && BI->isConditional() && !CheckLatchSuccessors(0, 1) &&
325 !CheckLatchSuccessors(1, 0)) {
327 dbgs() <<
"Can't unroll; a conditional latch must exit the loop");
331 auto CheckHeaderSuccessors = [&](
unsigned S1,
unsigned S2) {
338 if (BI && !BI->isConditional() && HeaderBI && HeaderBI->
isConditional() &&
339 !CheckHeaderSuccessors(0, 1) && !CheckHeaderSuccessors(1, 0)) {
340 LLVM_DEBUG(
dbgs() <<
"Can't unroll; conditional header must exit the loop");
347 dbgs() <<
" Won't unroll loop: address of header block is taken.\n");
375 std::vector<BasicBlock*> OriginalLoopBlocks = L->
getBlocks();
383 bool NeedToFixLCSSA = PreserveLCSSA && CompletelyUnroll &&
385 return isa<PHINode>(BB->
begin());
391 bool RuntimeTripCount =
395 "Did not expect runtime trip-count unrolling " 396 "and peeling for the same loop");
409 assert(ExitingBlock &&
"Loop without exiting block?");
421 bool HasConvergent =
false;
422 for (
auto &BB : L->
blocks())
425 HasConvergent |= CS.isConvergent();
427 "Unroll count must divide trip multiple if loop contains a " 428 "convergent operation.");
431 bool EpilogProfitability =
439 PreserveLCSSA, RemainderLoop)) {
441 RuntimeTripCount =
false;
444 "generated when assuming runtime trip count\n");
450 unsigned BreakoutTrip = 0;
462 if (CompletelyUnroll) {
464 <<
" with trip count " << ULO.
TripCount <<
"!\n");
469 <<
"completely unrolled loop with " 470 <<
NV(
"UnrollCount", ULO.
TripCount) <<
" iterations";
474 <<
" with iteration count " << ULO.
PeelCount <<
"!\n");
479 <<
" peeled loop by " <<
NV(
"PeelCount", ULO.
PeelCount)
483 auto DiagBuilder = [&]() {
486 return Diag <<
"unrolled loop by a factor of " 487 <<
NV(
"UnrollCount", ULO.
Count);
493 LLVM_DEBUG(
dbgs() <<
" with a breakout at trip " << BreakoutTrip);
496 return DiagBuilder() <<
" with a breakout at trip " 497 <<
NV(
"BreakoutTrip", BreakoutTrip);
505 <<
" trips per branch";
507 }
else if (RuntimeTripCount) {
511 [&]() {
return DiagBuilder() <<
" with run-time trip count"; });
532 bool LatchIsExiting = BI->isConditional();
534 if (LatchIsExiting) {
535 ContinueOnTrue = L->
contains(BI->getSuccessor(0));
536 LoopExit = BI->getSuccessor(ContinueOnTrue);
538 NumUnrolledWithHeader++;
546 std::vector<PHINode*> OrigPHINode;
548 OrigPHINode.push_back(cast<PHINode>(
I));
551 std::vector<BasicBlock *> Headers;
552 std::vector<BasicBlock *> HeaderSucc;
553 std::vector<BasicBlock *> Latches;
554 Headers.push_back(Header);
555 Latches.push_back(LatchBlock);
557 if (!LatchIsExiting) {
559 if (Term->isUnconditional() || L->
contains(Term->getSuccessor(0))) {
561 HeaderSucc.push_back(Term->getSuccessor(0));
564 HeaderSucc.push_back(Term->getSuccessor(1));
578 std::vector<BasicBlock*> UnrolledLoopBlocks = L->
getBlocks();
585 for (
Loop *SubLoop : *L)
586 LoopsToSimplify.
insert(SubLoop);
591 if (!isa<DbgInfoIntrinsic>(&
I))
593 auto NewDIL = DIL->cloneByMultiplyingDuplicationFactor(ULO.
Count);
595 I.setDebugLoc(NewDIL.getValue());
598 <<
"Failed to create new discriminator: " 599 << DIL->getFilename() <<
" Line: " << DIL->getLine());
602 for (
unsigned It = 1; It != ULO.
Count; ++It) {
603 std::vector<BasicBlock*> NewBlocks;
613 "Header should not be in a sub-loop");
617 LoopsToSimplify.
insert(NewLoops[OldLoop]);
622 for (
PHINode *OrigPHI : OrigPHINode) {
623 PHINode *NewPHI = cast<PHINode>(VMap[OrigPHI]);
625 if (
Instruction *InValI = dyn_cast<Instruction>(InVal))
626 if (It > 1 && L->contains(InValI))
627 InVal = LastValueMap[InValI];
628 VMap[OrigPHI] = InVal;
633 LastValueMap[*BB] = New;
636 LastValueMap[
VI->first] =
VI->second;
640 if (L->contains(Succ))
642 for (
PHINode &PHI : Succ->phis()) {
643 Value *Incoming = PHI.getIncomingValueForBlock(*BB);
645 if (It != LastValueMap.
end())
647 PHI.addIncoming(Incoming, New);
653 Headers.push_back(New);
654 if (*BB == LatchBlock)
655 Latches.push_back(New);
659 if (Pred == Header) {
660 HeaderSucc.push_back(New);
664 NewBlocks.push_back(New);
665 UnrolledLoopBlocks.push_back(New);
675 auto BBDomNode = DT->
getNode(*BB);
676 auto BBIDom = BBDomNode->
getIDom();
677 BasicBlock *OriginalBBIDom = BBIDom->getBlock();
679 New, cast<BasicBlock>(LastValueMap[cast<Value>(OriginalBBIDom)]));
688 if (
auto *II = dyn_cast<IntrinsicInst>(&
I))
689 if (II->getIntrinsicID() == Intrinsic::assume)
696 for (
PHINode *PN : OrigPHINode) {
697 if (CompletelyUnroll) {
698 PN->replaceAllUsesWith(PN->getIncomingValueForBlock(Preheader));
700 }
else if (ULO.
Count > 1) {
701 Value *InVal = PN->removeIncomingValue(LatchBlock,
false);
704 if (
Instruction *InValI = dyn_cast<Instruction>(InVal)) {
705 if (L->contains(InValI))
706 InVal = LastValueMap[InVal];
708 assert(Latches.back() == LastValueMap[LatchBlock] &&
"bad last latch");
709 PN->addIncoming(InVal, Latches.back());
716 bool NeedConditional) {
717 auto *Term = cast<BranchInst>(Src->getTerminator());
718 if (NeedConditional) {
721 Term->setSuccessor(!ContinueOnTrue, Dest);
724 if (Dest != LoopExit) {
729 if (Succ == BlockInLoop)
731 for (
PHINode &Phi : Succ->phis())
732 Phi.removeIncomingValue(BB,
false);
737 Term->eraseFromParent();
743 if (LatchIsExiting) {
746 for (
unsigned i = 0,
e = Latches.size(); i !=
e; ++i) {
748 unsigned j = (i + 1) %
e;
750 bool NeedConditional =
true;
752 if (RuntimeTripCount && j != 0) {
753 NeedConditional =
false;
758 if (CompletelyUnroll) {
765 "NeedCondition cannot be modified by both complete " 766 "unrolling and runtime unrolling");
769 }
else if (j != BreakoutTrip &&
773 NeedConditional =
false;
776 setDest(Latches[i], Dest, Headers, Headers[i], NeedConditional);
781 for (
unsigned i = 0,
e = Headers.size(); i !=
e; ++i) {
783 unsigned j = (i + 1) %
e;
785 bool NeedConditional =
true;
787 if (RuntimeTripCount && j != 0)
788 NeedConditional =
false;
790 if (CompletelyUnroll)
794 else if (j != BreakoutTrip &&
798 NeedConditional =
false;
800 setDest(Headers[i], Dest, Headers, HeaderSucc[i], NeedConditional);
806 for (
unsigned i = 0,
e = Latches.size(); i !=
e; ++i) {
808 BranchInst *Term = cast<BranchInst>(Latches[i]->getTerminator());
811 unsigned j = (i + 1) %
e;
815 if (CompletelyUnroll && j == 0)
829 if (DT && ULO.
Count > 1) {
830 for (
auto *BB : OriginalLoopBlocks) {
831 auto *BBDomNode = DT->
getNode(BB);
833 for (
auto *ChildDomNode : BBDomNode->getChildren()) {
834 auto *ChildBB = ChildDomNode->getBlock();
835 if (!L->contains(ChildBB))
839 BasicBlock *&TermBlock = LatchIsExiting ? LatchBlock : Header;
840 auto &TermBlocks = LatchIsExiting ? Latches : Headers;
841 if (BB == TermBlock) {
851 NewIDom = TermBlocks.
back();
854 if (isa<BranchInst>(Term) && cast<BranchInst>(Term)->isConditional()) {
866 for (
auto *ChildBB : ChildrenToUpdate)
879 (CompletelyUnroll && !LatchIsExiting && Latch == Latches.back())) &&
880 "Need a branch as terminator, except when fully unrolling with " 881 "unconditional latch");
887 std::replace(Latches.begin(), Latches.end(), Dest, Fold);
888 UnrolledLoopBlocks.erase(
std::remove(UnrolledLoopBlocks.begin(),
889 UnrolledLoopBlocks.end(), Dest),
890 UnrolledLoopBlocks.end());
895 DT = &DTU.getDomTree();
902 NumCompletelyUnrolled += CompletelyUnroll;
907 if (CompletelyUnroll)
918 if (PreserveLCSSA && OuterL && CompletelyUnroll && !NeedToFixLCSSA)
930 if (NeedToFixLCSSA) {
935 Loop *FixLCSSALoop = OuterL;
936 if (!FixLCSSALoop->
contains(LatchLoop))
941 }
else if (PreserveLCSSA) {
943 "Loops should be in LCSSA form after loop-unroll.");
948 simplifyLoop(OuterL, DT, LI, SE, AC,
nullptr, PreserveLCSSA);
951 for (
Loop *SubLoop : LoopsToSimplify)
952 simplifyLoop(SubLoop, DT, LI, SE, AC,
nullptr, PreserveLCSSA);
unsigned getSmallConstantTripCount(const Loop *L)
Returns the maximum trip count of the loop if it is a single-exit loop and we can compute a small max...
SymbolTableList< Instruction >::iterator eraseFromParent()
This method unlinks 'this' from the containing basic block and deletes it.
A parsed version of the target data layout string in and methods for querying it. ...
bool simplifyLoop(Loop *L, DominatorTree *DT, LoopInfo *LI, ScalarEvolution *SE, AssumptionCache *AC, MemorySSAUpdater *MSSAU, bool PreserveLCSSA)
Simplify each loop in a loop nest recursively.
BlockT * getLoopLatch() const
If there is a single latch block for this loop, return it.
unsigned getSmallConstantTripMultiple(const Loop *L)
Returns the largest constant divisor of the trip count of the loop if it is a single-exit loop and we...
DiagnosticInfoOptimizationBase::Argument NV
uint64_t GreatestCommonDivisor64(uint64_t A, uint64_t B)
iterator erase(iterator where)
static bool needToInsertPhisForLCSSA(Loop *L, std::vector< BasicBlock *> Blocks, LoopInfo *LI)
Check if unrolling created a situation where we need to insert phi nodes to preserve LCSSA form...
This class represents lattice values for constants.
amdgpu Simplify well known AMD library false FunctionCallee Value const Twine & Name
std::error_code remove(const Twine &path, bool IgnoreNonExisting=true)
Remove path.
bool isLCSSAForm(DominatorTree &DT) const
Return true if the Loop is in LCSSA form.
void push_back(const T &Elt)
The main scalar evolution driver.
BlockT * getLoopPreheader() const
If there is a preheader for this loop, return it.
A cache of @llvm.assume calls within a function.
LLVMContext & getContext() const
All values hold a context through their type.
NodeT * findNearestCommonDominator(NodeT *A, NodeT *B) const
findNearestCommonDominator - Find nearest common dominator basic block for basic block A and B...
BasicBlock * getSuccessor(unsigned i) const
STATISTIC(NumFunctions, "Total number of functions")
const MDOperand & getOperand(unsigned I) const
const Instruction * getTerminator() const LLVM_READONLY
Returns the terminator instruction if the block is well formed or null if the block is not well forme...
iterator begin()
Instruction iterator methods.
bool MergeBlockIntoPredecessor(BasicBlock *BB, DomTreeUpdater *DTU=nullptr, LoopInfo *LI=nullptr, MemorySSAUpdater *MSSAU=nullptr, MemoryDependenceResults *MemDep=nullptr, bool PredecessorWithTwoSuccessors=false)
Attempts to merge a block into its predecessor, if possible.
static cl::opt< bool > UnrollRuntimeEpilog("unroll-runtime-epilog", cl::init(false), cl::Hidden, cl::desc("Allow runtime unrolled loops to be unrolled " "with epilog instead of prolog."))
bool formLCSSARecursively(Loop &L, DominatorTree &DT, LoopInfo *LI, ScalarEvolution *SE)
Put a loop nest into LCSSA form.
const Module * getModule() const
Return the module owning the function this basic block belongs to, or nullptr if the function does no...
static cl::opt< bool > UnrollVerifyDomtree("unroll-verify-domtree", cl::Hidden, cl::desc("Verify domtree after unrolling"), cl::init(false))
bool AllowExpensiveTripCount
const DataLayout & getDataLayout() const
Get the data layout for the module's target platform.
bool verify(VerificationLevel VL=VerificationLevel::Full) const
verify - checks if the tree is correct.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
LoopT * getLoopFor(const BlockT *BB) const
Return the inner most loop that BB lives in.
A Use represents the edge between a Value definition and its users.
void erase(Loop *L)
Update LoopInfo after removing the last backedge from a loop.
RPOIterator endRPO() const
BlockT * getHeader() const
void getExitBlocks(SmallVectorImpl< BlockT *> &ExitBlocks) const
Return all of the successor blocks of this loop.
bool insert(const value_type &X)
Insert a new element into the SetVector.
void addBasicBlockToLoop(BlockT *NewBB, LoopInfoBase< BlockT, LoopT > &LI)
This method is used by other analyses to update loop information.
bool simplifyLoopIVs(Loop *L, ScalarEvolution *SE, DominatorTree *DT, LoopInfo *LI, SmallVectorImpl< WeakTrackingVH > &Dead)
SimplifyLoopIVs - Simplify users of induction variables within this loop.
const BasicBlock * getUniquePredecessor() const
Return the predecessor of this block if it has a unique predecessor block.
void addTopLevelLoop(LoopT *New)
This adds the specified loop to the collection of top-level loops.
iterator find(const KeyT &Val)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
static bool isEpilogProfitable(Loop *L)
The function chooses which type of unroll (epilog or prolog) is more profitabale. ...
void replaceAllUsesWith(Value *V)
Change all uses of this to point to a new Value.
void perform(LoopInfo *LI)
Traverse the loop blocks and store the DFS result.
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree...
Value * getOperand(unsigned i) const
void remapInstruction(Instruction *I, ValueToValueMapTy &VMap)
Convert the instruction operands from referencing the current values into those specified by VMap...
StringRef getString() const
The loop was fully unrolled into straight-line code.
bool isDebugInfoForProfiling() const
Returns true if we should emit debug info for profiling.
initializer< Ty > init(const Ty &Val)
LLVM Basic Block Representation.
bool isLoopExiting(const BlockT *BB) const
True if terminator in the block can branch to another block that is outside of the current loop...
Conditional or Unconditional Branch instruction.
void changeImmediateDominator(DomTreeNodeBase< NodeT > *N, DomTreeNodeBase< NodeT > *NewIDom)
changeImmediateDominator - This method is used to update the dominator tree information when a node's...
This function has undefined behavior.
DomTreeNodeBase * getIDom() const
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
Value * getIncomingValueForBlock(const BasicBlock *BB) const
bool peelLoop(Loop *L, unsigned PeelCount, LoopInfo *LI, ScalarEvolution *SE, DominatorTree *DT, AssumptionCache *AC, bool PreserveLCSSA)
Peel off the first PeelCount iterations of loop L.
bool any_of(R &&range, UnaryPredicate P)
Provide wrappers to std::any_of which take ranges instead of having to pass begin/end explicitly...
const Instruction & back() const
static void replace(Module &M, GlobalVariable *Old, GlobalVariable *New)
std::vector< BasicBlock * >::const_reverse_iterator RPOIterator
bool RecursivelyDeleteTriviallyDeadInstructions(Value *V, const TargetLibraryInfo *TLI=nullptr, MemorySSAUpdater *MSSAU=nullptr)
If the specified value is a trivially dead instruction, delete it.
The loop was partially unrolled – we still have a loop, but with a smaller trip count.
DebugLoc getStartLoc() const
Return the debug location of the start of this loop.
DomTreeNodeBase< NodeT > * getNode(const NodeT *BB) const
getNode - return the (Post)DominatorTree node for the specified basic block.
bool hasAddressTaken() const
Returns true if there are any uses of this basic block other than direct branches, switches, etc.
const InstListType & getInstList() const
Return the underlying instruction list container.
bool contains(const LoopT *L) const
Return true if the specified loop is contained within in this loop.
A SetVector that performs no allocations if smaller than a certain size.
Iterator for intrusive lists based on ilist_node.
unsigned getNumOperands() const
bool UnrollRuntimeLoopRemainder(Loop *L, unsigned Count, bool AllowExpensiveTripCount, bool UseEpilogRemainder, bool UnrollRemainder, bool ForgetAllSCEV, LoopInfo *LI, ScalarEvolution *SE, DominatorTree *DT, AssumptionCache *AC, bool PreserveLCSSA, Loop **ResultLoop=nullptr)
Insert code in the prolog/epilog code when unrolling a loop with a run-time trip-count.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
LoopT * AllocateLoop(ArgsTy &&... Args)
LLVM_NODISCARD T pop_back_val()
static BranchInst * Create(BasicBlock *IfTrue, Instruction *InsertBefore=nullptr)
bool isConditional() const
pred_range predecessors(BasicBlock *BB)
void setOperand(unsigned i, Value *Val)
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
const Loop * addClonedBlockToLoopInfo(BasicBlock *OriginalBB, BasicBlock *ClonedBB, LoopInfo *LI, NewLoopsMap &NewLoops)
Adds ClonedBB to LoopInfo, creates a new loop for ClonedBB if necessary and adds a mapping from the o...
Store the result of a depth first search within basic blocks contained by a single loop...
void push_back(pointer val)
BasicBlock * CloneBasicBlock(const BasicBlock *BB, ValueToValueMapTy &VMap, const Twine &NameSuffix="", Function *F=nullptr, ClonedCodeInfo *CodeInfo=nullptr, DebugInfoFinder *DIFinder=nullptr)
Return a copy of the specified basic block, but without embedding the block into a particular functio...
MDNode * GetUnrollMetadata(MDNode *LoopID, StringRef Name)
Given an llvm.loop loop id metadata node, returns the loop hint metadata node with the given name (fo...
LLVM_NODISCARD bool equals(StringRef RHS) const
equals - Check for string equality, this is more efficient than compare() when the relative ordering ...
LoopT * getParentLoop() const
LLVMAttributeRef wrap(Attribute Attr)
void registerAssumption(CallInst *CI)
Add an @llvm.assume intrinsic to this function's cache.
void addChildLoop(LoopT *NewChild)
Add the specified loop to be a child of this loop.
LLVM_NODISCARD bool empty() const
Represents a single loop in the control flow graph.
ArrayRef< BlockT * > getBlocks() const
Get a list of the basic blocks which make up this loop.
StringRef getName() const
Return a constant reference to the value's name.
const Function * getParent() const
Return the enclosing method, or null if none.
DomTreeNodeBase< NodeT > * addNewBlock(NodeT *BB, NodeT *DomBB)
Add a new node to the dominator tree information.
LoopUnrollResult UnrollLoop(Loop *L, UnrollLoopOptions ULO, LoopInfo *LI, ScalarEvolution *SE, DominatorTree *DT, AssumptionCache *AC, OptimizationRemarkEmitter *ORE, bool PreserveLCSSA, Loop **RemainderLoop=nullptr)
Unroll the given loop by Count.
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
const BasicBlockListType & getBasicBlockList() const
Get the underlying elements of the Function...
iterator_range< const_phi_iterator > phis() const
Returns a range that iterates over the phis in the basic block.
bool isSafeToClone() const
Return true if the loop body is safe to clone in practice.
bool isUnconditional() const
ValueT lookup(const_arg_type_t< KeyT > Val) const
lookup - Return the entry for the specified key, or a default constructed value if no such entry exis...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool isInstructionTriviallyDead(Instruction *I, const TargetLibraryInfo *TLI=nullptr)
Return true if the result produced by the instruction is not used, and the instruction has no side ef...
LLVM Value Representation.
Fast - This calling convention attempts to make calls as fast as possible (e.g.
succ_range successors(Instruction *I)
RPOIterator beginRPO() const
Reverse iterate over the cached postorder blocks.
The loop was not modified.
StringRef - Represent a constant reference to a string, i.e.
bool replacementPreservesLCSSAForm(Instruction *From, Value *To)
Returns true if replacing From with To everywhere is guaranteed to preserve LCSSA form...
unsigned getNumOperands() const
Return number of MDNode operands.
for(unsigned i=Desc.getNumOperands(), e=OldMI.getNumOperands();i !=e;++i)
iterator_range< block_iterator > blocks() const
Value * SimplifyInstruction(Instruction *I, const SimplifyQuery &Q, OptimizationRemarkEmitter *ORE=nullptr)
See if we can compute a simplified version of this instruction.
BlockT * getExitingBlock() const
If getExitingBlocks would return exactly one block, return that block.
void forgetTopmostLoop(const Loop *L)
LoopUnrollResult
Represents the result of a UnrollLoop invocation.
void simplifyLoopAfterUnroll(Loop *L, bool SimplifyIVs, LoopInfo *LI, ScalarEvolution *SE, DominatorTree *DT, AssumptionCache *AC)
Perform some cleanup and simplifications on loops after unrolling.