118 std::vector<BasicBlock *> Blocks;
129 struct RewrittenRangeInfo {
132 std::vector<PHINode *> PHIValuesAtPseudoExit;
135 RewrittenRangeInfo() =
default;
142 void cloneLoop(ClonedLoop &CLResult,
const char *Tag)
const;
146 Loop *createClonedLoopStructure(Loop *Original, Loop *Parent,
171 changeIterationSpaceEnd(
const LoopStructure &LS, BasicBlock *Preheader,
173 BasicBlock *ContinuationBlock)
const;
177 BasicBlock *createPreheader(
const LoopStructure &LS, BasicBlock *OldPreheader,
178 const char *Tag)
const;
184 void rewriteIncomingValuesForPHIs(
185 LoopStructure &LS, BasicBlock *ContinuationBlockAndPreheader,
186 const LoopConstrainer::RewrittenRangeInfo &RRI)
const;
200 function_ref<void(Loop *,
bool)> LPMAddNewLoop;
205 BasicBlock *OriginalPreheader =
nullptr;
209 BasicBlock *MainLoopPreheader =
nullptr;
216 LoopStructure MainLoopStructure;
222 function_ref<
void(Loop *,
bool)> LPMAddNewLoop,
223 const LoopStructure &LS, ScalarEvolution &SE,
224 DominatorTree &DT, Type *
T, SubRanges SR);
LLVM_ABI LoopConstrainer(Loop &L, LoopInfo &LI, function_ref< void(Loop *, bool)> LPMAddNewLoop, const LoopStructure &LS, ScalarEvolution &SE, DominatorTree &DT, Type *T, SubRanges SR)
static LLVM_ABI std::optional< LoopStructure > parseLoopStructure(SCEVExpander &Expander, Loop &L, bool AllowUnsignedLatchCond, const char *&FailureReason)
Parse L and use Expander to materialize values needed by the parsed structure.