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

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 6 15:39:54 PDT 2019


Meinersbur added a comment.

Is there a long-term plan to avoid the code duplication? E.g. refactoring/keeping only the fuseGuardedLoops variant when loop guards become a normal form? One could also add some preprocessing that makes the two loop guards guard both loops, then use the standard fuse code.



================
Comment at: llvm/lib/Transforms/Scalar/LoopFuse.cpp:1427
+    // trip-counts are equal after all.
+    // KB: Would this sequence be simpler to just just make FC0.ExitingBlock go
+    // to FC1.Header? I think this is basically what the three sequences are
----------------
[typo] "just just"

These internal remarks don't seem to be confident in what the code is doing.

Sometimes some ASCII-art might clear up which blocks are connected to where.


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