mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-07 12:30:57 +00:00
[NewGVN] isOnlyReachableViaThisEdge() is dead now. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295503 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4231bd0a9d
commit
4022d8a46d
@ -362,7 +362,6 @@ private:
|
||||
// Reachability handling.
|
||||
void updateReachableEdge(BasicBlock *, BasicBlock *);
|
||||
void processOutgoingEdges(TerminatorInst *, BasicBlock *);
|
||||
bool isOnlyReachableViaThisEdge(const BasicBlockEdge &) const;
|
||||
Value *findConditionEquivalence(Value *) const;
|
||||
|
||||
// Elimination.
|
||||
@ -1069,23 +1068,6 @@ const Expression *NewGVN::performSymbolicEvaluation(Value *V) {
|
||||
return E;
|
||||
}
|
||||
|
||||
// There is an edge from 'Src' to 'Dst'. Return true if every path from
|
||||
// the entry block to 'Dst' passes via this edge. In particular 'Dst'
|
||||
// must not be reachable via another edge from 'Src'.
|
||||
bool NewGVN::isOnlyReachableViaThisEdge(const BasicBlockEdge &E) const {
|
||||
|
||||
// While in theory it is interesting to consider the case in which Dst has
|
||||
// more than one predecessor, because Dst might be part of a loop which is
|
||||
// only reachable from Src, in practice it is pointless since at the time
|
||||
// GVN runs all such loops have preheaders, which means that Dst will have
|
||||
// been changed to have only one predecessor, namely Src.
|
||||
const BasicBlock *Pred = E.getEnd()->getSinglePredecessor();
|
||||
const BasicBlock *Src = E.getStart();
|
||||
assert((!Pred || Pred == Src) && "No edge between these basic blocks!");
|
||||
(void)Src;
|
||||
return Pred != nullptr;
|
||||
}
|
||||
|
||||
void NewGVN::markUsersTouched(Value *V) {
|
||||
// Now mark the users as touched.
|
||||
for (auto *User : V->users()) {
|
||||
|
Loading…
Reference in New Issue
Block a user