|
LLVM 22.0.0git
|
#include "llvm/Analysis/Delinearization.h"#include "llvm/Analysis/LoopInfo.h"#include "llvm/Analysis/ScalarEvolution.h"#include "llvm/Analysis/ScalarEvolutionDivision.h"#include "llvm/Analysis/ScalarEvolutionExpressions.h"#include "llvm/IR/Constants.h"#include "llvm/IR/DerivedTypes.h"#include "llvm/IR/Function.h"#include "llvm/IR/InstIterator.h"#include "llvm/IR/Instructions.h"#include "llvm/IR/PassManager.h"#include "llvm/Support/CommandLine.h"#include "llvm/Support/Debug.h"#include "llvm/Support/raw_ostream.h"Go to the source code of this file.
Macros | |
| #define | DL_NAME "delinearize" |
| #define | DEBUG_TYPE DL_NAME |
Functions | |
| static bool | containsUndefs (const SCEV *S) |
| static bool | findArrayDimensionsRec (ScalarEvolution &SE, SmallVectorImpl< const SCEV * > &Terms, SmallVectorImpl< const SCEV * > &Sizes) |
| static bool | containsParameters (SmallVectorImpl< const SCEV * > &Terms) |
| static int | numberOfTerms (const SCEV *S) |
| static const SCEV * | removeConstantFactors (ScalarEvolution &SE, const SCEV *T) |
| static std::optional< APInt > | tryIntoAPInt (const SCEV *S) |
| static bool | collectConstantAbsSteps (ScalarEvolution &SE, const SCEV *Expr, SmallVectorImpl< uint64_t > &Steps, uint64_t ElementSize) |
| Collects the absolute values of constant steps for all induction variables. | |
Variables | |
| static cl::opt< bool > | UseFixedSizeArrayHeuristic ("delinearize-use-fixed-size-array-heuristic", cl::init(false), cl::Hidden, cl::desc("When printing analysis, use the heuristic for fixed-size arrays " "if the default delinearizetion fails.")) |
| #define DEBUG_TYPE DL_NAME |
Definition at line 34 of file Delinearization.cpp.
| #define DL_NAME "delinearize" |
Definition at line 33 of file Delinearization.cpp.
|
static |
Collects the absolute values of constant steps for all induction variables.
Returns true if we can prove that all step recurrences are constants and Expr is divisible by ElementSize. Each step recurrence is stored in Steps after divided by ElementSize.
Definition at line 491 of file Delinearization.cpp.
References collectConstantAbsSteps(), llvm::dyn_cast(), llvm::SCEVAddRecExpr::getStart(), llvm::SCEVAddRecExpr::getStepRecurrence(), llvm::SCEVAddRecExpr::isAffine(), Mod, llvm::SmallVectorTemplateBase< T, bool >::push_back(), tryIntoAPInt(), llvm::APInt::tryZExtValue(), and llvm::APInt::udivrem().
Referenced by collectConstantAbsSteps(), and llvm::findFixedSizeArrayDimensions().
|
inlinestatic |
Definition at line 248 of file Delinearization.cpp.
References llvm::isa(), llvm::SCEVExprContains(), and T.
Referenced by llvm::findArrayDimensions().
Definition at line 42 of file Delinearization.cpp.
References llvm::dyn_cast(), llvm::isa(), and llvm::SCEVExprContains().
|
static |
Definition at line 203 of file Delinearization.cpp.
References llvm::SCEVDivision::divide(), llvm::dyn_cast(), E(), llvm::erase_if(), findArrayDimensionsRec(), llvm::ScalarEvolution::getMulExpr(), llvm::isa(), llvm::Last, llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by llvm::findArrayDimensions(), and findArrayDimensionsRec().
Definition at line 257 of file Delinearization.cpp.
References llvm::dyn_cast().
Referenced by llvm::findArrayDimensions().
|
static |
Definition at line 263 of file Delinearization.cpp.
References llvm::dyn_cast(), llvm::ScalarEvolution::getMulExpr(), llvm::isa(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and T.
Referenced by llvm::findArrayDimensions().
Definition at line 481 of file Delinearization.cpp.
References llvm::dyn_cast().
Referenced by collectConstantAbsSteps(), and llvm::findFixedSizeArrayDimensions().
|
static |