LLVM  15.0.0git
LoopPassManager.cpp
Go to the documentation of this file.
1 //===- LoopPassManager.cpp - Loop pass management -------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
18 
19 using namespace llvm;
20 
21 namespace llvm {
22 
23 /// Explicitly specialize the pass manager's run method to handle loop nest
24 /// structure updates.
29  // Runs loop-nest passes only when the current loop is a top-level one.
30  PreservedAnalyses PA = (L.isOutermost() && !LoopNestPasses.empty())
31  ? runWithLoopNestPasses(L, AM, AR, U)
32  : runWithoutLoopNestPasses(L, AM, AR, U);
33 
34  // Invalidation for the current loop should be handled above, and other loop
35  // analysis results shouldn't be impacted by runs over this loop. Therefore,
36  // the remaining analysis results in the AnalysisManager are preserved. We
37  // mark this with a set so that we don't need to inspect each one
38  // individually.
39  // FIXME: This isn't correct! This loop and all nested loops' analyses should
40  // be preserved, but unrolling should invalidate the parent loop's analyses.
42 
43  return PA;
44 }
45 
47  LPMUpdater &>::printPipeline(raw_ostream &OS,
49  MapClassName2PassName) {
50  assert(LoopPasses.size() + LoopNestPasses.size() == IsLoopNestPass.size());
51 
52  unsigned IdxLP = 0, IdxLNP = 0;
53  for (unsigned Idx = 0, Size = IsLoopNestPass.size(); Idx != Size; ++Idx) {
54  if (IsLoopNestPass[Idx]) {
55  auto *P = LoopNestPasses[IdxLNP++].get();
56  P->printPipeline(OS, MapClassName2PassName);
57  } else {
58  auto *P = LoopPasses[IdxLP++].get();
59  P->printPipeline(OS, MapClassName2PassName);
60  }
61  if (Idx + 1 < Size)
62  OS << ",";
63  }
64 }
65 
66 // Run both loop passes and loop-nest passes on top-level loop \p L.
70  LPMUpdater &U) {
71  assert(L.isOutermost() &&
72  "Loop-nest passes should only run on top-level loops.");
74 
75  // Request PassInstrumentation from analysis manager, will use it to run
76  // instrumenting callbacks for the passes later.
78 
79  unsigned LoopPassIndex = 0, LoopNestPassIndex = 0;
80 
81  // `LoopNestPtr` points to the `LoopNest` object for the current top-level
82  // loop and `IsLoopNestPtrValid` indicates whether the pointer is still valid.
83  // The `LoopNest` object will have to be re-constructed if the pointer is
84  // invalid when encountering a loop-nest pass.
85  std::unique_ptr<LoopNest> LoopNestPtr;
86  bool IsLoopNestPtrValid = false;
87 
88  for (size_t I = 0, E = IsLoopNestPass.size(); I != E; ++I) {
90  if (!IsLoopNestPass[I]) {
91  // The `I`-th pass is a loop pass.
92  auto &Pass = LoopPasses[LoopPassIndex++];
93  PassPA = runSinglePass(L, Pass, AM, AR, U, PI);
94  } else {
95  // The `I`-th pass is a loop-nest pass.
96  auto &Pass = LoopNestPasses[LoopNestPassIndex++];
97 
98  // If the loop-nest object calculated before is no longer valid,
99  // re-calculate it here before running the loop-nest pass.
100  if (!IsLoopNestPtrValid) {
101  LoopNestPtr = LoopNest::getLoopNest(L, AR.SE);
102  IsLoopNestPtrValid = true;
103  }
104  PassPA = runSinglePass(*LoopNestPtr, Pass, AM, AR, U, PI);
105  }
106 
107  // `PassPA` is `None` means that the before-pass callbacks in
108  // `PassInstrumentation` return false. The pass does not run in this case,
109  // so we can skip the following procedure.
110  if (!PassPA)
111  continue;
112 
113  // If the loop was deleted, abort the run and return to the outer walk.
114  if (U.skipCurrentLoop()) {
115  PA.intersect(std::move(*PassPA));
116  break;
117  }
118 
119  // Update the analysis manager as each pass runs and potentially
120  // invalidates analyses.
121  AM.invalidate(L, *PassPA);
122 
123  // Finally, we intersect the final preserved analyses to compute the
124  // aggregate preserved set for this pass manager.
125  PA.intersect(std::move(*PassPA));
126 
127  // Check if the current pass preserved the loop-nest object or not.
128  IsLoopNestPtrValid &= PassPA->getChecker<LoopNestAnalysis>().preserved();
129 
130  // After running the loop pass, the parent loop might change and we need to
131  // notify the updater, otherwise U.ParentL might gets outdated and triggers
132  // assertion failures in addSiblingLoops and addChildLoops.
133  U.setParentLoop(L.getParentLoop());
134  }
135  return PA;
136 }
137 
138 // Run all loop passes on loop \p L. Loop-nest passes don't run either because
139 // \p L is not a top-level one or simply because there are no loop-nest passes
140 // in the pass manager at all.
144  LPMUpdater &U) {
146 
147  // Request PassInstrumentation from analysis manager, will use it to run
148  // instrumenting callbacks for the passes later.
150  for (auto &Pass : LoopPasses) {
151  Optional<PreservedAnalyses> PassPA = runSinglePass(L, Pass, AM, AR, U, PI);
152 
153  // `PassPA` is `None` means that the before-pass callbacks in
154  // `PassInstrumentation` return false. The pass does not run in this case,
155  // so we can skip the following procedure.
156  if (!PassPA)
157  continue;
158 
159  // If the loop was deleted, abort the run and return to the outer walk.
160  if (U.skipCurrentLoop()) {
161  PA.intersect(std::move(*PassPA));
162  break;
163  }
164 
165  // Update the analysis manager as each pass runs and potentially
166  // invalidates analyses.
167  AM.invalidate(L, *PassPA);
168 
169  // Finally, we intersect the final preserved analyses to compute the
170  // aggregate preserved set for this pass manager.
171  PA.intersect(std::move(*PassPA));
172 
173  // After running the loop pass, the parent loop might change and we need to
174  // notify the updater, otherwise U.ParentL might gets outdated and triggers
175  // assertion failures in addSiblingLoops and addChildLoops.
176  U.setParentLoop(L.getParentLoop());
177  }
178  return PA;
179 }
180 } // namespace llvm
181 
182 void FunctionToLoopPassAdaptor::printPipeline(
183  raw_ostream &OS, function_ref<StringRef(StringRef)> MapClassName2PassName) {
184  OS << (UseMemorySSA ? "loop-mssa(" : "loop(");
185  Pass->printPipeline(OS, MapClassName2PassName);
186  OS << ")";
187 }
190  // Before we even compute any loop analyses, first run a miniature function
191  // pass pipeline to put loops into their canonical form. Note that we can
192  // directly build up function analyses after this as the function pass
193  // manager handles all the invalidation at that layer.
195 
197  // Check the PassInstrumentation's BeforePass callbacks before running the
198  // canonicalization pipeline.
199  if (PI.runBeforePass<Function>(LoopCanonicalizationFPM, F)) {
200  PA = LoopCanonicalizationFPM.run(F, AM);
201  PI.runAfterPass<Function>(LoopCanonicalizationFPM, F, PA);
202  }
203 
204  // Get the loop structure for this function
205  LoopInfo &LI = AM.getResult<LoopAnalysis>(F);
206 
207  // If there are no loops, there is nothing to do here.
208  if (LI.empty())
209  return PA;
210 
211  // Get the analysis results needed by loop passes.
212  MemorySSA *MSSA =
213  UseMemorySSA ? (&AM.getResult<MemorySSAAnalysis>(F).getMSSA()) : nullptr;
214  BlockFrequencyInfo *BFI = UseBlockFrequencyInfo && F.hasProfileData()
216  : nullptr;
217  BranchProbabilityInfo *BPI =
218  UseBranchProbabilityInfo && F.hasProfileData()
220  : nullptr;
224  AM.getResult<LoopAnalysis>(F),
228  BFI,
229  BPI,
230  MSSA};
231 
232  // Setup the loop analysis manager from its proxy. It is important that
233  // this is only done when there are loops to process and we have built the
234  // LoopStandardAnalysisResults object. The loop analyses cached in this
235  // manager have access to those analysis results and so it must invalidate
236  // itself when they go away.
237  auto &LAMFP = AM.getResult<LoopAnalysisManagerFunctionProxy>(F);
238  if (UseMemorySSA)
239  LAMFP.markMSSAUsed();
240  LoopAnalysisManager &LAM = LAMFP.getManager();
241 
242  // A postorder worklist of loops to process.
244 
245  // Register the worklist and loop analysis manager so that loop passes can
246  // update them when they mutate the loop nest structure.
247  LPMUpdater Updater(Worklist, LAM, LoopNestMode);
248 
249  // Add the loop nests in the reverse order of LoopInfo. See method
250  // declaration.
251  if (!LoopNestMode) {
252  appendLoopsToWorklist(LI, Worklist);
253  } else {
254  for (Loop *L : LI)
255  Worklist.insert(L);
256  }
257 
258 #ifndef NDEBUG
259  PI.pushBeforeNonSkippedPassCallback([&LAR, &LI](StringRef PassID, Any IR) {
260  if (isSpecialPass(PassID, {"PassManager"}))
261  return;
262  assert(any_isa<const Loop *>(IR) || any_isa<const LoopNest *>(IR));
263  const Loop *L = any_isa<const Loop *>(IR)
264  ? any_cast<const Loop *>(IR)
265  : &any_cast<const LoopNest *>(IR)->getOutermostLoop();
266  assert(L && "Loop should be valid for printing");
267 
268  // Verify the loop structure and LCSSA form before visiting the loop.
269  L->verifyLoop();
270  assert(L->isRecursivelyLCSSAForm(LAR.DT, LI) &&
271  "Loops must remain in LCSSA form!");
272  });
273 #endif
274 
275  do {
276  Loop *L = Worklist.pop_back_val();
277  assert(!(LoopNestMode && L->getParentLoop()) &&
278  "L should be a top-level loop in loop-nest mode.");
279 
280  // Reset the update structure for this loop.
281  Updater.CurrentL = L;
282  Updater.SkipCurrentLoop = false;
283 
284 #ifndef NDEBUG
285  // Save a parent loop pointer for asserts.
286  Updater.ParentL = L->getParentLoop();
287 #endif
288  // Check the PassInstrumentation's BeforePass callbacks before running the
289  // pass, skip its execution completely if asked to (callback returns
290  // false).
291  if (!PI.runBeforePass<Loop>(*Pass, *L))
292  continue;
293 
294  PreservedAnalyses PassPA;
295  {
296  TimeTraceScope TimeScope(Pass->name());
297  PassPA = Pass->run(*L, LAM, LAR, Updater);
298  }
299 
300  // Do not pass deleted Loop into the instrumentation.
301  if (Updater.skipCurrentLoop())
302  PI.runAfterPassInvalidated<Loop>(*Pass, PassPA);
303  else
304  PI.runAfterPass<Loop>(*Pass, *L, PassPA);
305 
306  if (LAR.MSSA && !PassPA.getChecker<MemorySSAAnalysis>().preserved())
307  report_fatal_error("Loop pass manager using MemorySSA contains a pass "
308  "that does not preserve MemorySSA");
309 
310 #ifndef NDEBUG
311  // LoopAnalysisResults should always be valid.
312  if (VerifyDomInfo)
313  LAR.DT.verify();
314  if (VerifyLoopInfo)
315  LAR.LI.verify(LAR.DT);
316  if (VerifySCEV)
317  LAR.SE.verify();
318  if (LAR.MSSA && VerifyMemorySSA)
319  LAR.MSSA->verifyMemorySSA();
320 #endif
321 
322  // If the loop hasn't been deleted, we need to handle invalidation here.
323  if (!Updater.skipCurrentLoop())
324  // We know that the loop pass couldn't have invalidated any other
325  // loop's analyses (that's the contract of a loop pass), so directly
326  // handle the loop analysis manager's invalidation here.
327  LAM.invalidate(*L, PassPA);
328 
329  // Then intersect the preserved set so that invalidation of module
330  // analyses will eventually occur when the module pass completes.
331  PA.intersect(std::move(PassPA));
332  } while (!Worklist.empty());
333 
334 #ifndef NDEBUG
336 #endif
337 
338  // By definition we preserve the proxy. We also preserve all analyses on
339  // Loops. This precludes *any* invalidation of loop analyses by the proxy,
340  // but that's OK because we've taken care to invalidate analyses in the
341  // loop analysis manager incrementally above.
342  PA.preserveSet<AllAnalysesOn<Loop>>();
343  PA.preserve<LoopAnalysisManagerFunctionProxy>();
344  // We also preserve the set of standard analyses.
345  PA.preserve<DominatorTreeAnalysis>();
346  PA.preserve<LoopAnalysis>();
347  PA.preserve<ScalarEvolutionAnalysis>();
348  if (UseBlockFrequencyInfo && F.hasProfileData())
349  PA.preserve<BlockFrequencyAnalysis>();
350  if (UseBranchProbabilityInfo && F.hasProfileData())
351  PA.preserve<BranchProbabilityAnalysis>();
352  if (UseMemorySSA)
353  PA.preserve<MemorySSAAnalysis>();
354  return PA;
355 }
356 
358 PrintLoopPass::PrintLoopPass(raw_ostream &OS, const std::string &Banner)
359  : OS(OS), Banner(Banner) {}
360 
363  LPMUpdater &) {
364  printLoop(L, OS, Banner);
365  return PreservedAnalyses::all();
366 }
llvm::PreservedAnalyses
A set of analyses that are preserved following a run of a transformation pass.
Definition: PassManager.h:152
AssumptionCache.h
llvm::AAManager
A manager for alias analyses.
Definition: AliasAnalysis.h:1303
llvm::TargetIRAnalysis
Analysis pass providing the TargetTransformInfo.
Definition: TargetTransformInfo.h:2485
llvm::ScalarEvolutionAnalysis
Analysis pass that exposes the ScalarEvolution for a function.
Definition: ScalarEvolution.h:2123
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::MemorySSA::verifyMemorySSA
void verifyMemorySSA(VerificationLevel=VerificationLevel::Fast) const
Verify that MemorySSA is self consistent (IE definitions dominate all uses, uses appear in the right ...
Definition: MemorySSA.cpp:1906
llvm::TimeTraceScope
The TimeTraceScope is a helper class to call the begin and end functions of the time trace profiler.
Definition: TimeProfiler.h:67
llvm::AnalysisManager::getResult
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
Definition: PassManager.h:780
llvm::Function
Definition: Function.h:60
llvm::Loop
Represents a single loop in the control flow graph.
Definition: LoopInfo.h:546
llvm::AnalysisManager::invalidate
void invalidate(IRUnitT &IR, const PreservedAnalyses &PA)
Invalidate cached analyses for an IR unit.
Definition: PassManagerImpl.h:89
P
This currently compiles esp xmm0 movsd esp eax eax esp ret We should use not the dag combiner This is because dagcombine2 needs to be able to see through the X86ISD::Wrapper which DAGCombine can t really do The code for turning x load into a single vector load is target independent and should be moved to the dag combiner The code for turning x load into a vector load can only handle a direct load from a global or a direct load from the stack It should be generalized to handle any load from P
Definition: README-SSE.txt:411
llvm::PriorityWorklist< T, SmallVector< T, N >, SmallDenseMap< T, ptrdiff_t > >::insert
bool insert(const T &X)
Insert a new element into the PriorityWorklist.
Definition: PriorityWorklist.h:90
llvm::LoopInfoBase::verify
void verify(const DominatorTreeBase< BlockT, false > &DomTree) const
Definition: LoopInfoImpl.h:687
llvm::VerifyLoopInfo
bool VerifyLoopInfo
Enable verification of loop info.
Definition: LoopInfo.cpp:50
llvm::AllAnalysesOn
This templated class represents "all analyses that operate over <a particular IR unit>" (e....
Definition: PassManager.h:90
llvm::PassInstrumentation::pushBeforeNonSkippedPassCallback
void pushBeforeNonSkippedPassCallback(CallableT C)
Definition: PassInstrumentation.h:308
ScalarEvolution.h
llvm::LoopStandardAnalysisResults
The adaptor from a function pass to a loop pass computes these analyses and makes them available to t...
Definition: LoopAnalysisManager.h:51
llvm::Optional
Definition: APInt.h:33
llvm::FunctionToLoopPassAdaptor::run
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
Runs the loop passes across every loop in the function.
Definition: LoopPassManager.cpp:188
llvm::LoopStandardAnalysisResults::DT
DominatorTree & DT
Definition: LoopAnalysisManager.h:54
F
#define F(x, y, z)
Definition: MD5.cpp:55
llvm::dbgs
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
Definition: Debug.cpp:163
llvm::PreservedAnalyses::intersect
void intersect(const PreservedAnalyses &Arg)
Intersect this set with another in place.
Definition: PassManager.h:224
llvm::LoopBase::getParentLoop
LoopT * getParentLoop() const
Return the parent loop if it exists or nullptr for top level loops.
Definition: LoopInfo.h:113
llvm::BranchProbabilityAnalysis
Analysis pass which computes BranchProbabilityInfo.
Definition: BranchProbabilityInfo.h:412
llvm::BlockFrequencyInfo
BlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate IR basic block frequen...
Definition: BlockFrequencyInfo.h:37
E
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
llvm::BranchProbabilityInfo
Analysis providing branch probability information.
Definition: BranchProbabilityInfo.h:113
llvm::PriorityWorklist< T, SmallVector< T, N >, SmallDenseMap< T, ptrdiff_t > >::pop_back_val
LLVM_NODISCARD T pop_back_val()
Definition: PriorityWorklist.h:153
TargetLibraryInfo.h
llvm::isSpecialPass
bool isSpecialPass(StringRef PassID, const std::vector< StringRef > &Specials)
Definition: PassInstrumentation.cpp:33
llvm::printLoop
void printLoop(Loop &L, raw_ostream &OS, const std::string &Banner="")
Function to print a loop's contents as LLVM's text IR assembly.
Definition: LoopInfo.cpp:976
llvm::LoopBase::verifyLoop
void verifyLoop() const
Verify loop structure.
Definition: LoopInfoImpl.h:285
llvm::report_fatal_error
void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
Definition: Error.cpp:143
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:54
IR
Statically lint checks LLVM IR
Definition: Lint.cpp:746
llvm::BlockFrequencyAnalysis
Analysis pass which computes BlockFrequencyInfo.
Definition: BlockFrequencyInfo.h:112
llvm::LoopNestAnalysis
This analysis provides information for a loop nest.
Definition: LoopNestAnalysis.h:202
llvm::dxil::PointerTypeAnalysis::run
PointerTypeMap run(const Module &M)
Compute the PointerTypeMap for the module M.
Definition: PointerTypeAnalysis.cpp:101
llvm::function_ref
An efficient, type-erasing, non-owning reference to a callable.
Definition: STLFunctionalExtras.h:36
llvm::PassManager< Loop, LoopAnalysisManager, LoopStandardAnalysisResults &, LPMUpdater & >::runWithLoopNestPasses
PreservedAnalyses runWithLoopNestPasses(Loop &L, LoopAnalysisManager &AM, LoopStandardAnalysisResults &AR, LPMUpdater &U)
Definition: LoopPassManager.cpp:68
BranchProbabilityInfo.h
llvm::ScalarEvolution::verify
void verify() const
Definition: ScalarEvolution.cpp:13667
llvm::PassInstrumentation::runAfterPass
void runAfterPass(const PassT &Pass, const IRUnitT &IR, const PreservedAnalyses &PA) const
AfterPass instrumentation point - takes Pass instance that has just been executed and constant refere...
Definition: PassInstrumentation.h:242
llvm::PrintLoopPass::run
PreservedAnalyses run(Loop &L, LoopAnalysisManager &, LoopStandardAnalysisResults &, LPMUpdater &)
Definition: LoopPassManager.cpp:361
llvm::LPMUpdater
This class provides an interface for updating the loop pass manager based on mutations to the loop ne...
Definition: LoopPassManager.h:262
llvm::AssumptionAnalysis
A function analysis which provides an AssumptionCache.
Definition: AssumptionCache.h:173
llvm::SmallPriorityWorklist
A version of PriorityWorklist that selects small size optimized data structures for the vector and ma...
Definition: PriorityWorklist.h:255
move
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
Definition: README.txt:546
llvm::MemorySSA
Encapsulates MemorySSA, including all data associated with memory accesses.
Definition: MemorySSA.h:714
I
#define I(x, y, z)
Definition: MD5.cpp:58
llvm::PassInstrumentation::runAfterPassInvalidated
void runAfterPassInvalidated(const PassT &Pass, const PreservedAnalyses &PA) const
AfterPassInvalidated instrumentation point - takes Pass instance that has just been executed.
Definition: PassInstrumentation.h:253
llvm::PriorityWorklist< T, SmallVector< T, N >, SmallDenseMap< T, ptrdiff_t > >::empty
bool empty() const
Determine if the PriorityWorklist is empty or not.
Definition: PriorityWorklist.h:67
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
llvm::PassInstrumentation
This class provides instrumentation entry points for the Pass Manager, doing calls to callbacks regis...
Definition: PassInstrumentation.h:180
LoopPassManager.h
llvm::MemorySSAAnalysis
An analysis that produces MemorySSA for a function.
Definition: MemorySSA.h:948
llvm::PassInstrumentation::popBeforeNonSkippedPassCallback
void popBeforeNonSkippedPassCallback()
Definition: PassInstrumentation.h:312
llvm::LoopInfo
Definition: LoopInfo.h:1102
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
llvm::appendLoopsToWorklist
void appendLoopsToWorklist(RangeT &&, SmallPriorityWorklist< Loop *, 4 > &)
Utility that implements appending of loops onto a worklist given a range.
Definition: LoopUtils.cpp:1467
llvm::LoopBase::isOutermost
bool isOutermost() const
Return true if the loop does not have a parent (natural) loop.
Definition: LoopInfo.h:184
llvm::LoopStandardAnalysisResults::LI
LoopInfo & LI
Definition: LoopAnalysisManager.h:55
BlockFrequencyInfo.h
llvm::AMDGPUISD::BFI
@ BFI
Definition: AMDGPUISelLowering.h:429
LAM
LoopAnalysisManager LAM
Definition: PassBuilderBindings.cpp:58
llvm::PassManager
Manages a sequence of passes over a particular unit of IR.
Definition: PassManager.h:469
llvm::Any
Definition: Any.h:28
llvm::PassInstrumentation::runBeforePass
bool runBeforePass(const PassT &Pass, const IRUnitT &IR) const
BeforePass instrumentation point - takes Pass instance to be executed and constant reference to IR it...
Definition: PassInstrumentation.h:217
llvm::PrintLoopPass::PrintLoopPass
PrintLoopPass()
Definition: LoopPassManager.cpp:357
llvm::PreservedAnalyses::all
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
Definition: PassManager.h:158
llvm::Loop::isRecursivelyLCSSAForm
bool isRecursivelyLCSSAForm(const DominatorTree &DT, const LoopInfo &LI) const
Return true if this Loop and all inner subloops are in LCSSA form.
Definition: LoopInfo.cpp:465
llvm::LPMUpdater::setParentLoop
void setParentLoop(Loop *L)
Definition: LoopPassManager.h:291
llvm::LoopStandardAnalysisResults::SE
ScalarEvolution & SE
Definition: LoopAnalysisManager.h:56
llvm::PassManager::run
PreservedAnalyses run(IRUnitT &IR, AnalysisManagerT &AM, ExtraArgTs... ExtraArgs)
Run all of the passes in this manager over the given unit of IR.
Definition: PassManager.h:498
llvm::DominatorTreeAnalysis
Analysis pass which computes a DominatorTree.
Definition: Dominators.h:267
llvm::PassManager< Loop, LoopAnalysisManager, LoopStandardAnalysisResults &, LPMUpdater & >::runWithoutLoopNestPasses
PreservedAnalyses runWithoutLoopNestPasses(Loop &L, LoopAnalysisManager &AM, LoopStandardAnalysisResults &AR, LPMUpdater &U)
Definition: LoopPassManager.cpp:142
llvm::Pass
Pass interface - Implemented by all 'passes'.
Definition: Pass.h:91
MemorySSA.h
llvm::PreservedAnalyses::preserveSet
void preserveSet()
Mark an analysis set as preserved.
Definition: PassManager.h:188
llvm::LoopAnalysisManager
AnalysisManager< Loop, LoopStandardAnalysisResults & > LoopAnalysisManager
The loop analysis manager.
Definition: LoopAnalysisManager.h:75
llvm::DominatorTreeBase::verify
bool verify(VerificationLevel VL=VerificationLevel::Full) const
verify - checks if the tree is correct.
Definition: GenericDomTree.h:802
TargetTransformInfo.h
llvm::LoopStandardAnalysisResults::MSSA
MemorySSA * MSSA
Definition: LoopAnalysisManager.h:61
llvm::LoopInfoBase::empty
bool empty() const
Definition: LoopInfo.h:965
llvm::PreservedAnalyses::getChecker
PreservedAnalysisChecker getChecker() const
Build a checker for this PreservedAnalyses and the specified analysis type.
Definition: PassManager.h:310
llvm::AnalysisManager
A container for analyses that lazily runs them and caches their results.
Definition: InstructionSimplify.h:42
llvm::PassInstrumentationAnalysis
Pseudo-analysis pass that exposes the PassInstrumentation to pass managers.
Definition: PassManager.h:600
llvm::InnerAnalysisManagerProxy
An analysis over an "outer" IR unit that provides access to an analysis manager over an "inner" IR un...
Definition: PassManager.h:937
llvm::LPMUpdater::skipCurrentLoop
bool skipCurrentLoop() const
This can be queried by loop passes which run other loop passes (like pass managers) to know whether t...
Definition: LoopPassManager.h:270
llvm::VerifyMemorySSA
bool VerifyMemorySSA
Enables verification of MemorySSA.
Definition: MemorySSA.cpp:91
llvm::LoopNest::getLoopNest
static std::unique_ptr< LoopNest > getLoopNest(Loop &Root, ScalarEvolution &SE)
Construct a LoopNest object.
Definition: LoopNestAnalysis.cpp:47
TimeProfiler.h
llvm::TargetLibraryAnalysis
Analysis pass providing the TargetLibraryInfo.
Definition: TargetLibraryInfo.h:443
llvm::VerifyDomInfo
bool VerifyDomInfo
Enables verification of dominator trees.
Definition: Dominators.cpp:39
llvm::LoopAnalysis
Analysis pass that exposes the LoopInfo for a function.
Definition: LoopInfo.h:1262