This is an archive of the discontinued LLVM Phabricator instance.

[LoopUnswitch] Check OptimizeForSize before traversing over all basic blocks in current loop
ClosedPublic

Authored by • chenli on Aug 12 2015, 4:04 PM.

Details

Summary

This patch moves the check of OptimizeForSize before traversing over all basic blocks in current loop. If OptimizeForSize is set to true, no non-trivial unswitch is ever allowed. Therefore, the early exit will help reduce compilation time. This patch should be NFC.

Diff Detail

Event Timeline

• chenli updated this revision to Diff 31996.Aug 12 2015, 4:04 PM
• chenli retitled this revision from to [LoopUnswitch] Check OptimizeForSize before traversing over all basic blocks in current loop.
• chenli updated this object.
• chenli added a reviewer: reames.
• chenli added a subscriber: llvm-commits.
• chenli updated this revision to Diff 31998.Aug 12 2015, 4:17 PM

Initial patch was attached incorrectly by accident. Update the correct one.

reames accepted this revision.Aug 12 2015, 5:47 PM
reames edited edge metadata.

LGTM

This revision is now accepted and ready to land.Aug 12 2015, 5:47 PM
weimingz accepted this revision.Aug 12 2015, 5:52 PM
weimingz edited edge metadata.

LGTM

broune accepted this revision.Aug 12 2015, 5:54 PM
broune edited edge metadata.
• chenli closed this revision.Aug 12 2015, 10:25 PM