MLIR  20.0.0git
Public Types | Public Member Functions | List of all members
mlir::affine::FusionStrategy Class Reference

Describes the fusion strategy to be used in the Affine loop fusion utilities. More...

#include "mlir/Dialect/Affine/LoopFusionUtils.h"

Public Types

enum  StrategyEnum { Generic , ProducerConsumer , Sibling }
 

Public Member Functions

 FusionStrategy (StrategyEnum strategy)
 Construct a generic or producer-consumer fusion strategy. More...
 
 FusionStrategy (Value memref)
 Construct a sibling fusion strategy targeting 'memref'. More...
 
StrategyEnum getStrategy () const
 Returns the fusion strategy. More...
 
Value getSiblingFusionMemRef () const
 Returns the memref attached to this sibling fusion strategy. More...
 

Detailed Description

Describes the fusion strategy to be used in the Affine loop fusion utilities.

Currently, it is used to specialized the loop fusion utilities with the assumptions made in the AffineLoopFusion pass for producer-consumer and sibling fusion, while sharing a single implementation. The latter strategies are also limited to scenarios where a single memref is involved in the producer-consume or sibling relationship between the candidate loops. We use 'memref' to keep track of such a memref.

Definition at line 52 of file LoopFusionUtils.h.

Member Enumeration Documentation

◆ StrategyEnum

Enumerator
Generic 
ProducerConsumer 
Sibling 

Definition at line 54 of file LoopFusionUtils.h.

Constructor & Destructor Documentation

◆ FusionStrategy() [1/2]

mlir::affine::FusionStrategy::FusionStrategy ( StrategyEnum  strategy)
inline

Construct a generic or producer-consumer fusion strategy.

Definition at line 75 of file LoopFusionUtils.h.

References Sibling.

◆ FusionStrategy() [2/2]

mlir::affine::FusionStrategy::FusionStrategy ( Value  memref)
inline

Construct a sibling fusion strategy targeting 'memref'.

This construct should only be used for sibling fusion.

Definition at line 82 of file LoopFusionUtils.h.

Member Function Documentation

◆ getSiblingFusionMemRef()

Value mlir::affine::FusionStrategy::getSiblingFusionMemRef ( ) const
inline

Returns the memref attached to this sibling fusion strategy.

Definition at line 88 of file LoopFusionUtils.h.

References Sibling.

Referenced by mlir::affine::canFuseLoops().

◆ getStrategy()

StrategyEnum mlir::affine::FusionStrategy::getStrategy ( ) const
inline

Returns the fusion strategy.

Definition at line 85 of file LoopFusionUtils.h.

Referenced by mlir::affine::canFuseLoops().


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