MLIR 24.0.0git
mlir::remark::RemarkEmittingPolicyFinal Class Reference

Policy that emits only the last remark reported for each identity, see DenseMapInfo<Remark>. More...

#include "mlir/IR/Remarks.h"

Inheritance diagram for mlir::remark::RemarkEmittingPolicyFinal:

Public Member Functions

 RemarkEmittingPolicyFinal ()
void reportRemark (const detail::Remark &remark) override
void forEachPendingRemark (llvm::function_ref< void(const detail::Remark &)> callback) const override
 Visit pending candidates. Must not overlap finalize().
void forEachPendingRemarkAt (Location loc, llvm::function_ref< void(const detail::Remark &)> callback) const override
 Visit pending remarks at the complete location.
void finalize () override
 Emit each survivor once, grouping related remarks after their parents.
Public Member Functions inherited from mlir::remark::detail::RemarkEmittingPolicyBase
 RemarkEmittingPolicyBase ()=default
virtual ~RemarkEmittingPolicyBase ()=default
void initialize (ReportFn fn)

Additional Inherited Members

Protected Attributes inherited from mlir::remark::detail::RemarkEmittingPolicyBase
ReportFn reportImpl

Detailed Description

Policy that emits only the last remark reported for each identity, see DenseMapInfo<Remark>.

Remarks are stored until finalize().

Definition at line 796 of file Remarks.h.

Constructor & Destructor Documentation

◆ RemarkEmittingPolicyFinal()

mlir::remark::RemarkEmittingPolicyFinal::RemarkEmittingPolicyFinal ( )
default

Member Function Documentation

◆ finalize()

void mlir::remark::RemarkEmittingPolicyFinal::finalize ( )
overridevirtual

Emit each survivor once, grouping related remarks after their parents.

Visit roots with IDs in ID order, then ID-less roots in unspecified order. Finally, start traversals from any unvisited remarks in ID order. Links to IDs replaced in this batch are removed; IDs outside this batch are preserved without validation. Call after reports and queries stop. Callbacks must not reenter the policy. Later calls emit only new remarks.

Implements mlir::remark::detail::RemarkEmittingPolicyBase.

Definition at line 608 of file Remarks.cpp.

References mlir::remark::dropDiscardedLinks(), emit(), and mlir::remark::detail::RemarkEmittingPolicyBase::reportImpl.

◆ forEachPendingRemark()

void mlir::remark::RemarkEmittingPolicyFinal::forEachPendingRemark ( llvm::function_ref< void(const detail::Remark &)> callback) const
overridevirtual

Visit pending candidates. Must not overlap finalize().

Reimplemented from mlir::remark::detail::RemarkEmittingPolicyBase.

Definition at line 586 of file Remarks.cpp.

◆ forEachPendingRemarkAt()

void mlir::remark::RemarkEmittingPolicyFinal::forEachPendingRemarkAt ( Location loc,
llvm::function_ref< void(const detail::Remark &)> callback ) const
overridevirtual

Visit pending remarks at the complete location.

The default filters the existing visitor; policies may override this to use a location index.

Reimplemented from mlir::remark::detail::RemarkEmittingPolicyBase.

Definition at line 593 of file Remarks.cpp.

◆ reportRemark()

void mlir::remark::RemarkEmittingPolicyFinal::reportRemark ( const detail::Remark & remark)
overridevirtual

Implements mlir::remark::detail::RemarkEmittingPolicyBase.

Definition at line 568 of file Remarks.cpp.

References copy().


The documentation for this class was generated from the following files: