[all-commits] [llvm/llvm-project] 36f2ef: [MLIR][Affine] Refactor dependence testing to work...
Uday Bondhugula via All-commits
all-commits at lists.llvm.org
Wed Sep 16 21:07:08 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 36f2ef2415e8cf5facf015bbe0d586deede34d66
https://github.com/llvm/llvm-project/commit/36f2ef2415e8cf5facf015bbe0d586deede34d66
Author: Uday Bondhugula <uday at polymagelabs.com>
Date: 2026-09-17 (Thu, 17 Sep 2026)
Changed paths:
M mlir/include/mlir/Dialect/Affine/Analysis/AffineAnalysis.h
M mlir/lib/Dialect/Affine/Analysis/AffineAnalysis.cpp
Log Message:
-----------
[MLIR][Affine] Refactor dependence testing to work on relations, not just on operations (#223188)
This change is effectively NFC for all users of affine dependence
analysis in the tree or outside. It performs a minor refactoring of the
API to allow more general usage.
`checkMemrefAccessDependence` takes two `MemRefAccess`es, each wrapping
an operation, so it can only be asked about accesses that already exist.
A transformation deciding whether to make a change has the opposite
question: whether the accesses it is about to create would depend on
each other. Loop fusion is one -- whether the stores of a slice would
still be one-to-one in the loops it is about to be placed under settles
whether their parallelism survives it, and it has to know before it
fuses.
Nothing in the dependence analysis needs the operations. Everything from
the point where the two access relations are in hand -- inverting one,
composing, adding the ordering constraints, testing the result for
emptiness -- is already relation-only. Split that out as
`checkAccessDependence`, taking the relations and the loop depth, and
leave `checkMemrefAccessDependence` as the operation-based entry point:
it keeps what genuinely reads the IR, the memref and write-op checks,
the affine scope and common block ones, and the
source-precedes-destination one that a depth past the shared loops calls
for.
Split `MemRefAccess::getAccessRelation` the same way. The relation is
built out of an access map and an iteration domain, and only the two of
them being read off an operation ties it to one, so `getAccessRelation`
takes them directly and the method reads them off and calls it.
Assisted by Claude.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list