diff options
author | Chris Lattner <sabre@nondot.org> | 2010-12-19 04:23:03 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-12-19 04:23:03 +0000 |
commit | a0d172f7fec17bcbc0b0681b42b8c6192072eea0 (patch) | |
tree | a0cf97caa84fbebf067824079861b916bb6124eb /lib/Transforms/Scalar/CodeGenPrepare.cpp | |
parent | c5b0e44acaaf9e80ad2334bb4b25153ecbea5967 (diff) |
revert r122164, I'm going to go with a different approach.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122168 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/CodeGenPrepare.cpp')
-rw-r--r-- | lib/Transforms/Scalar/CodeGenPrepare.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp index b4a2a12de0..60c7f7565e 100644 --- a/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/lib/Transforms/Scalar/CodeGenPrepare.cpp @@ -211,17 +211,6 @@ bool CodeGenPrepare::CanMergeBlocks(const BasicBlock *BB, const PHINode *DestBBPN = dyn_cast<PHINode>(DestBB->begin()); if (!DestBBPN) return true; // no conflict. - // Walk all the PHI nodes in DestBB. If any of the input values to the PHI - // are trapping constant exprs, then merging this block would introduce the - // possible trap into new control flow if we have any critical predecessor - // edges. - for (BasicBlock::const_iterator I = DestBB->begin(); isa<PHINode>(I); ++I) { - const PHINode *PN = cast<PHINode>(I); - if (const Constant *C =dyn_cast<Constant>(PN->getIncomingValueForBlock(BB))) - if (C->canTrap()) - return false; - } - // Collect the preds of BB. SmallPtrSet<const BasicBlock*, 16> BBPreds; if (const PHINode *BBPN = dyn_cast<PHINode>(BB->begin())) { |