Polly 20.0.0git
|
#include "polly/ScopInfo.h"
#include "polly/LinkAllPasses.h"
#include "polly/Options.h"
#include "polly/ScopBuilder.h"
#include "polly/ScopDetection.h"
#include "polly/Support/GICHelper.h"
#include "polly/Support/ISLOStream.h"
#include "polly/Support/ISLTools.h"
#include "polly/Support/SCEVAffinator.h"
#include "polly/Support/SCEVValidator.h"
#include "polly/Support/ScopHelper.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/ADT/Sequence.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/Loads.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/OptimizationRemarkEmitter.h"
#include "llvm/Analysis/RegionInfo.h"
#include "llvm/Analysis/RegionIterator.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/ConstantRange.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/PassManager.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Value.h"
#include "llvm/InitializePasses.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include "isl/aff.h"
#include "isl/local_space.h"
#include "isl/map.h"
#include "isl/options.h"
#include "isl/set.h"
#include <cassert>
#include <numeric>
#include "polly/Support/PollyDebug.h"
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "polly-scops" |
Functions | |
STATISTIC (AssumptionsAliasing, "Number of aliasing assumptions taken.") | |
STATISTIC (AssumptionsInbounds, "Number of inbounds assumptions taken.") | |
STATISTIC (AssumptionsWrapping, "Number of wrapping assumptions taken.") | |
STATISTIC (AssumptionsUnsigned, "Number of unsigned assumptions taken.") | |
STATISTIC (AssumptionsComplexity, "Number of too complex SCoPs.") | |
STATISTIC (AssumptionsUnprofitable, "Number of unprofitable SCoPs.") | |
STATISTIC (AssumptionsErrorBlock, "Number of error block assumptions taken.") | |
STATISTIC (AssumptionsInfiniteLoop, "Number of bounded loop assumptions taken.") | |
STATISTIC (AssumptionsInvariantLoad, "Number of invariant loads assumptions taken.") | |
STATISTIC (AssumptionsDelinearization, "Number of delinearization assumptions taken.") | |
STATISTIC (NumScops, "Number of feasible SCoPs after ScopInfo") | |
STATISTIC (NumLoopsInScop, "Number of loops in scops") | |
STATISTIC (NumBoxedLoops, "Number of boxed loops in SCoPs after ScopInfo") | |
STATISTIC (NumAffineLoops, "Number of affine loops in SCoPs after ScopInfo") | |
STATISTIC (NumScopsDepthZero, "Number of scops with maximal loop depth 0") | |
STATISTIC (NumScopsDepthOne, "Number of scops with maximal loop depth 1") | |
STATISTIC (NumScopsDepthTwo, "Number of scops with maximal loop depth 2") | |
STATISTIC (NumScopsDepthThree, "Number of scops with maximal loop depth 3") | |
STATISTIC (NumScopsDepthFour, "Number of scops with maximal loop depth 4") | |
STATISTIC (NumScopsDepthFive, "Number of scops with maximal loop depth 5") | |
STATISTIC (NumScopsDepthLarger, "Number of scops with maximal loop depth 6 and larger") | |
STATISTIC (MaxNumLoopsInScop, "Maximal number of loops in scops") | |
STATISTIC (NumValueWrites, "Number of scalar value writes after ScopInfo") | |
STATISTIC (NumValueWritesInLoops, "Number of scalar value writes nested in affine loops after ScopInfo") | |
STATISTIC (NumPHIWrites, "Number of scalar phi writes after ScopInfo") | |
STATISTIC (NumPHIWritesInLoops, "Number of scalar phi writes nested in affine loops after ScopInfo") | |
STATISTIC (NumSingletonWrites, "Number of singleton writes after ScopInfo") | |
STATISTIC (NumSingletonWritesInLoops, "Number of singleton writes nested in affine loops after ScopInfo") | |
static cl::opt< bool > | PollyRemarksMinimal ("polly-remarks-minimal", cl::desc("Do not emit remarks about assumptions that are known"), cl::Hidden, cl::cat(PollyCategory)) |
static cl::opt< bool > | IslOnErrorAbort ("polly-on-isl-error-abort", cl::desc("Abort if an isl error is encountered"), cl::init(true), cl::cat(PollyCategory)) |
static cl::opt< bool > | PollyPreciseInbounds ("polly-precise-inbounds", cl::desc("Take more precise inbounds assumptions (do not scale well)"), cl::Hidden, cl::init(false), cl::cat(PollyCategory)) |
static cl::opt< bool > | PollyIgnoreParamBounds ("polly-ignore-parameter-bounds", cl::desc("Do not add parameter bounds and do no gist simplify sets accordingly"), cl::Hidden, cl::init(false), cl::cat(PollyCategory)) |
static cl::opt< bool > | PollyPreciseFoldAccesses ("polly-precise-fold-accesses", cl::desc("Fold memory accesses to model more possible delinearizations " "(does not scale well)"), cl::Hidden, cl::init(false), cl::cat(PollyCategory)) |
static cl::opt< bool, true > | XUseInstructionNames ("polly-use-llvm-names", cl::desc("Use LLVM-IR names when deriving statement names"), cl::location(UseInstructionNames), cl::Hidden, cl::cat(PollyCategory)) |
static cl::opt< bool > | PollyPrintInstructions ("polly-print-instructions", cl::desc("Output instructions per ScopStmt"), cl::Hidden, cl::Optional, cl::init(false), cl::cat(PollyCategory)) |
static cl::list< std::string > | IslArgs ("polly-isl-arg", cl::value_desc("argument"), cl::desc("Option passed to ISL"), cl::cat(PollyCategory)) |
static isl::set | addRangeBoundsToSet (isl::set S, const ConstantRange &Range, int dim, isl::dim type) |
static const ScopArrayInfo * | identifyBasePtrOriginSAI (Scop *S, Value *BasePtr) |
static isl::map | getEqualAndLarger (isl::space SetDomain) |
static isl::set | simplifyAssumptionContext (isl::set AssumptionContext, const Scop &S) |
static std::string | toString (AssumptionKind Kind) |
void | updateLoopCountStatistic (ScopDetection::LoopStats Stats, Scop::ScopStatistics ScopStats) |
INITIALIZE_PASS_BEGIN (ScopInfoRegionPass, "polly-scops", "Polly - Create polyhedral description of Scops", false, false) | |
INITIALIZE_PASS_DEPENDENCY (AAResultsWrapperPass) | |
INITIALIZE_PASS_DEPENDENCY (AssumptionCacheTracker) | |
INITIALIZE_PASS_DEPENDENCY (LoopInfoWrapperPass) | |
INITIALIZE_PASS_DEPENDENCY (RegionInfoPass) | |
INITIALIZE_PASS_DEPENDENCY (ScalarEvolutionWrapperPass) | |
INITIALIZE_PASS_DEPENDENCY (ScopDetectionWrapperPass) | |
INITIALIZE_PASS_DEPENDENCY (DominatorTreeWrapperPass) | |
INITIALIZE_PASS_END (ScopInfoRegionPass, "polly-scops", "Polly - Create polyhedral description of Scops", false, false) namespace | |
INITIALIZE_PASS_BEGIN (ScopInfoPrinterLegacyRegionPass, "polly-print-scops", "Polly - Print polyhedral description of Scops", false, false) | |
INITIALIZE_PASS_DEPENDENCY (ScopInfoRegionPass) | |
INITIALIZE_PASS_END (ScopInfoPrinterLegacyRegionPass, "polly-print-scops", "Polly - Print polyhedral description of Scops", false, false) ScopInfo | |
INITIALIZE_PASS_BEGIN (ScopInfoWrapperPass, "polly-function-scops", "Polly - Create polyhedral description of all Scops of a function", false, false) | |
INITIALIZE_PASS_END (ScopInfoWrapperPass, "polly-function-scops", "Polly - Create polyhedral description of all Scops of a function", false, false) namespace | |
INITIALIZE_PASS_BEGIN (ScopInfoPrinterLegacyFunctionPass, "polly-print-function-scops", "Polly - Print polyhedral description of all Scops of a function", false, false) | |
INITIALIZE_PASS_DEPENDENCY (ScopInfoWrapperPass) | |
Variables | |
static int const | MaxDisjunctsInContext = 4 |
static int const | MaxDisjunktsInDefinedBehaviourContext = 8 |
#define DEBUG_TYPE "polly-scops" |
Definition at line 77 of file ScopInfo.cpp.
|
static |
Definition at line 174 of file ScopInfo.cpp.
References Ctx, MaxDisjunctsInContext, Range, isl::val::sub(), type, isl::set::unite(), and polly::valFromAPInt().
Referenced by polly::Scop::addParameterBounds(), and polly::MemoryAccess::computeBoundsOnAccessRelation().
|
static |
Definition at line 980 of file ScopInfo.cpp.
References isl::map::domain_tuple_dim(), isl::map::equate(), isl::in, isl::space::map_from_set(), isl::map::order_lt(), isl::out, isl::size::release(), and isl::map::universe().
Referenced by polly::MemoryAccess::getStride().
|
static |
Definition at line 208 of file ScopInfo.cpp.
Referenced by polly::ScopArrayInfo::ScopArrayInfo().
INITIALIZE_PASS_BEGIN | ( | ScopInfoPrinterLegacyFunctionPass | , |
"polly-print-function-scops" | , | ||
"Polly - Print polyhedral description of all Scops of a function" | , | ||
false | , | ||
false | |||
) |
INITIALIZE_PASS_BEGIN | ( | ScopInfoPrinterLegacyRegionPass | , |
"polly-print-scops" | , | ||
"Polly - Print polyhedral description of Scops" | , | ||
false | , | ||
false | |||
) |
INITIALIZE_PASS_BEGIN | ( | ScopInfoRegionPass | , |
"polly-scops" | , | ||
"Polly - Create polyhedral description of Scops" | , | ||
false | , | ||
false | |||
) |
INITIALIZE_PASS_BEGIN | ( | ScopInfoWrapperPass | , |
"polly-function-scops" | , | ||
"Polly - Create polyhedral description of all Scops of a function" | , | ||
false | , | ||
false | |||
) |
INITIALIZE_PASS_DEPENDENCY | ( | AAResultsWrapperPass | ) |
INITIALIZE_PASS_DEPENDENCY | ( | AssumptionCacheTracker | ) |
INITIALIZE_PASS_DEPENDENCY | ( | DominatorTreeWrapperPass | ) |
INITIALIZE_PASS_DEPENDENCY | ( | LoopInfoWrapperPass | ) |
INITIALIZE_PASS_DEPENDENCY | ( | RegionInfoPass | ) |
INITIALIZE_PASS_DEPENDENCY | ( | ScalarEvolutionWrapperPass | ) |
INITIALIZE_PASS_DEPENDENCY | ( | ScopDetectionWrapperPass | ) |
INITIALIZE_PASS_DEPENDENCY | ( | ScopInfoRegionPass | ) |
INITIALIZE_PASS_DEPENDENCY | ( | ScopInfoWrapperPass | ) |
INITIALIZE_PASS_END | ( | ScopInfoPrinterLegacyRegionPass | , |
"polly-print-scops" | , | ||
"Polly - Print polyhedral description of Scops" | , | ||
false | , | ||
false | |||
) |
Definition at line 2697 of file ScopInfo.cpp.
INITIALIZE_PASS_END | ( | ScopInfoRegionPass | , |
"polly-scops" | , | ||
"Polly - Create polyhedral description of Scops" | , | ||
false | , | ||
false | |||
) |
Print result from ScopInfoRegionPass.
Definition at line 2647 of file ScopInfo.cpp.
References polly::ScopInfoRegionPass::print().
INITIALIZE_PASS_END | ( | ScopInfoWrapperPass | , |
"polly-function-scops" | , | ||
"Polly - Create polyhedral description of all Scops of a function" | , | ||
false | , | ||
false | |||
) |
Print result from ScopInfoWrapperPass.
Definition at line 2829 of file ScopInfo.cpp.
References Function, and polly::ScopInfoWrapperPass::print().
|
static |
Referenced by polly::Scop::Scop().
|
static |
Referenced by polly::Scop::Scop().
|
static |
Referenced by polly::Scop::realignParams().
|
static |
Referenced by polly::MemoryAccess::foldAccessRelation().
|
static |
Referenced by polly::MemoryAccess::assumeNoOutOfBound().
|
static |
|
static |
Referenced by polly::Scop::trackAssumption().
Definition at line 1540 of file ScopInfo.cpp.
References isl::set::gist_params().
Referenced by polly::Scop::simplifyContexts().
STATISTIC | ( | AssumptionsAliasing | , |
"Number of aliasing assumptions taken." | |||
) |
STATISTIC | ( | AssumptionsComplexity | , |
"Number of too complex SCoPs." | |||
) |
STATISTIC | ( | AssumptionsDelinearization | , |
"Number of delinearization assumptions taken." | |||
) |
STATISTIC | ( | AssumptionsErrorBlock | , |
"Number of error block assumptions taken." | |||
) |
STATISTIC | ( | AssumptionsInbounds | , |
"Number of inbounds assumptions taken." | |||
) |
STATISTIC | ( | AssumptionsInfiniteLoop | , |
"Number of bounded loop assumptions taken." | |||
) |
STATISTIC | ( | AssumptionsInvariantLoad | , |
"Number of invariant loads assumptions taken." | |||
) |
STATISTIC | ( | AssumptionsUnprofitable | , |
"Number of unprofitable SCoPs." | |||
) |
STATISTIC | ( | AssumptionsUnsigned | , |
"Number of unsigned assumptions taken." | |||
) |
STATISTIC | ( | AssumptionsWrapping | , |
"Number of wrapping assumptions taken." | |||
) |
STATISTIC | ( | MaxNumLoopsInScop | , |
"Maximal number of loops in scops" | |||
) |
STATISTIC | ( | NumAffineLoops | , |
"Number of affine loops in SCoPs after ScopInfo" | |||
) |
STATISTIC | ( | NumBoxedLoops | , |
"Number of boxed loops in SCoPs after ScopInfo" | |||
) |
STATISTIC | ( | NumLoopsInScop | , |
"Number of loops in scops" | |||
) |
STATISTIC | ( | NumPHIWrites | , |
"Number of scalar phi writes after ScopInfo" | |||
) |
STATISTIC | ( | NumPHIWritesInLoops | , |
"Number of scalar phi writes nested in affine loops after ScopInfo" | |||
) |
STATISTIC | ( | NumScops | , |
"Number of feasible SCoPs after ScopInfo" | |||
) |
STATISTIC | ( | NumScopsDepthFive | , |
"Number of scops with maximal loop depth 5" | |||
) |
STATISTIC | ( | NumScopsDepthFour | , |
"Number of scops with maximal loop depth 4" | |||
) |
STATISTIC | ( | NumScopsDepthLarger | , |
"Number of scops with maximal loop depth 6 and larger" | |||
) |
STATISTIC | ( | NumScopsDepthOne | , |
"Number of scops with maximal loop depth 1" | |||
) |
STATISTIC | ( | NumScopsDepthThree | , |
"Number of scops with maximal loop depth 3" | |||
) |
STATISTIC | ( | NumScopsDepthTwo | , |
"Number of scops with maximal loop depth 2" | |||
) |
STATISTIC | ( | NumScopsDepthZero | , |
"Number of scops with maximal loop depth 0" | |||
) |
STATISTIC | ( | NumSingletonWrites | , |
"Number of singleton writes after ScopInfo" | |||
) |
STATISTIC | ( | NumSingletonWritesInLoops | , |
"Number of singleton writes nested in affine loops after ScopInfo" | |||
) |
STATISTIC | ( | NumValueWrites | , |
"Number of scalar value writes after ScopInfo" | |||
) |
STATISTIC | ( | NumValueWritesInLoops | , |
"Number of scalar value writes nested in affine loops after ScopInfo" | |||
) |
|
static |
Definition at line 1908 of file ScopInfo.cpp.
References polly::ALIASING, polly::COMPLEXITY, polly::DELINEARIZATION, polly::ERRORBLOCK, polly::INBOUNDS, polly::INFINITELOOP, polly::INVARIANTLOAD, polly::PROFITABLE, polly::UNSIGNED, and polly::WRAPPING.
Referenced by polly::Scop::trackAssumption().
void updateLoopCountStatistic | ( | ScopDetection::LoopStats | Stats, |
Scop::ScopStatistics | ScopStats | ||
) |
Definition at line 2562 of file ScopInfo.cpp.
References assert, polly::ScopDetection::LoopStats::MaxDepth, polly::Scop::ScopStatistics::NumAffineLoops, polly::Scop::ScopStatistics::NumBoxedLoops, polly::ScopDetection::LoopStats::NumLoops, polly::Scop::ScopStatistics::NumPHIWrites, polly::Scop::ScopStatistics::NumPHIWritesInLoops, polly::Scop::ScopStatistics::NumSingletonWrites, polly::Scop::ScopStatistics::NumSingletonWritesInLoops, polly::Scop::ScopStatistics::NumValueWrites, and polly::Scop::ScopStatistics::NumValueWritesInLoops.
|
static |
|
static |
Definition at line 123 of file ScopInfo.cpp.
Referenced by addRangeBoundsToSet().
|
static |
Definition at line 127 of file ScopInfo.cpp.
Referenced by polly::Scop::intersectDefinedBehavior().