mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20286 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9b5b1905db
commit
35f0aecdb0
@ -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…
x
Reference in New Issue
Block a user