[PATCH] D71821: [LoopFusion] Move instructions from FC1.Preheader to FC0.Preheader when proven safe.

Whitney Tsang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 25 10:39:10 PST 2019


Whitney added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/CodeMoverUtils.cpp:485
+    I.moveBefore(MovePos);
+  }
+}
----------------
jdoerfert wrote:
> `while (FromBB.size() > 1)` might be easier, with `*I = FromBB.front()`.
> 
> Why do you take the DT, PDT, DI? I would not or just them to `assert(isSafe..)`
Forgot to add the isSafeToMoveBefore check, there is no need to check for this use case, but this utility can be use by user that didn't check beforehand. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71821





More information about the llvm-commits mailing list