Skip to content

[P1] A canonicalization pass #32

@tancheng

Description

@tancheng

Canonicalization is common in most dialects and lowerings.

A canonicalization pass should be able to be called multiple times at any place in lowering.

For now, what I can think about the functionalities of a canonicalization pass are:

  • Remove redundant phi operations, i.e., some phi operations inserted in basic block only have a single operand, which does not need to exist, unless the operand is from a backward mov.
  • 3 operands phi needs to be split into two dependent phi nodes.
    • We don't need this in canonicalization pass, as this is about respecting HW, which should be done explicitly by a HW-related lowering pass.

Metadata

Metadata

Assignees

Labels

new featureNew feature or request

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions