[PATCH] D89048: [ARM][LowOverheadLoops] Insert loop start at end of block in more cases

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 9 02:01:21 PDT 2020


samparker added inline comments.


================
Comment at: llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp:1086
         InsertPt = FirstNonTerminator;
+      else {
+        // Try putting the loop start at the end of the block even if the count or lr are live-out.
----------------
samparker wrote:
> Can this logic be simplified? I don't think we should need to be concerned with LR, or at least the top-level conditional block should be guard with:
> 
> ```
> if (FirstNonTerminator == MBB->end() && RDA.isReachingDefLiveOut(Start, ARM::LR)
> ```
> Then it looks like what we just need to check whether InsertPt kills CountReg?
... along with your existing check for RDA.hasSameReachingDef(LastMI, &*InsertPt, CountReg).


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

https://reviews.llvm.org/D89048



More information about the llvm-commits mailing list