Go to the documentation of this file.
21 #define DEBUG_TYPE "transform-warning"
31 "FailedRequestedUnrolling",
33 <<
"loop not unrolled: the optimizer was unable to perform the "
34 "requested transformation; the transformation might be disabled or "
35 "specified as part of an unsupported transformation ordering");
42 "FailedRequestedUnrollAndJamming",
44 <<
"loop not unroll-and-jammed: the optimizer was unable to perform "
45 "the requested transformation; the transformation might be disabled "
46 "or specified as part of an unsupported transformation ordering");
56 if (!VectorizeWidth || VectorizeWidth->
isVector())
59 "FailedRequestedVectorization",
61 <<
"loop not vectorized: the optimizer was unable to perform the "
62 "requested transformation; the transformation might be disabled "
63 "or specified as part of an unsupported transformation ordering");
64 else if (InterleaveCount.
value_or(0) != 1)
67 "FailedRequestedInterleaving",
69 <<
"loop not interleaved: the optimizer was unable to perform the "
70 "requested transformation; the transformation might be disabled "
71 "or specified as part of an unsupported transformation ordering");
78 "FailedRequestedDistribution",
80 <<
"loop not distributed: the optimizer was unable to perform the "
81 "requested transformation; the transformation might be disabled or "
82 "specified as part of an unsupported transformation ordering");
110 class WarnMissedTransformationsLegacy :
public FunctionPass {
123 auto &ORE = getAnalysis<OptimizationRemarkEmitterWrapperPass>().getORE();
124 auto &LI = getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
142 "Warn about non-applied transformations",
false,
false)
149 return new WarnMissedTransformationsLegacy();
A set of analyses that are preserved following a run of a transformation pass.
TransformationMode hasUnrollTransformation(const Loop *L)
This is an optimization pass for GlobalISel generic memory operations.
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
Represents a single loop in the control flow graph.
DebugLoc getStartLoc() const
Return the debug location of the start of this loop.
The legacy pass manager's analysis pass to compute loop information.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
TransformationMode hasDistributeTransformation(const Loop *L)
llvm::Optional< int > getOptionalIntLoopAttribute(const Loop *TheLoop, StringRef Name)
Find named metadata for a loop with an integer value.
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
Represent the analysis usage information of a pass.
void initializeWarnMissedTransformationsLegacyPass(PassRegistry &)
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)
TransformationMode hasUnrollAndJamTransformation(const Loop *L)
INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
bool isVector() const
One or more elements.
@ TM_ForcedByUser
The transformation was directed by the user, e.g.
Optional< ElementCount > getOptionalElementCountLoopAttribute(const Loop *TheLoop)
Find a combination of metadata ("llvm.loop.vectorize.width" and "llvm.loop.vectorize....
OutputIt transform(R &&Range, OutputIt d_first, UnaryFunction F)
Wrapper function around std::transform to apply a function to a range and store the result elsewhere.
SmallVector< LoopT *, 4 > getLoopsInPreorder() const
Return all of the loops in the function in preorder across the loop nests, with siblings in forward p...
static bool runOnFunction(Function &F, bool PostInlining)
void setPreservesAll()
Set by analyses that do not transform their input at all.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
BlockT * getHeader() const
Diagnostic information for optimization failures.
Pass interface - Implemented by all 'passes'.
TransformationMode hasVectorizeTransformation(const Loop *L)
A container for analyses that lazily runs them and caches their results.
Pass * createWarnMissedTransformationsPass()
FunctionPass class - This class is used to implement most global optimizations.
AnalysisUsage & addRequired()
constexpr T value_or(U &&alt) const &
Analysis pass that exposes the LoopInfo for a function.