[PATCH] D77723: [MLIR] Constant fold multiplies in deriveStaticUpperBound.

Alexander Belyaev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 9 06:28:45 PDT 2020


pifon2a accepted this revision.
pifon2a added a comment.
This revision is now accepted and ready to land.

Thank you!



================
Comment at: mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp:509
                                     PatternRewriter &rewriter) {
+  if (ConstantIndexOp op =
+          dyn_cast_or_null<ConstantIndexOp>(upperBound.getDefiningOp())) {
----------------
nit: s/ConstantIndexOp op/auto op/


================
Comment at: mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp:525
+
+  if (MulIOp multiplyOp =
+          dyn_cast_or_null<MulIOp>(upperBound.getDefiningOp())) {
----------------
nit: s/MulIOp multiplyOp/auto multiplyOp 

in general, I think there is/was even a clang-tidy check that suggests to use 
auto name = bla.cast<Type>;
instead of
Type name = bla.cast<Type>;


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77723





More information about the llvm-commits mailing list