20 #define DEBUG_TYPE "transform-warning" 30 "FailedRequestedUnrolling",
32 <<
"loop not unrolled: the optimizer was unable to perform the " 33 "requested transformation; the transformation might be disabled or " 34 "specified as part of an unsupported transformation ordering");
41 "FailedRequestedUnrollAndJamming",
43 <<
"loop not unroll-and-jammed: the optimizer was unable to perform " 44 "the requested transformation; the transformation might be disabled " 45 "or specified as part of an unsupported transformation ordering");
58 "FailedRequestedVectorization",
60 <<
"loop not vectorized: the optimizer was unable to perform the " 61 "requested transformation; the transformation might be disabled " 62 "or specified as part of an unsupported transformation ordering");
66 "FailedRequestedInterleaving",
68 <<
"loop not interleaved: the optimizer was unable to perform the " 69 "requested transformation; the transformation might be disabled " 70 "or specified as part of an unsupported transformation ordering");
77 "FailedRequestedDistribution",
79 <<
"loop not distributed: the optimizer was unable to perform the " 80 "requested transformation; the transformation might be disabled or " 81 "specified as part of an unsupported transformation ordering");
109 class WarnMissedTransformationsLegacy :
public FunctionPass {
113 explicit WarnMissedTransformationsLegacy() :
FunctionPass(ID) {
122 auto &ORE = getAnalysis<OptimizationRemarkEmitterWrapperPass>().getORE();
123 auto &LI = getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
141 "Warn about non-applied transformations",
false,
false)
148 return new WarnMissedTransformationsLegacy();
Pass interface - Implemented by all 'passes'.
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
This class represents lattice values for constants.
constexpr T getValueOr(U &&value) const LLVM_LVALUE_FUNCTION
bool hasFnAttribute(Attribute::AttrKind Kind) const
Return true if the function has the attribute.
AnalysisUsage & addRequired()
#define INITIALIZE_PASS_DEPENDENCY(depName)
Diagnostic information for optimization failures.
TransformationMode hasUnrollAndJamTransformation(Loop *L)
Analysis pass that exposes the LoopInfo for a function.
BlockT * getHeader() const
static bool runOnFunction(Function &F, bool PostInlining)
A set of analyses that are preserved following a run of a transformation pass.
llvm::Optional< int > getOptionalIntLoopAttribute(Loop *TheLoop, StringRef Name)
Find named metadata for a loop with an integer value.
Represent the analysis usage information of a pass.
TransformationMode hasDistributeTransformation(Loop *L)
TransformationMode hasVectorizeTransformation(Loop *L)
FunctionPass class - This class is used to implement most global optimizations.
Pass * createWarnMissedTransformationsPass()
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
DebugLoc getStartLoc() const
Return the debug location of the start of this loop.
INITIALIZE_PASS_END(RegBankSelect, DEBUG_TYPE, "Assign register bank of generic virtual registers", false, false) RegBankSelect
The transformation was directed by the user, e.g.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
void setPreservesAll()
Set by analyses that do not transform their input at all.
Represents a single loop in the control flow graph.
TransformationMode hasUnrollTransformation(Loop *L)
void initializeWarnMissedTransformationsLegacyPass(PassRegistry &)
OutputIt transform(R &&Range, OutputIt d_first, UnaryPredicate P)
Wrapper function around std::transform to apply a function to a range and store the result elsewhere...
SmallVector< LoopT *, 4 > getLoopsInPreorder()
Return all of the loops in the function in preorder across the loop nests, with siblings in forward p...
The legacy pass manager's analysis pass to compute loop information.
A container for analyses that lazily runs them and caches their results.