[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 Dec 22 15:32:26 PST 2020


jonpa created this revision.
jonpa added reviewers: atmnpatel, jdoerfert.
Herald added a subscriber: hiraditya.
jonpa requested review of this revision.
Herald added a project: LLVM.

This is applied on top of https://reviews.llvm.org/D86844 "[LoopDeletion] Allows deletion of possibly infinite side-effect free loops".

This patch handles the case where the whole loop is not dead, but only a certain constant path through it. If this path is entered, the loop is in fact dead and an early exit could be made.

Before finalizing the patch by adding tests and also handling the new PM, I would like to get some feedback as to if this is looking to be the right approach. I have seen that this handles the omnetpp function printAddressTable() the same way as GCC does, which gives a nice improvement on the benchmark (SystemZ, output disabled).


https://reviews.llvm.org/D93734

Files:
  llvm/lib/Transforms/Scalar/LoopDeletion.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93734.313444.patch
Type: text/x-patch
Size: 4031 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201222/a936607f/attachment.bin>


More information about the llvm-commits mailing list