[all-commits] [llvm/llvm-project] 665299: [mlir][Transforms] Add a utility method to move va...

MaheshRavishankar via All-commits all-commits at lists.llvm.org
Wed Mar 12 08:31:05 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 665299eb3e7a142199e2c22eb294c5e01ef1655d
      https://github.com/llvm/llvm-project/commit/665299eb3e7a142199e2c22eb294c5e01ef1655d
  Author: MaheshRavishankar <1663364+MaheshRavishankar at users.noreply.github.com>
  Date:   2025-03-12 (Wed, 12 Mar 2025)

  Changed paths:
    M mlir/include/mlir/Transforms/RegionUtils.h
    M mlir/lib/Transforms/Utils/RegionUtils.cpp
    M mlir/test/Transforms/move-operation-deps.mlir
    M mlir/test/lib/Transforms/TestTransformsOps.cpp
    M mlir/test/lib/Transforms/TestTransformsOps.td

  Log Message:
  -----------
  [mlir][Transforms] Add a utility method to move value definitions. (#130874)

https://github.com/llvm/llvm-project/commit/205c5325b3c771d94feb0ec07e8ad89d27c2b29e
added a transform utility that moved all SSA dependences of an operation
before an insertion point. Similar to that, this PR adds a transform
utility function, `moveValueDefinitions` to move the slice of operations
that define all values in a `ValueRange` before the insertion point.
While very similar to `moveOperationDependencies`, this method differs
in a few ways

1. When computing the backward slice since the start of the slice is
value, the slice computed needs to be inclusive.
2. The combined backward slice needs to be sorted topologically before
moving them to avoid SSA use-def violations while moving individual ops.

The PR also adds a new transform op to test this new utility function.

---------

Signed-off-by: MaheshRavishankar <mahesh.ravishankar at gmail.com>



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