MLIR
20.0.0git
|
The result of a transform IR operation application. More...
#include "mlir/Dialect/Transform/Utils/DiagnosedSilenceableFailure.h"
Public Member Functions | |
DiagnosedSilenceableFailure (const DiagnosedSilenceableFailure &)=delete | |
DiagnosedSilenceableFailure & | operator= (const DiagnosedSilenceableFailure &)=delete |
DiagnosedSilenceableFailure (DiagnosedSilenceableFailure &&)=default | |
DiagnosedSilenceableFailure & | operator= (DiagnosedSilenceableFailure &&)=default |
LogicalResult | checkAndReport () |
Converts all kinds of failure into a LogicalResult failure, emitting the diagnostic if necessary. More... | |
bool | succeeded () const |
Returns true if this is a success. More... | |
bool | isDefiniteFailure () const |
Returns true if this is a definite failure. More... | |
bool | isSilenceableFailure () const |
Returns true if this is a silenceable failure. More... | |
std::string | getMessage () const |
Returns the diagnostic message without emitting it. More... | |
std::string | getStatusString () const |
Returns a string representation of the failure mode (for error reporting). More... | |
LogicalResult | silence () |
Converts silenceable failure into LogicalResult success without reporting the diagnostic, preserves the other states. More... | |
void | takeDiagnostics (SmallVectorImpl< Diagnostic > &diags) |
Take the diagnostics and silence. More... | |
template<typename T > | |
DiagnosedSilenceableFailure & | operator<< (T &&value) & |
Streams the given values into the last diagnostic. More... | |
template<typename T > | |
DiagnosedSilenceableFailure && | operator<< (T &&value) && |
Diagnostic & | attachNote (std::optional< Location > loc=std::nullopt) |
Attaches a note to the last diagnostic. More... | |
Static Public Member Functions | |
static DiagnosedSilenceableFailure | success () |
Constructs a DiagnosedSilenceableFailure in the success state. More... | |
static DiagnosedSilenceableFailure | definiteFailure () |
Constructs a DiagnosedSilenceableFailure in the failure state. More... | |
static DiagnosedSilenceableFailure | silenceableFailure (Diagnostic &&diag) |
Constructs a DiagnosedSilenceableFailure in the silenceable failure state, ready to emit the given diagnostic. More... | |
static DiagnosedSilenceableFailure | silenceableFailure (SmallVector< Diagnostic > &&diag) |
The result of a transform IR operation application.
This can have one of the three states:
Definition at line 38 of file DiagnosedSilenceableFailure.h.
|
delete |
|
default |
|
inline |
Attaches a note to the last diagnostic.
Expects this object to be a silenceable failure.
Definition at line 140 of file DiagnosedSilenceableFailure.h.
Referenced by mlir::transform::TransformState::applyTransform().
LogicalResult mlir::DiagnosedSilenceableFailure::checkAndReport | ( | ) |
Converts all kinds of failure into a LogicalResult failure, emitting the diagnostic if necessary.
Must not be called more than once.
Definition at line 19 of file DiagnosedSilenceableFailure.cpp.
|
inlinestatic |
Constructs a DiagnosedSilenceableFailure in the failure state.
Typically, a diagnostic has been emitted before this.
Definition at line 54 of file DiagnosedSilenceableFailure.h.
Referenced by mlir::transform::TransformState::applyTransform(), dispatchMappedValues(), mlir::DiagnosedDefiniteFailure::operator DiagnosedSilenceableFailure(), and pipelineForSharedCopies().
|
inline |
Returns the diagnostic message without emitting it.
Expects this object to be a silenceable failure.
Definition at line 89 of file DiagnosedSilenceableFailure.h.
Referenced by mlir::transform::TransformState::applyTransform().
|
inline |
Returns a string representation of the failure mode (for error reporting).
Definition at line 99 of file DiagnosedSilenceableFailure.h.
|
inline |
Returns true
if this is a definite failure.
Definition at line 80 of file DiagnosedSilenceableFailure.h.
Referenced by mlir::transform::TransformState::applyTransform().
|
inline |
Returns true
if this is a silenceable failure.
Definition at line 85 of file DiagnosedSilenceableFailure.h.
Referenced by mlir::transform::TransformState::applyTransform().
|
inline |
Streams the given values into the last diagnostic.
Expects this object to be a silenceable failure.
Definition at line 127 of file DiagnosedSilenceableFailure.h.
|
inline |
Definition at line 134 of file DiagnosedSilenceableFailure.h.
|
delete |
|
default |
|
inline |
Converts silenceable failure into LogicalResult success without reporting the diagnostic, preserves the other states.
Definition at line 109 of file DiagnosedSilenceableFailure.h.
Referenced by mlir::transform::TransformState::applyTransform(), and mlir::transform::TransformRewriter::silenceTrackingFailure().
|
inlinestatic |
Constructs a DiagnosedSilenceableFailure in the silenceable failure state, ready to emit the given diagnostic.
This is considered a failure regardless of the diagnostic severity.
Definition at line 61 of file DiagnosedSilenceableFailure.h.
References diag().
Referenced by mlir::transform::ErrorCheckingTrackingListener::notifyPayloadReplacementNotFound().
|
inlinestatic |
Definition at line 65 of file DiagnosedSilenceableFailure.h.
References diag().
|
inline |
Returns true
if this is a success.
Definition at line 75 of file DiagnosedSilenceableFailure.h.
Referenced by mlir::transform::TransformState::applyTransform(), and verifyGpuMapping().
|
inlinestatic |
Constructs a DiagnosedSilenceableFailure in the success state.
Definition at line 48 of file DiagnosedSilenceableFailure.h.
Referenced by mlir::transform::gpu::alterGpuLaunch(), mlir::transform::TransformState::applyTransform(), mlir::transform::ErrorCheckingTrackingListener::checkAndResetError(), mlir::transform::gpu::checkGpuLimits(), checkMappingAttributeTypes(), checkMappingSpec(), checkRepeatedConsumptionInOperand(), containsAll(), mlir::transform::gpu::createGpuLaunch(), dispatchMappedValues(), ensurePayloadIsSeparateFromTransform(), mlir::transform::expandTargetSpecification(), mlir::transform::TrackingListener::findReplacementOp(), mlir::transform::gpu::findTopLevelForallOp(), getThreadIdBuilder(), mlir::transform::gpu::mapForallToBlocksImpl(), mlir::transform::gpu::mapNestedForallToThreadsImpl(), mlir::transform::gpu::mapOneForallToThreadsImpl(), pipelineForSharedCopies(), rewriteOneForallCommonImpl(), verifyFunctionLikeConsumeAnnotations(), verifyGpuMapping(), and verifyYieldingSingleBlockOp().
|
inline |
Take the diagnostics and silence.
Definition at line 118 of file DiagnosedSilenceableFailure.h.