1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00

[MemorySSA] Remove unused dominatesUse (NFC)

The function was introduced without a use on Feb 2, 2016 in commit
e1100f533f0a48f55e80e1152b06f5deab5f9b30.
This commit is contained in:
Kazu Hirata 2021-01-10 09:24:54 -08:00
parent a6e95fbf6b
commit 6264d23300
2 changed files with 0 additions and 18 deletions

View File

@ -850,7 +850,6 @@ private:
using DefsMap = DenseMap<const BasicBlock *, std::unique_ptr<DefsList>>;
void markUnreachableAsLiveOnEntry(BasicBlock *BB);
bool dominatesUse(const MemoryAccess *, const MemoryAccess *) const;
MemoryPhi *createMemoryPhi(BasicBlock *BB);
template <typename AliasAnalysisType>
MemoryUseOrDef *createNewAccess(Instruction *, AliasAnalysisType *,

View File

@ -1817,23 +1817,6 @@ MemoryUseOrDef *MemorySSA::createNewAccess(Instruction *I,
return MUD;
}
/// Returns true if \p Replacer dominates \p Replacee .
bool MemorySSA::dominatesUse(const MemoryAccess *Replacer,
const MemoryAccess *Replacee) const {
if (isa<MemoryUseOrDef>(Replacee))
return DT->dominates(Replacer->getBlock(), Replacee->getBlock());
const auto *MP = cast<MemoryPhi>(Replacee);
// For a phi node, the use occurs in the predecessor block of the phi node.
// Since we may occur multiple times in the phi node, we have to check each
// operand to ensure Replacer dominates each operand where Replacee occurs.
for (const Use &Arg : MP->operands()) {
if (Arg.get() != Replacee &&
!DT->dominates(Replacer->getBlock(), MP->getIncomingBlock(Arg)))
return false;
}
return true;
}
/// Properly remove \p MA from all of MemorySSA's lookup tables.
void MemorySSA::removeFromLookups(MemoryAccess *MA) {
assert(MA->use_empty() &&