[PATCH] D79547: [MLIR] Fix affine fusion bug/efficiency issue / enable more fusion

Uday Bondhugula via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 6 22:10:26 PDT 2020


bondhugula marked 2 inline comments as done.
bondhugula added inline comments.


================
Comment at: mlir/lib/Transforms/LoopFusion.cpp:1628
               auto loadMemRef = cast<AffineLoadOp>(loadOpInst).getMemRef();
-              if (visitedMemrefs.count(loadMemRef) == 0)
+              // NOTE: Change 'loads' to a hash set in case efficiency is an
+              // issue. We still use a vector since it's expected to be small.
----------------
andydavis1 wrote:
> Is this a TODO: consider using a hash set if performance becomes an issue?
It's not really a TODO at this point. A vector should be fine unless there are use cases where this is shown to be a bottleneck. We are only going to have a handful of ops, and if we have hundreds for some use case, there'd also other places to address.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79547





More information about the llvm-commits mailing list