Bubble up extract_slice above Linalg operation.
A sequence of operations
%0 = linalg.<op> ... arg0, arg1, ... %1 = tensor.extract_slice %0 ...
can be replaced with
%0 = tensor.extract_slice %arg0 %1 = tensor.extract_slice %arg1 %2 = linalg.<op> ... %0, %1, ...
This results in the reduce computation of the linalg operation.
Instead of doing this, I'd just convert OpFoldResult to Value by insert arith.constant <val> : index operations for cases where it is holding an integer attribute and then use applyMapToValues. This will canonicalize back anyway.