forked from OSchip/llvm-project
Reduce the amount of searching this assertion does. On a testcase of mine,
this reduces the time for -simplifycfg in a debug build from 106s to 14.82s llvm-svn: 20286
This commit is contained in:
parent
5e166a5f3e
commit
cf08c21f2c
|
@ -136,8 +136,10 @@ void BasicBlock::dropAllReferences() {
|
|||
// called while the predecessor still refers to this block.
|
||||
//
|
||||
void BasicBlock::removePredecessor(BasicBlock *Pred) {
|
||||
assert(find(pred_begin(this), pred_end(this), Pred) != pred_end(this) &&
|
||||
assert((getNumUses() > 16 ||// Reduce cost of this assertion for complex CFGs.
|
||||
find(pred_begin(this), pred_end(this), Pred) != pred_end(this)) &&
|
||||
"removePredecessor: BB is not a predecessor!");
|
||||
|
||||
if (InstList.empty()) return;
|
||||
PHINode *APN = dyn_cast<PHINode>(&front());
|
||||
if (!APN) return; // Quick exit.
|
||||
|
|
Loading…
Reference in New Issue