[llvm-branch-commits] [mlir] fc7818f - [mlir][vector] rephrased description
Aart Bik via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Dec 4 14:05:59 PST 2020
Author: Aart Bik
Date: 2020-12-04T14:00:49-08:00
New Revision: fc7818f5d6906555cebad2c2e7c313a383b9cb82
URL: https://github.com/llvm/llvm-project/commit/fc7818f5d6906555cebad2c2e7c313a383b9cb82
DIFF: https://github.com/llvm/llvm-project/commit/fc7818f5d6906555cebad2c2e7c313a383b9cb82.diff
LOG: [mlir][vector] rephrased description
More carefully worded description. Added constructor to options.
Reviewed By: nicolasvasilache
Differential Revision: https://reviews.llvm.org/D92664
Added:
Modified:
mlir/include/mlir/Conversion/Passes.td
mlir/include/mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.h
Removed:
################################################################################
diff --git a/mlir/include/mlir/Conversion/Passes.td b/mlir/include/mlir/Conversion/Passes.td
index 6c99d84ea30a..53158afa0530 100644
--- a/mlir/include/mlir/Conversion/Passes.td
+++ b/mlir/include/mlir/Conversion/Passes.td
@@ -394,9 +394,10 @@ def ConvertVectorToLLVM : Pass<"convert-vector-to-llvm", "ModuleOp"> {
Convert operations from the vector dialect into the LLVM IR dialect
operations. The lowering pass provides several options to control
- the kind of optimizations that are allowed. It also provides options
- that augment the architectural-neutral vector dialect with
- architectural-specific dialects (AVX512, Neon, etc.).
+ the kinds of optimizations that are allowed. It also provides options
+ that enable the use of one or more architectural-specific dialects
+ (AVX512, Neon, SVE, etc.) in combination with the architectural-neutral
+ vector dialect lowering.
}];
let constructor = "mlir::createConvertVectorToLLVMPass()";
@@ -411,7 +412,8 @@ def ConvertVectorToLLVM : Pass<"convert-vector-to-llvm", "ModuleOp"> {
"faster code">,
Option<"enableAVX512", "enable-avx512",
"bool", /*default=*/"false",
- "Augments the vector dialect with the AVX512 dialect during lowering">
+ "Enables the use of AVX512 dialect while lowering the vector "
+ "dialect.">
];
}
diff --git a/mlir/include/mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.h b/mlir/include/mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.h
index 435a148e2b10..e6a515aa4564 100644
--- a/mlir/include/mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.h
+++ b/mlir/include/mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.h
@@ -21,9 +21,10 @@ class OperationPass;
/// This should kept in sync with VectorToLLVM options defined for the
/// ConvertVectorToLLVM pass in include/mlir/Conversion/Passes.td
struct LowerVectorToLLVMOptions {
- bool reassociateFPReductions = false;
- bool enableIndexOptimizations = true;
- bool enableAVX512 = false;
+ LowerVectorToLLVMOptions()
+ : reassociateFPReductions(false), enableIndexOptimizations(true),
+ enableAVX512(false) {}
+
LowerVectorToLLVMOptions &setReassociateFPReductions(bool b) {
reassociateFPReductions = b;
return *this;
@@ -36,6 +37,10 @@ struct LowerVectorToLLVMOptions {
enableAVX512 = b;
return *this;
}
+
+ bool reassociateFPReductions;
+ bool enableIndexOptimizations;
+ bool enableAVX512;
};
/// Collect a set of patterns to convert from Vector contractions to LLVM Matrix
More information about the llvm-branch-commits
mailing list