[llvm] a0ce643 - [Matrix] Remove unused matrix-propagate-shape option.
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Fri May 21 11:04:01 PDT 2021
Author: Florian Hahn
Date: 2021-05-21T19:01:54+01:00
New Revision: a0ce6439cace9806aa303fa4a412c7b5cea7eca4
URL: https://github.com/llvm/llvm-project/commit/a0ce6439cace9806aa303fa4a412c7b5cea7eca4
DIFF: https://github.com/llvm/llvm-project/commit/a0ce6439cace9806aa303fa4a412c7b5cea7eca4.diff
LOG: [Matrix] Remove unused matrix-propagate-shape option.
The option was used during the initial bringup, but it does not add any
value at this point. Remove it.
Reviewed By: anemet
Differential Revision: https://reviews.llvm.org/D102930
Added:
Modified:
llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp b/llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
index fbc7e9031e6e..9b33df0fbe96 100644
--- a/llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
+++ b/llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
@@ -50,11 +50,6 @@ using namespace PatternMatch;
#define DEBUG_TYPE "lower-matrix-intrinsics"
-static cl::opt<bool> EnableShapePropagation(
- "matrix-propagate-shape", cl::init(true), cl::Hidden,
- cl::desc("Enable/disable shape propagation from matrix intrinsics to other "
- "instructions."));
-
static cl::opt<bool>
FuseMatrix("fuse-matrix", cl::init(true), cl::Hidden,
cl::desc("Enable/disable fusing matrix instructions."));
@@ -660,33 +655,32 @@ class LowerMatrixIntrinsics {
}
bool Visit() {
- if (EnableShapePropagation) {
- SmallVector<Instruction *, 32> WorkList;
-
- // Initially only the shape of matrix intrinsics is known.
- // Initialize the work list with ops carrying shape information.
- for (BasicBlock &BB : Func)
- for (Instruction &Inst : BB) {
- IntrinsicInst *II = dyn_cast<IntrinsicInst>(&Inst);
- if (!II)
- continue;
+ SmallVector<Instruction *, 32> WorkList;
+
+ // Initially only the shape of matrix intrinsics is known.
+ // Initialize the work list with ops carrying shape information.
+ for (BasicBlock &BB : Func)
+ for (Instruction &Inst : BB) {
+ IntrinsicInst *II = dyn_cast<IntrinsicInst>(&Inst);
+ if (!II)
+ continue;
- switch (II->getIntrinsicID()) {
- case Intrinsic::matrix_multiply:
- case Intrinsic::matrix_transpose:
- case Intrinsic::matrix_column_major_load:
- case Intrinsic::matrix_column_major_store:
- WorkList.push_back(&Inst);
- break;
- default:
- break;
- }
+ switch (II->getIntrinsicID()) {
+ case Intrinsic::matrix_multiply:
+ case Intrinsic::matrix_transpose:
+ case Intrinsic::matrix_column_major_load:
+ case Intrinsic::matrix_column_major_store:
+ WorkList.push_back(&Inst);
+ break;
+ default:
+ break;
}
- // Propagate shapes until nothing changes any longer.
- while (!WorkList.empty()) {
- WorkList = propagateShapeForward(WorkList);
- WorkList = propagateShapeBackward(WorkList);
}
+
+ // Propagate shapes until nothing changes any longer.
+ while (!WorkList.empty()) {
+ WorkList = propagateShapeForward(WorkList);
+ WorkList = propagateShapeBackward(WorkList);
}
bool Changed = false;
More information about the llvm-commits
mailing list