MLIR 22.0.0git
mlir::LLVM::MergeFragments Class Reference

Adjacent DW_OP_LLVM_fragment should be merged into one. More...

#include "mlir/Dialect/LLVMIR/Transforms/DIExpressionLegalization.h"

Inheritance diagram for mlir::LLVM::MergeFragments:

Public Member Functions

OpIterT match (OpIterRange operators) const override
 Checks whether a particular prefix of operators matches this pattern.
SmallVector< OperatorTreplace (OpIterRange operators) const override
 Replace the operators with a new list of operators.
Public Member Functions inherited from mlir::LLVM::DIExpressionRewriter::ExprRewritePattern
virtual ~ExprRewritePattern ()=default

Additional Inherited Members

Public Types inherited from mlir::LLVM::DIExpressionRewriter::ExprRewritePattern
using OperatorT = DIExpressionRewriter::OperatorT
using OpIterT = std::deque<OperatorT>::const_iterator
using OpIterRange = llvm::iterator_range<OpIterT>

Detailed Description

Adjacent DW_OP_LLVM_fragment should be merged into one.

E.g. #llvm.di_expression<[ DW_OP_LLVM_fragment(32, 32), DW_OP_LLVM_fragment(32, 64) ]> => #llvm.di_expression<[DW_OP_LLVM_fragment(64, 32)]>

Definition at line 34 of file DIExpressionLegalization.h.

Member Function Documentation

◆ match()

MergeFragments::OpIterT MergeFragments::match ( OpIterRange ) const
overridevirtual

Checks whether a particular prefix of operators matches this pattern.

The provided argument is guaranteed non-empty. Return the iterator after the last matched element.

Implements mlir::LLVM::DIExpressionRewriter::ExprRewritePattern.

Definition at line 20 of file DIExpressionLegalization.cpp.

◆ replace()

SmallVector< MergeFragments::OperatorT > MergeFragments::replace ( OpIterRange ) const
overridevirtual

Replace the operators with a new list of operators.

The provided argument is guaranteed to be the same length as returned by the match function.

Implements mlir::LLVM::DIExpressionRewriter::ExprRewritePattern.

Definition at line 35 of file DIExpressionLegalization.cpp.


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