[PATCH] D93734: [LoopDeletion] Insert an early exit from dead path in loop

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 26 17:38:51 PST 2021


jonpa updated this revision to Diff 319447.
jonpa added a comment.

Patch rebased.

> What is left after we merged the loop unswitch solution?

I did a rerun today on top of 302432f <https://reviews.llvm.org/rG302432f75dadcc78aa4764f3e5e86bf07466a554>, which should include both Florians and Philips patches:

  trunk:
        8201                    loop-delete - Number of loops deleted



  patch:
  
        2624                    loop-delete - Number of early exits inserted
        8006                    loop-delete - Number of loops deleted
           6                    loop-delete - Number of loops eliminated (no remaining blocks)
         279                    loop-delete - Number of skipped loops (SCEV 0)



  patch + D95468
  
        2617                    loop-delete - Number of early exits inserted
        7798                    loop-delete - Number of loops deleted
           6                    loop-delete - Number of loops eliminated (no remaining blocks)
         279                    loop-delete - Number of skipped loops (SCEV 0)



> I realized that the for the SECP2017 version, loop-unswitching does not happen by default, due to cost-modeling. (It does happen for the SPEC2006 version). So I tried to extend the logic to check if the candidate path is a no-op: D95468 <https://reviews.llvm.org/D95468>. That should also handle the SPEC2017 case.

I may be doing something wrong, but D95468 <https://reviews.llvm.org/D95468> did not help very much looking at these numbers it seems...


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

https://reviews.llvm.org/D93734

Files:
  llvm/include/llvm/Transforms/Utils/LoopUtils.h
  llvm/lib/Transforms/Scalar/LoopDeletion.cpp
  llvm/lib/Transforms/Utils/LoopUtils.cpp
  llvm/test/Transforms/LoopDeletion/early-exits.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93734.319447.patch
Type: text/x-patch
Size: 25417 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210127/65615f84/attachment.bin>


More information about the llvm-commits mailing list