LLVM 19.0.0git
Classes | Namespaces | Functions | Variables
LoopInfo.h File Reference
#include "llvm/ADT/GraphTraits.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/PassManager.h"
#include "llvm/Pass.h"
#include "llvm/Support/GenericLoopInfo.h"
#include <algorithm>
#include <optional>
#include <utility>

Go to the source code of this file.

Classes

class  llvm::Loop
 Represents a single loop in the control flow graph. More...
 
class  llvm::Loop::LocRange
 A range representing the start and end location of a loop. More...
 
struct  llvm::Loop::LoopBounds
 Below are some utilities to get the loop guard, loop bounds and induction variable, and to check if a given phinode is an auxiliary induction variable, if the loop is guarded, and if the loop is canonical. More...
 
class  llvm::LoopInfo
 
struct  llvm::GraphTraits< const Loop * >
 
struct  llvm::GraphTraits< Loop * >
 
class  llvm::LoopAnalysis
 Analysis pass that exposes the LoopInfo for a function. More...
 
class  llvm::LoopPrinterPass
 Printer pass for the LoopAnalysis results. More...
 
struct  llvm::LoopVerifierPass
 Verifier pass for the LoopAnalysis results. More...
 
class  llvm::LoopInfoWrapperPass
 The legacy pass manager's analysis pass to compute loop information. More...
 

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

Functions

void llvm::printLoop (Loop &L, raw_ostream &OS, const std::string &Banner="")
 Function to print a loop's contents as LLVM's text IR assembly.
 
MDNodellvm::findOptionMDForLoopID (MDNode *LoopID, StringRef Name)
 Find and return the loop attribute node for the attribute Name in LoopID.
 
MDNodellvm::findOptionMDForLoop (const Loop *TheLoop, StringRef Name)
 Find string metadata for a loop.
 
std::optional< boolllvm::getOptionalBoolLoopAttribute (const Loop *TheLoop, StringRef Name)
 
bool llvm::getBooleanLoopAttribute (const Loop *TheLoop, StringRef Name)
 Returns true if Name is applied to TheLoop and enabled.
 
std::optional< int > llvm::getOptionalIntLoopAttribute (const Loop *TheLoop, StringRef Name)
 Find named metadata for a loop with an integer value.
 
int llvm::getIntLoopAttribute (const Loop *TheLoop, StringRef Name, int Default=0)
 Find named metadata for a loop with an integer value.
 
std::optional< const MDOperand * > llvm::findStringMetadataForLoop (const Loop *TheLoop, StringRef Name)
 Find string metadata for loop.
 
bool llvm::hasMustProgress (const Loop *L)
 Look for the loop attribute that requires progress within the loop.
 
bool llvm::isMustProgress (const Loop *L)
 Return true if this loop can be assumed to make progress.
 
bool llvm::isFinite (const Loop *L)
 Return true if this loop can be assumed to run for a finite number of iterations.
 
bool llvm::isValidAsAccessGroup (MDNode *AccGroup)
 Return whether an MDNode might represent an access group.
 
llvm::MDNodellvm::makePostTransformationMetadata (llvm::LLVMContext &Context, MDNode *OrigLoopID, llvm::ArrayRef< llvm::StringRef > RemovePrefixes, llvm::ArrayRef< llvm::MDNode * > AddAttrs)
 Create a new LoopID after the loop has been transformed.
 

Variables

bool llvm::VerifyLoopInfo = false
 Enable verification of loop info.