HomePhabricator

[mlir] Remove over specified memory effects

Authored by youngar on Jan 14 2021, 2:07 AM.

Description

[mlir] Remove over specified memory effects

The standard and gpu dialect both have alloc operations which use the
memory effect MemAlloc. In both cases, it is specified on both the
operation itself and on the result. This results in two memory effects
being created for these operations. When MemAlloc is defined on an
operation, it represents some background effect which the compiler
cannot reason about, and inhibits the ability of the compiler to
remove dead std.alloc operations. This change removes the uneeded
MemAlloc effect from these operations and leaves the effect on the
result, which allows dead allocs to be erased.

There is the same problem, but to a lesser extent, with MemFree, MemRead
and MemWrite. Over-specifying these traits is not currently inhibiting
any optimization.

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

Details

Committed
youngarJan 14 2021, 2:49 PM
Differential Revision
D94662: [mlir] Remove over specified memory effects
Parents
rG8a53a7375a86: [RISCV][NFC] Regenerate Calling Convention Tests
Branches
Unknown
Tags
Unknown