[PATCH] D82927: Intergerate Loop Peeling into Loop Fusion

Bardia Mahjour via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 8 06:08:01 PDT 2020


bmahjour added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/LoopFuse.cpp:858
+
+          // Here we are checking the user specfices to enable loop peeling with
+          // fusion, ensure FC0 (the first loop) can be peeled, and both loops
----------------
we are checking **that** the user **specifies**...


================
Comment at: llvm/lib/Transforms/Scalar/LoopFuse.cpp:861
+          // have different tripcounts
+          if (FusionPeelMaxCount.getNumOccurrences() > 0 &&
+              FusionPeelMaxCount != 0 && FC0->AbleToPeel && !SameTripCount &&
----------------
I don't think we should check for occurrence of the option on the command line. It suffices to just compare `TCDifference` against the `FusionPeelMaxCount`. When the option is not specified the value of `FusionPeelMaxCount` will be the default, which is currently zero and would prevent peeling).

Similarly `FusionPeelMaxCount != 0` is redundant.


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

https://reviews.llvm.org/D82927





More information about the llvm-commits mailing list