[PATCH] D65464: [LoopFusion] Add ability to fuse guarded loops

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 30 09:23:43 PDT 2019


reames added a comment.

In D65464#1651745 <https://reviews.llvm.org/D65464#1651745>, @kbarton wrote:

> Are there any other comments on this? 
>  If not, I'd like to get this committed and start working on the next patch.


I did a sweep through and didn't spot anything, but can't claim to be deeply familiar with this code.

So, LGTM, but give it a day or two to see if anyone else wants to chime in.



================
Comment at: llvm/lib/Transforms/Scalar/LoopFuse.cpp:1090
+  /// it can safely move around the loops.
+  bool isEmptyGuardBlock(const FusionCandidate &FC) const {
+    assert(FC.GuardBranch && "Expecting a fusion candidate with guard branch.");
----------------
This check is awfully restrictive, and can probably be easily generalized.  I'm expecting that's your intent with future patches, so let's discuss there.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65464





More information about the llvm-commits mailing list