Polly 20.0.0git
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
polly::PolyhedralInfo Class Referencefinal

#include <PolyhedralInfo.h>

Inheritance diagram for polly::PolyhedralInfo:
Inheritance graph
[legend]

Public Member Functions

 PolyhedralInfo ()
 Construct a new PolyhedralInfo pass.
 
 ~PolyhedralInfo ()
 
bool isParallel (llvm::Loop *L) const
 Check if a given loop is parallel.
 
const ScopgetScopContainingLoop (llvm::Loop *L) const
 Return the SCoP containing the L loop.
 
__isl_give isl_union_mapgetScheduleForLoop (const Scop *S, llvm::Loop *L) const
 Computes the partial schedule for the given L loop.
 
bool runOnFunction (llvm::Function &F) override
 Get the SCoP and dependence analysis information for F.
 
void releaseMemory () override
 Release the internal memory.
 
void print (llvm::raw_ostream &OS, const llvm::Module *M=nullptr) const override
 Print to OS if each dimension of a loop nest is parallel or not.
 
void getAnalysisUsage (llvm::AnalysisUsage &AU) const override
 Register all analyses and transformation required.
 

Static Public Attributes

static char ID = 0
 

Private Member Functions

bool checkParallel (llvm::Loop *L, __isl_give isl_pw_aff **MinDepDistPtr=nullptr) const
 Check if a given loop is parallel or vectorizable.
 

Private Attributes

ScopInfoSI
 
DependenceInfoWrapperPassDI
 

Detailed Description

Definition at line 34 of file PolyhedralInfo.h.

Constructor & Destructor Documentation

◆ PolyhedralInfo()

polly::PolyhedralInfo::PolyhedralInfo ( )
inline

Construct a new PolyhedralInfo pass.

Definition at line 39 of file PolyhedralInfo.h.

◆ ~PolyhedralInfo()

polly::PolyhedralInfo::~PolyhedralInfo ( )
inline

Definition at line 40 of file PolyhedralInfo.h.

Member Function Documentation

◆ checkParallel()

bool PolyhedralInfo::checkParallel ( llvm::Loop *  L,
__isl_give isl_pw_aff **  MinDepDistPtr = nullptr 
) const
private

Check if a given loop is parallel or vectorizable.

Parameters
LThe loop.
MinDepDistPtrIf not nullptr, the minimal dependence distance will be returned at the address of that pointer
Returns
Returns true if loop is parallel or vectorizable, false otherwise.

Definition at line 72 of file PolyhedralInfo.cpp.

References polly::Dependences::AL_Access, DI, polly::Dependences::getDependences(), polly::DependenceInfoWrapperPass::getDependences(), getScheduleForLoop(), getScopContainingLoop(), polly::Dependences::hasValidDependences(), isl_union_map_free(), polly::Dependences::isParallel(), POLLY_DEBUG, isl::union_map::release(), polly::Dependences::TYPE_RAW, polly::Dependences::TYPE_RED, polly::Dependences::TYPE_WAR, and polly::Dependences::TYPE_WAW.

Referenced by isParallel().

◆ getAnalysisUsage()

void PolyhedralInfo::getAnalysisUsage ( llvm::AnalysisUsage &  AU) const
override

Register all analyses and transformation required.

Definition at line 46 of file PolyhedralInfo.cpp.

◆ getScheduleForLoop()

__isl_give isl_union_map * PolyhedralInfo::getScheduleForLoop ( const Scop S,
llvm::Loop *  L 
) const

Computes the partial schedule for the given L loop.

Parameters
SThe SCoP containing the given loop
LThe loop.
Returns
Returns the partial schedule for the given loop

Definition at line 125 of file PolyhedralInfo.cpp.

References assert, isl_dim_in, isl_dim_out, isl_map_project_out(), isl_map_set_tuple_id(), isl_union_map_coalesce(), isl_union_map_empty(), isl_union_map_from_map(), isl_union_map_union(), and POLLY_DEBUG.

Referenced by checkParallel().

◆ getScopContainingLoop()

const Scop * PolyhedralInfo::getScopContainingLoop ( llvm::Loop *  L) const

Return the SCoP containing the L loop.

Parameters
LThe loop.
Returns
Returns the SCoP containing the given loop. Returns null if the loop is not contained in any SCoP.

Definition at line 102 of file PolyhedralInfo.cpp.

References assert, and SI.

Referenced by checkParallel().

◆ isParallel()

bool PolyhedralInfo::isParallel ( llvm::Loop *  L) const

Check if a given loop is parallel.

Parameters
LThe loop.
Returns
Returns true, if loop is parallel false otherwise.

Definition at line 100 of file PolyhedralInfo.cpp.

References checkParallel().

Referenced by print().

◆ print()

void PolyhedralInfo::print ( llvm::raw_ostream &  OS,
const llvm::Module *  M = nullptr 
) const
override

Print to OS if each dimension of a loop nest is parallel or not.

Definition at line 59 of file PolyhedralInfo.cpp.

References CheckParallel(), and isParallel().

Referenced by INITIALIZE_PASS_END().

◆ releaseMemory()

void polly::PolyhedralInfo::releaseMemory ( )
inlineoverride

Release the internal memory.

Definition at line 70 of file PolyhedralInfo.h.

◆ runOnFunction()

bool PolyhedralInfo::runOnFunction ( llvm::Function &  F)
override

Get the SCoP and dependence analysis information for F.

Definition at line 53 of file PolyhedralInfo.cpp.

References DI, and SI.

Member Data Documentation

◆ DI

DependenceInfoWrapperPass* polly::PolyhedralInfo::DI
private

Definition at line 92 of file PolyhedralInfo.h.

Referenced by checkParallel(), and runOnFunction().

◆ ID

char PolyhedralInfo::ID = 0
static

Definition at line 36 of file PolyhedralInfo.h.

◆ SI

ScopInfo* polly::PolyhedralInfo::SI
private

Definition at line 91 of file PolyhedralInfo.h.

Referenced by getScopContainingLoop(), and runOnFunction().


The documentation for this class was generated from the following files: