[PATCH] D81472: [Matrix] Update load/store intrinsics.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 9 08:46:08 PDT 2020


fhahn created this revision.
fhahn added reviewers: anemet, Gerolf, hfinkel, andrew.w.kaylor, LuoYuanke, nicolasvasilache, rjmccall.
Herald added subscribers: tschuett, jdoerfert, hiraditya.
Herald added a project: LLVM.

This patch adjust the load/store matrix intrinsics, formerly known as
llvm.matrix.columnwise.load/store, to improve the naming and allow
passing of extra information (volatile).

The patch performs the following changes:

- Rename columnwise.load/store to column.major.load/store. This is more expressive and also more in line with the naming in Clang.
- Changes the shape and stride arguments from i32 to i64. All 3 arguments could in theory be larger than a i32 and there is no real reason for restricting them. For the immargs, there should be no change in practice. This makes things more uniform with the way things are handled in Clang.
- A new boolean argument is added to indicate whether the load/store is volatile. The lowering respects that when emitting vector load/store instructions
- MatrixBuilder is updated to require both Alignment and IsVolatile arguments, which are passed through to the generated intrinsic. The alignment is set using the `align` attribute.

The changes are grouped together in a single patch, to have a single
commit that breaks the compatibility. We probably should be fine with
updating the intrinsics, as we did not yet officially support them in
the last stable release. If there are any concerns, we can add
auto-upgrade rules for the columnwise intrinsics though.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D81472

Files:
  llvm/docs/LangRef.rst
  llvm/include/llvm/IR/Intrinsics.td
  llvm/include/llvm/IR/MatrixBuilder.h
  llvm/lib/IR/Verifier.cpp
  llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
  llvm/test/Transforms/LowerMatrixIntrinsics/bigger-expressions-double.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/const-gep.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/multiply-add-sub-double-row-major.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/propagate-backward.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/propagate-forward.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/propagate-mixed-users.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/propagate-multiple-iterations.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/remarks-inlining.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/remarks-shared-subtrees.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/remarks.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/strided-load-double.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/strided-load-float.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/strided-load-i32.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/strided-store-double.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/strided-store-float.ll
  llvm/test/Transforms/LowerMatrixIntrinsics/strided-store-i32.ll
  llvm/test/Verifier/matrix-intrinsics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81472.269550.patch
Type: text/x-patch
Size: 97827 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200609/3f06d299/attachment-0001.bin>


More information about the llvm-commits mailing list