[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
Loading
Please register or sign in to comment