[PATCH] Enable unrolling of multi-exit loops
meheff at google.com
Tue Sep 30 14:35:26 PDT 2014
Hi atrick, jingyue,
This patch de-pessimizes the calculation of loop trip counts in ScalarEvolution in the presence of multiple exits. Previously all loops exits had to have identical counts for a loop trip count to be considered computable. This pessimization was implemented by calling getBackedgeTakenCount(L) rather than getExitCount(L, ExitingBlock) inside of ScalarEvolution::
getSmallConstantTripCount() (see the FIXME in the comments of that function). The pessimization was added to fix a corner case involving undefined behavior (pr/16130). This patch more precisely handles the undefined behavior case allowing the pessimization to be removed.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 43454 bytes
Desc: not available
More information about the llvm-commits