HomePhabricator

[MBP] Factor out function hasViableTopFallthrough and enhancement

Authored by Carrot on Feb 22 2019, 10:04 AM.

Description

[MBP] Factor out function hasViableTopFallthrough and enhancement

This patch factor out the function hasViableTopFallthrough from rotateLoop. It is also enhanced. Original code checks only if there is a block can be placed before current loop top. This patch also checks if the loop top is the most possible successor of its predecessor. The attached test case shows its effect.

Differential Revision: https://reviews.llvm.org/D58393

llvm-svn: 354682

Details