[PATCH] D75195: [mlir][spirv] Add some folders for spv.LogicalAnd/spv.LogicalOr

Lei Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 26 12:39:06 PST 2020


antiagainst marked 4 inline comments as done.
antiagainst added a comment.

Comments addressed as https://github.com/llvm/llvm-project/commit/63779fb462d828d16b87f427a6490dded842ca15



================
Comment at: mlir/lib/Dialect/SPIRV/SPIRVCanonicalization.cpp:29
+/// the given `boolVal`.
+static bool isScalarOrSplatBoolAttr(Attribute boolAttr, bool boolVal) {
+  if (!boolAttr)
----------------
rriddle wrote:
> Would it be better to change this to something like:
> 
> `static Optional<bool> getScalarOrSplatBoolAttr(Attribute boolAttr)`
> 
> to avoid doing the same checks twice in each of the folders?
Good suggestion! Done.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75195/new/

https://reviews.llvm.org/D75195





More information about the llvm-commits mailing list