mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 06:32:24 +00:00
Neaten up this method. Check that if there is only one
predecessor then it's Src. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149843 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
23f612113a
commit
c4fd448712
@ -1999,10 +1999,10 @@ static bool isOnlyReachableViaThisEdge(BasicBlock *Src, BasicBlock *Dst,
|
||||
// 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.
|
||||
pred_iterator PI = pred_begin(Dst), PE = pred_end(Dst);
|
||||
assert(PI != PE && "No edge between these basic blocks!");
|
||||
BasicBlock *Pred = Dst->getSinglePredecessor();
|
||||
assert((!Pred || Pred == Src) && "No edge between these basic blocks!");
|
||||
(void)Src;
|
||||
return PE == ++PI;
|
||||
return Pred != 0;
|
||||
}
|
||||
|
||||
/// processInstruction - When calculating availability, handle an instruction
|
||||
|
Loading…
x
Reference in New Issue
Block a user