While most of methods in ViewLikeInterface accept an OpFoldResult for
the offset/size/stride that may be static, represented as Attribute,
or dynamic, represented as Value, the Range abstraction only
accepted Values. This can often lead to known-constant
offset/size/strides being materialized into constant operations and
hinder further constant propagation without explicitly running the
constant folding pass. This often leads to a more complicated than
necessary addressing code being emitted. Switch Range to use
OpFoldResult. Code that uses Range currently keeps materializing the
constants to minimize the effect of this change on the IR. Further
commits will make use of this.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Nice! Always wanted this, but it also means changes to downstream usages, but worth it for me!
mlir/lib/Dialect/Linalg/Transforms/ElementwiseOpFusion.cpp | ||
---|---|---|
1413 | Could we check for this condition and fail early. So move it all the way to the top. Sorry, I know this is not part of the change really, but then you wont need the #ifndef NDEBUG eyesore... |
Could we check for this condition and fail early. So move it all the way to the top. Sorry, I know this is not part of the change really, but then you wont need the #ifndef NDEBUG eyesore...