mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 07:24:25 +00:00
improve comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130426 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -969,8 +969,13 @@ static Value *GetLoadValueForLoad(LoadInst *SrcVal, unsigned Offset,
|
|||||||
NewLoadSize*8-SrcVal->getType()->getPrimitiveSizeInBits());
|
NewLoadSize*8-SrcVal->getType()->getPrimitiveSizeInBits());
|
||||||
RV = Builder.CreateTrunc(RV, SrcVal->getType());
|
RV = Builder.CreateTrunc(RV, SrcVal->getType());
|
||||||
SrcVal->replaceAllUsesWith(RV);
|
SrcVal->replaceAllUsesWith(RV);
|
||||||
|
|
||||||
|
// We would like to use gvn.markInstructionForDeletion here, but we can't
|
||||||
|
// because the load is already memoized into the leader map table that GVN
|
||||||
|
// tracks. It is potentially possible to remove the load from the table,
|
||||||
|
// but then there all of the operations based on it would need to be
|
||||||
|
// rehashed. Just leave the dead load around.
|
||||||
gvn.getMemDep().removeInstruction(SrcVal);
|
gvn.getMemDep().removeInstruction(SrcVal);
|
||||||
//gvn.markInstructionForDeletion(SrcVal);
|
|
||||||
SrcVal = NewLoad;
|
SrcVal = NewLoad;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user