DK_Linker,
DK_DebugMetadataVersion,
DK_DebugMetadataInvalid,
+ DK_ISelFallback,
DK_SampleProfile,
DK_OptimizationRemark,
DK_OptimizationRemarkMissed,
}
};
+/// Diagnostic information for ISel fallback path.
+class DiagnosticInfoISelFallback : public DiagnosticInfo {
+ /// The function that is concerned by this diagnostic.
+ const Function &Fn;
+
+public:
+ DiagnosticInfoISelFallback(const Function &Fn,
+ DiagnosticSeverity Severity = DS_Warning)
+ : DiagnosticInfo(DK_ISelFallback, Severity), Fn(Fn) {}
+
+ const Function &getFunction() const { return Fn; }
+
+ void print(DiagnosticPrinter &DP) const override;
+
+ static bool classof(const DiagnosticInfo *DI) {
+ return DI->getKind() == DK_ISelFallback;
+ }
+};
+
// Create wrappers for C Binding types (see CBindingWrapping.h).
DEFINE_SIMPLE_CONVERSION_FUNCTIONS(DiagnosticInfo, LLVMDiagnosticInfoRef)
Ctx.diagnose(DiagnosticInfoOptimizationFailure(
Fn, DLoc, Twine("loop not interleaved: " + Msg)));
}
+
+void DiagnosticInfoISelFallback::print(DiagnosticPrinter &DP) const {
+ DP << "Instruction selection used fallback path for " << getFunction();
+}