MLIR  18.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 56 of file LoopFusionUtils.h.

Member Enumeration Documentation

◆ StrategyEnum

Enumerator
Generic 
ProducerConsumer 
Sibling 

Definition at line 58 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 79 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 86 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 92 of file LoopFusionUtils.h.

References Sibling.

◆ getStrategy()

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

Returns the fusion strategy.

Definition at line 89 of file LoopFusionUtils.h.

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


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