Only high padding is supported at the moment. Low padding will be added in a separate commit.
Here and below spell out the type when it doesn't come from something like initializers like cast<Foo>(...). (https://llvm.org/docs/CodingStandards.html#id28)
nit: Maybe merge the two conditions?
should this use affine_expressions instead to potentially allow simplifications?
Lei's original revision was using affine maps. I was wondering what the benefit of those is. These "sub", "add" etc. helper functions are using "createOrFold", so constants will be folded. Is there any other benefit?
The. advantage of using affine expressions is that they are easier to analyze and simplify later in the pipeline. This is what is used later for tiling of structured linalg op so it might be good to have it like that here if it is not too complex.