LLVM  16.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  Loop *OuterMostLoop = &L;
88 
89  for (size_t I = 0, E = IsLoopNestPass.size(); I != E; ++I) {
91  if (!IsLoopNestPass[I]) {
92  // The `I`-th pass is a loop pass.
93  auto &Pass = LoopPasses[LoopPassIndex++];
94  PassPA = runSinglePass(L, Pass, AM, AR, U, PI);
95  } else {
96  // The `I`-th pass is a loop-nest pass.
97  auto &Pass = LoopNestPasses[LoopNestPassIndex++];
98 
99  // If the loop-nest object calculated before is no longer valid,
100  // re-calculate it here before running the loop-nest pass.
101  //
102  // FIXME: PreservedAnalysis should not be abused to tell if the
103  // status of loopnest has been changed. We should use and only
104  // use LPMUpdater for this purpose.
105  if (!IsLoopNestPtrValid || U.isLoopNestChanged()) {
106  while (auto *ParentLoop = OuterMostLoop->getParentLoop())
107  OuterMostLoop = ParentLoop;
108  LoopNestPtr = LoopNest::getLoopNest(*OuterMostLoop, AR.SE);
109  IsLoopNestPtrValid = true;
110  U.markLoopNestChanged(false);
111  }
112 
113  PassPA = runSinglePass(*LoopNestPtr, Pass, AM, AR, U, PI);
114  }
115 
116  // `PassPA` is `None` means that the before-pass callbacks in
117  // `PassInstrumentation` return false. The pass does not run in this case,
118  // so we can skip the following procedure.
119  if (!PassPA)
120  continue;
121 
122  // If the loop was deleted, abort the run and return to the outer walk.
123  if (U.skipCurrentLoop()) {
124  PA.intersect(std::move(*PassPA));
125  break;
126  }
127 
128  // Update the analysis manager as each pass runs and potentially
129  // invalidates analyses.
130  AM.invalidate(IsLoopNestPass[I] ? *OuterMostLoop : L, *PassPA);
131 
132  // Finally, we intersect the final preserved analyses to compute the
133  // aggregate preserved set for this pass manager.
134  PA.intersect(std::move(*PassPA));
135 
136  // Check if the current pass preserved the loop-nest object or not.
137  IsLoopNestPtrValid &= PassPA->getChecker<LoopNestAnalysis>().preserved();
138 
139  // After running the loop pass, the parent loop might change and we need to
140  // notify the updater, otherwise U.ParentL might gets outdated and triggers
141  // assertion failures in addSiblingLoops and addChildLoops.
142  U.setParentLoop((IsLoopNestPass[I] ? *OuterMostLoop : L).getParentLoop());
143  }
144  return PA;
145 }
146 
147 // Run all loop passes on loop \p L. Loop-nest passes don't run either because
148 // \p L is not a top-level one or simply because there are no loop-nest passes
149 // in the pass manager at all.
153  LPMUpdater &U) {
155 
156  // Request PassInstrumentation from analysis manager, will use it to run
157  // instrumenting callbacks for the passes later.
159  for (auto &Pass : LoopPasses) {
160  Optional<PreservedAnalyses> PassPA = runSinglePass(L, Pass, AM, AR, U, PI);
161 
162  // `PassPA` is `None` means that the before-pass callbacks in
163  // `PassInstrumentation` return false. The pass does not run in this case,
164  // so we can skip the following procedure.
165  if (!PassPA)
166  continue;
167 
168  // If the loop was deleted, abort the run and return to the outer walk.
169  if (U.skipCurrentLoop()) {
170  PA.intersect(std::move(*PassPA));
171  break;
172  }
173 
174  // Update the analysis manager as each pass runs and potentially
175  // invalidates analyses.
176  AM.invalidate(L, *PassPA);
177 
178  // Finally, we intersect the final preserved analyses to compute the
179  // aggregate preserved set for this pass manager.
180  PA.intersect(std::move(*PassPA));
181 
182  // After running the loop pass, the parent loop might change and we need to
183  // notify the updater, otherwise U.ParentL might gets outdated and triggers
184  // assertion failures in addSiblingLoops and addChildLoops.
185  U.setParentLoop(L.getParentLoop());
186  }
187  return PA;
188 }
189 } // namespace llvm
190 
191 void FunctionToLoopPassAdaptor::printPipeline(
192  raw_ostream &OS, function_ref<StringRef(StringRef)> MapClassName2PassName) {
193  OS << (UseMemorySSA ? "loop-mssa(" : "loop(");
194  Pass->printPipeline(OS, MapClassName2PassName);
195  OS << ")";
196 }
199  // Before we even compute any loop analyses, first run a miniature function
200  // pass pipeline to put loops into their canonical form. Note that we can
201  // directly build up function analyses after this as the function pass
202  // manager handles all the invalidation at that layer.
204 
206  // Check the PassInstrumentation's BeforePass callbacks before running the
207  // canonicalization pipeline.
208  if (PI.runBeforePass<Function>(LoopCanonicalizationFPM, F)) {
209  PA = LoopCanonicalizationFPM.run(F, AM);
210  PI.runAfterPass<Function>(LoopCanonicalizationFPM, F, PA);
211  }
212 
213  // Get the loop structure for this function
214  LoopInfo &LI = AM.getResult<LoopAnalysis>(F);
215 
216  // If there are no loops, there is nothing to do here.
217  if (LI.empty())
218  return PA;
219 
220  // Get the analysis results needed by loop passes.
221  MemorySSA *MSSA =
222  UseMemorySSA ? (&AM.getResult<MemorySSAAnalysis>(F).getMSSA()) : nullptr;
223  BlockFrequencyInfo *BFI = UseBlockFrequencyInfo && F.hasProfileData()
225  : nullptr;
226  BranchProbabilityInfo *BPI =
227  UseBranchProbabilityInfo && F.hasProfileData()
229  : nullptr;
233  AM.getResult<LoopAnalysis>(F),
237  BFI,
238  BPI,
239  MSSA};
240 
241  // Setup the loop analysis manager from its proxy. It is important that
242  // this is only done when there are loops to process and we have built the
243  // LoopStandardAnalysisResults object. The loop analyses cached in this
244  // manager have access to those analysis results and so it must invalidate
245  // itself when they go away.
246  auto &LAMFP = AM.getResult<LoopAnalysisManagerFunctionProxy>(F);
247  if (UseMemorySSA)
248  LAMFP.markMSSAUsed();
249  LoopAnalysisManager &LAM = LAMFP.getManager();
250 
251  // A postorder worklist of loops to process.
253 
254  // Register the worklist and loop analysis manager so that loop passes can
255  // update them when they mutate the loop nest structure.
256  LPMUpdater Updater(Worklist, LAM, LoopNestMode);
257 
258  // Add the loop nests in the reverse order of LoopInfo. See method
259  // declaration.
260  if (!LoopNestMode) {
261  appendLoopsToWorklist(LI, Worklist);
262  } else {
263  for (Loop *L : LI)
264  Worklist.insert(L);
265  }
266 
267 #ifndef NDEBUG
268  PI.pushBeforeNonSkippedPassCallback([&LAR, &LI](StringRef PassID, Any IR) {
269  if (isSpecialPass(PassID, {"PassManager"}))
270  return;
271  assert(any_isa<const Loop *>(IR) || any_isa<const LoopNest *>(IR));
272  const Loop *L = any_isa<const Loop *>(IR)
273  ? any_cast<const Loop *>(IR)
274  : &any_cast<const LoopNest *>(IR)->getOutermostLoop();
275  assert(L && "Loop should be valid for printing");
276 
277  // Verify the loop structure and LCSSA form before visiting the loop.
278  L->verifyLoop();
279  assert(L->isRecursivelyLCSSAForm(LAR.DT, LI) &&
280  "Loops must remain in LCSSA form!");
281  });
282 #endif
283 
284  do {
285  Loop *L = Worklist.pop_back_val();
286  assert(!(LoopNestMode && L->getParentLoop()) &&
287  "L should be a top-level loop in loop-nest mode.");
288 
289  // Reset the update structure for this loop.
290  Updater.CurrentL = L;
291  Updater.SkipCurrentLoop = false;
292 
293 #ifndef NDEBUG
294  // Save a parent loop pointer for asserts.
295  Updater.ParentL = L->getParentLoop();
296 #endif
297  // Check the PassInstrumentation's BeforePass callbacks before running the
298  // pass, skip its execution completely if asked to (callback returns
299  // false).
300  if (!PI.runBeforePass<Loop>(*Pass, *L))
301  continue;
302 
303  PreservedAnalyses PassPA = Pass->run(*L, LAM, LAR, Updater);
304 
305  // Do not pass deleted Loop into the instrumentation.
306  if (Updater.skipCurrentLoop())
307  PI.runAfterPassInvalidated<Loop>(*Pass, PassPA);
308  else
309  PI.runAfterPass<Loop>(*Pass, *L, PassPA);
310 
311  if (LAR.MSSA && !PassPA.getChecker<MemorySSAAnalysis>().preserved())
312  report_fatal_error("Loop pass manager using MemorySSA contains a pass "
313  "that does not preserve MemorySSA");
314 
315 #ifndef NDEBUG
316  // LoopAnalysisResults should always be valid.
317  if (VerifyDomInfo)
318  LAR.DT.verify();
319  if (VerifyLoopInfo)
320  LAR.LI.verify(LAR.DT);
321  if (VerifySCEV)
322  LAR.SE.verify();
323  if (LAR.MSSA && VerifyMemorySSA)
324  LAR.MSSA->verifyMemorySSA();
325 #endif
326 
327  // If the loop hasn't been deleted, we need to handle invalidation here.
328  if (!Updater.skipCurrentLoop())
329  // We know that the loop pass couldn't have invalidated any other
330  // loop's analyses (that's the contract of a loop pass), so directly
331  // handle the loop analysis manager's invalidation here.
332  LAM.invalidate(*L, PassPA);
333 
334  // Then intersect the preserved set so that invalidation of module
335  // analyses will eventually occur when the module pass completes.
336  PA.intersect(std::move(PassPA));
337  } while (!Worklist.empty());
338 
339 #ifndef NDEBUG
341 #endif
342 
343  // By definition we preserve the proxy. We also preserve all analyses on
344  // Loops. This precludes *any* invalidation of loop analyses by the proxy,
345  // but that's OK because we've taken care to invalidate analyses in the
346  // loop analysis manager incrementally above.
347  PA.preserveSet<AllAnalysesOn<Loop>>();
348  PA.preserve<LoopAnalysisManagerFunctionProxy>();
349  // We also preserve the set of standard analyses.
350  PA.preserve<DominatorTreeAnalysis>();
351  PA.preserve<LoopAnalysis>();
352  PA.preserve<ScalarEvolutionAnalysis>();
353  if (UseBlockFrequencyInfo && F.hasProfileData())
354  PA.preserve<BlockFrequencyAnalysis>();
355  if (UseBranchProbabilityInfo && F.hasProfileData())
356  PA.preserve<BranchProbabilityAnalysis>();
357  if (UseMemorySSA)
358  PA.preserve<MemorySSAAnalysis>();
359  return PA;
360 }
361 
363 PrintLoopPass::PrintLoopPass(raw_ostream &OS, const std::string &Banner)
364  : OS(OS), Banner(Banner) {}
365 
368  LPMUpdater &) {
369  printLoop(L, OS, Banner);
370  return PreservedAnalyses::all();
371 }
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:876
llvm::TargetIRAnalysis
Analysis pass providing the TargetTransformInfo.
Definition: TargetTransformInfo.h:2586
llvm::ScalarEvolutionAnalysis
Analysis pass that exposes the ScalarEvolution for a function.
Definition: ScalarEvolution.h:2158
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
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:1865
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:774
llvm::Function
Definition: Function.h:60
llvm::Loop
Represents a single loop in the control flow graph.
Definition: LoopInfo.h:547
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:699
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:320
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::LPMUpdater::markLoopNestChanged
void markLoopNestChanged(bool Changed)
Loopnest passes should use this method to indicate if the loopnest has been modified.
Definition: LoopPassManager.h:365
llvm::FunctionToLoopPassAdaptor::run
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
Runs the loop passes across every loop in the function.
Definition: LoopPassManager.cpp:197
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:114
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
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:977
llvm::LoopBase::verifyLoop
void verifyLoop() const
Verify loop structure.
Definition: LoopInfoImpl.h:302
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:145
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:53
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:189
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:13893
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:254
llvm::PrintLoopPass::run
PreservedAnalyses run(Loop &L, LoopAnalysisManager &, LoopStandardAnalysisResults &, LPMUpdater &)
Definition: LoopPassManager.cpp:366
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:700
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:265
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:192
llvm::Loop::isRecursivelyLCSSAForm
bool isRecursivelyLCSSAForm(const DominatorTree &DT, const LoopInfo &LI, bool IgnoreTokens=true) const
Return true if this Loop and all inner subloops are in LCSSA form.
Definition: LoopInfo.cpp:469
LoopPassManager.h
llvm::MemorySSAAnalysis
An analysis that produces MemorySSA for a function.
Definition: MemorySSA.h:934
llvm::PassInstrumentation::popBeforeNonSkippedPassCallback
void popBeforeNonSkippedPassCallback()
Definition: PassInstrumentation.h:324
llvm::LoopInfo
Definition: LoopInfo.h:1108
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
llvm::appendLoopsToWorklist
void appendLoopsToWorklist(RangeT &&, SmallPriorityWorklist< Loop *, 4 > &)
Utility that implements appending of loops onto a worklist given a range.
Definition: LoopUtils.cpp:1525
llvm::LoopBase::isOutermost
bool isOutermost() const
Return true if the loop does not have a parent (natural) loop.
Definition: LoopInfo.h:185
llvm::LoopStandardAnalysisResults::LI
LoopInfo & LI
Definition: LoopAnalysisManager.h:55
BlockFrequencyInfo.h
llvm::AMDGPUISD::BFI
@ BFI
Definition: AMDGPUISelLowering.h:432
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:229
llvm::PrintLoopPass::PrintLoopPass
PrintLoopPass()
Definition: LoopPassManager.cpp:362
llvm::PreservedAnalyses::all
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
Definition: PassManager.h:158
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::PriorityWorklist< T, SmallVector< T, N >, SmallDenseMap< T, ptrdiff_t > >::pop_back_val
T pop_back_val()
Definition: PriorityWorklist.h:153
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:151
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::LPMUpdater::isLoopNestChanged
bool isLoopNestChanged() const
Definition: LoopPassManager.h:359
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:971
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:594
llvm::InnerAnalysisManagerProxy
An analysis over an "outer" IR unit that provides access to an analysis manager over an "inner" IR un...
Definition: PassManager.h:931
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:450
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:1268