21#define DEBUG_TYPE "transform-warning"
31 "FailedRequestedUnrolling",
32 L->getStartLoc(), L->getHeader())
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",
43 L->getStartLoc(), L->getHeader())
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");
51 std::optional<ElementCount> VectorizeWidth =
53 std::optional<int> InterleaveCount =
56 if (!VectorizeWidth || VectorizeWidth->isVector())
59 "FailedRequestedVectorization",
60 L->getStartLoc(), L->getHeader())
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",
68 L->getStartLoc(), L->getHeader())
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",
79 L->getStartLoc(), L->getHeader())
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");
A container for analyses that lazily runs them and caches their results.
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
Diagnostic information for optimization failures.
Analysis pass that exposes the LoopInfo for a function.
SmallVector< LoopT *, 4 > getLoopsInPreorder() const
Return all of the loops in the function in preorder across the loop nests, with siblings in forward p...
Represents a single loop in the control flow graph.
A set of analyses that are preserved following a run of a transformation pass.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
This is an optimization pass for GlobalISel generic memory operations.
std::optional< ElementCount > getOptionalElementCountLoopAttribute(const Loop *TheLoop)
Find a combination of metadata ("llvm.loop.vectorize.width" and "llvm.loop.vectorize....
TransformationMode hasVectorizeTransformation(const Loop *L)
TransformationMode hasUnrollAndJamTransformation(const Loop *L)
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
TransformationMode hasUnrollTransformation(const Loop *L)
TransformationMode hasDistributeTransformation(const Loop *L)
std::optional< int > getOptionalIntLoopAttribute(const Loop *TheLoop, StringRef Name)
Find named metadata for a loop with an integer value.
@ TM_ForcedByUser
The transformation was directed by the user, e.g.