Generate substantially better code when there are a limited number of exits
authorChris Lattner <sabre@nondot.org>
Wed, 12 May 2004 04:14:24 +0000 (04:14 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 12 May 2004 04:14:24 +0000 (04:14 +0000)
commit346be7f5bc1bab5768b9fa0a01a015d2fdca19c5
tree2e1ad1d98b300312d0ac192e9684c40121028572
parent5b01e298ed42d5ce6aaf7634618b5e1769766b21
Generate substantially better code when there are a limited number of exits
from the extracted region.  If the return has 0 or 1 exit blocks, the new
function returns void.  If it has 2 exits, it returns bool, otherwise it
returns a ushort as before.

This allows us to use a conditional branch instruction when there are two
exit blocks, as often happens during block extraction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13481 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/CodeExtractor.cpp