Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions llvm/lib/Transforms/Utils/PredicateInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,6 @@ class PredicateInfoBuilder {
// whether it returned a valid result.
DenseMap<Value *, unsigned int> ValueInfoNums;

// The set of edges along which we can only handle phi uses, due to critical
// edges.
DenseSet<std::pair<BasicBlock *, BasicBlock *>> EdgeUsesOnly;

ValueInfo &getOrCreateValueInfo(Value *);
const ValueInfo &getValueInfo(Value *) const;

Expand Down Expand Up @@ -459,8 +455,6 @@ void PredicateInfoBuilder::processBranch(
PredicateBase *PB =
new PredicateBranch(V, BranchBB, Succ, Cond, TakenEdge);
addInfoFor(OpsToRename, V, PB);
if (!Succ->getSinglePredecessor())
EdgeUsesOnly.insert({BranchBB, Succ});
}
}
}
Expand All @@ -487,8 +481,6 @@ void PredicateInfoBuilder::processSwitch(
PredicateSwitch *PS = new PredicateSwitch(
Op, SI->getParent(), TargetBlock, C.getCaseValue(), SI);
addInfoFor(OpsToRename, Op, PS);
if (!TargetBlock->getSinglePredecessor())
EdgeUsesOnly.insert({BranchBB, TargetBlock});
}
}
}
Expand Down Expand Up @@ -637,7 +629,7 @@ void PredicateInfoBuilder::renameUses(SmallVectorImpl<Value *> &OpsToRename) {
// block, and handle it specially. We know that it goes last, and only
// dominate phi uses.
auto BlockEdge = getBlockEdge(PossibleCopy);
if (EdgeUsesOnly.count(BlockEdge)) {
if (!BlockEdge.second->getSinglePredecessor()) {
VD.LocalNum = LN_Last;
auto *DomNode = DT.getNode(BlockEdge.first);
if (DomNode) {
Expand Down
Loading