mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 16:17:17 +00:00
Modify depends(Src, Dst, PossiblyLoopIndependent).
If the Src and Dst are the same instruction, no loop-independent dependence is possible, so we force the PossiblyLoopIndependent flag to false. The test case results are updated appropriately. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168678 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -3199,6 +3199,9 @@ static void dumpSmallBitVector(SmallBitVector &BV) {
|
||||
Dependence *DependenceAnalysis::depends(Instruction *Src,
|
||||
Instruction *Dst,
|
||||
bool PossiblyLoopIndependent) {
|
||||
if (Src == Dst)
|
||||
PossiblyLoopIndependent = false;
|
||||
|
||||
if ((!Src->mayReadFromMemory() && !Src->mayWriteToMemory()) ||
|
||||
(!Dst->mayReadFromMemory() && !Dst->mayWriteToMemory()))
|
||||
// if both instructions don't reference memory, there's no dependence
|
||||
|
Reference in New Issue
Block a user