HomePhabricator

Refactor Reduction Tree Pass

Authored by msifontes on Aug 20 2020, 9:59 PM.

Description

Refactor Reduction Tree Pass

Refactor the way the reduction tree pass works in the MLIR Reduce tool by introducing a set of utilities that facilitate the implementation of new Reducer classes to be used in the passes.

This will allow for the fast implementation of general transformations to operate on all mlir modules as well as custom transformations for different dialects.

These utilities allow for the implementation of Reducer classes by simply defining a method that indexes the operations/blocks/regions to be transformed and a method to perform the deletion or transfomration based on the indexes.

Create the transformSpace class member in the ReductionNode class to keep track of the indexes that have already been transformed or deleted at a current level.

Delete the FunctionReducer class and replace it with the OpReducer class to reflect this new API while performing the same transformation and allowing the instantiation of a reduction pass for different types of operations at the module's highest hierarchichal level.

Modify the SinglePath Traversal method to reflect the use of the new API.

Reviewed: jpienaar

Differential Revision: https://reviews.llvm.org/D85591

Details

Committed
msifontesAug 20 2020, 9:59 PM
Differential Revision
D85591: Refactor Reduction Tree Pass
Parents
rG6d242a73264e: Revert "[DWARFYAML] Add support for referencing different abbrev tables."
Branches
Unknown
Tags
Unknown