MLIR  20.0.0git
Classes | Namespaces | Enumerations | Functions | Variables
GreedyPatternRewriteDriver.h File Reference
#include "mlir/Rewrite/FrozenRewritePatternSet.h"

Go to the source code of this file.

Classes

class  mlir::GreedyRewriteConfig
 This class allows control over how the GreedyPatternRewriteDriver works. More...
 

Namespaces

 mlir
 Include the generated interface declarations.
 

Enumerations

enum class  mlir::GreedyRewriteStrictness { mlir::AnyOp , mlir::ExistingAndNewOps , mlir::ExistingOps }
 This enum controls which ops are put on the worklist during a greedy pattern rewrite. More...
 
enum class  mlir::GreedySimplifyRegionLevel { mlir::Disabled , mlir::Normal , mlir::Aggressive }
 

Functions

LogicalResult mlir::applyPatternsGreedily (Region &region, const FrozenRewritePatternSet &patterns, GreedyRewriteConfig config=GreedyRewriteConfig(), bool *changed=nullptr)
 Rewrite ops in the given region, which must be isolated from above, by repeatedly applying the highest benefit patterns in a greedy worklist driven manner until a fixpoint is reached. More...
 
LogicalResult mlir::applyPatternsAndFoldGreedily (Region &region, const FrozenRewritePatternSet &patterns, GreedyRewriteConfig config=GreedyRewriteConfig(), bool *changed=nullptr)
 Same as applyPatternsAndGreedily above with folding. More...
 
LogicalResult mlir::applyPatternsGreedily (Operation *op, const FrozenRewritePatternSet &patterns, GreedyRewriteConfig config=GreedyRewriteConfig(), bool *changed=nullptr)
 Rewrite ops nested under the given operation, which must be isolated from above, by repeatedly applying the highest benefit patterns in a greedy worklist driven manner until a fixpoint is reached. More...
 
LogicalResult mlir::applyPatternsAndFoldGreedily (Operation *op, const FrozenRewritePatternSet &patterns, GreedyRewriteConfig config=GreedyRewriteConfig(), bool *changed=nullptr)
 Same as applyPatternsGreedily above with folding. More...
 
LogicalResult mlir::applyOpPatternsGreedily (ArrayRef< Operation * > ops, const FrozenRewritePatternSet &patterns, GreedyRewriteConfig config=GreedyRewriteConfig(), bool *changed=nullptr, bool *allErased=nullptr)
 Rewrite the specified ops by repeatedly applying the highest benefit patterns in a greedy worklist driven manner until a fixpoint is reached. More...
 
 mlir::LLVM_DEPRECATED ("Use applyOpPatternsGreedily() instead", "applyOpPatternsGreedily") inline LogicalResult applyOpPatternsAndFold(ArrayRef< Operation * > ops
 Same as applyOpPatternsGreedily with folding. More...
 

Variables

const FrozenRewritePatternSet & mlir::patterns
 
const FrozenRewritePatternSet GreedyRewriteConfig mlir::config = GreedyRewriteConfig()
 
const FrozenRewritePatternSet GreedyRewriteConfig bool * mlir::changed = nullptr