OSDN Git Service

rework FoldBranchToCommonDest to exit earlier when there is a bonus
authorChris Lattner <sabre@nondot.org>
Thu, 14 Apr 2011 02:44:53 +0000 (02:44 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 14 Apr 2011 02:44:53 +0000 (02:44 +0000)
commit3c6e746b5f05ffe3870e2aeadd2f9a3c0a96187b
tree8dc682c3c81593f07a895b92bd44a17f76a501a3
parentb3b15711b9ee857dc835dd129b144ff4f2e72d6d
rework FoldBranchToCommonDest to exit earlier when there is a bonus
instruction around, reducing work.

Greatly simplify handling of debug instructions.  There is no need to
build up a vector of them and then move them into the one predecessor
if we're processing a block.  Instead just rescan the block and *copy*
them into the pred.  If a block gets merged into multiple preds, this
will retain more debug info.

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