mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-25 00:29:20 +00:00
Remove function left over from other jump threading cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86289 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
29d727b0c8
commit
50591ab1ea
@ -75,7 +75,6 @@ namespace {
|
||||
bool ThreadEdge(BasicBlock *BB, BasicBlock *PredBB, BasicBlock *SuccBB);
|
||||
bool DuplicateCondBranchOnPHIIntoPred(BasicBlock *BB,
|
||||
BasicBlock *PredBB);
|
||||
BasicBlock *FactorCommonPHIPreds(PHINode *PN, Value *Val);
|
||||
|
||||
typedef SmallVectorImpl<std::pair<ConstantInt*,
|
||||
BasicBlock*> > PredValueInfo;
|
||||
@ -204,29 +203,6 @@ void JumpThreading::FindLoopHeaders(Function &F) {
|
||||
LoopHeaders.insert(const_cast<BasicBlock*>(Edges[i].second));
|
||||
}
|
||||
|
||||
|
||||
/// FactorCommonPHIPreds - If there are multiple preds with the same incoming
|
||||
/// value for the PHI, factor them together so we get one block to thread for
|
||||
/// the whole group.
|
||||
/// This is important for things like "phi i1 [true, true, false, true, x]"
|
||||
/// where we only need to clone the block for the true blocks once.
|
||||
///
|
||||
BasicBlock *JumpThreading::FactorCommonPHIPreds(PHINode *PN, Value *Val) {
|
||||
SmallVector<BasicBlock*, 16> CommonPreds;
|
||||
for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e; ++i)
|
||||
if (PN->getIncomingValue(i) == Val)
|
||||
CommonPreds.push_back(PN->getIncomingBlock(i));
|
||||
|
||||
if (CommonPreds.size() == 1)
|
||||
return CommonPreds[0];
|
||||
|
||||
DEBUG(errs() << " Factoring out " << CommonPreds.size()
|
||||
<< " common predecessors.\n");
|
||||
return SplitBlockPredecessors(PN->getParent(),
|
||||
&CommonPreds[0], CommonPreds.size(),
|
||||
".thr_comm", this);
|
||||
}
|
||||
|
||||
/// GetResultOfComparison - Given an icmp/fcmp predicate and the left and right
|
||||
/// hand sides of the compare instruction, try to determine the result. If the
|
||||
/// result can not be determined, a null pointer is returned.
|
||||
|
Loading…
Reference in New Issue
Block a user