This is an archive of the discontinued LLVM Phabricator instance.

Canonicalize affine set + operands while adding affine.if op domain
ClosedPublic

Authored by bondhugula on Jan 8 2023, 9:24 PM.

Details

Summary

Canonicalize affine set + operands in addAffineIfOpDomain. This is to
ensure a unique set of operands for FlatAffineValueConstraints and in
general to provide a simplified set of constraints. For the latter
scenario, this just leads to efficiency improvements as opposed to
functionality.

Fixes: https://github.com/llvm/llvm-project/issues/59461

Diff Detail

Event Timeline

bondhugula created this revision.Jan 8 2023, 9:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 8 2023, 9:24 PM
bondhugula requested review of this revision.Jan 8 2023, 9:24 PM
bondhugula edited the summary of this revision. (Show Details)Jan 8 2023, 9:42 PM

NFC - remove dead stuff from AffineStructures.h

Lewuathe added inline comments.Jan 9 2023, 10:33 PM
mlir/test/Transforms/memref-dependence-check.mlir
1090

Do we need to call multiple affine.store to reproduce the situation originally reported?

ftynse accepted this revision.Jan 10 2023, 2:16 AM
This revision is now accepted and ready to land.Jan 10 2023, 2:16 AM
bondhugula marked an inline comment as done.Jan 10 2023, 7:27 AM
bondhugula added inline comments.
mlir/test/Transforms/memref-dependence-check.mlir
1090

Not for dependence checking. To test this change, a single store is sufficient when exercised from dependence analysis. It's the load in the empty set that's key. For scalrep, yes, dependence analysis is triggered when you have multiple stores - to check whether the second store intervenes.

This revision was automatically updated to reflect the committed changes.
bondhugula marked an inline comment as done.