mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-11 11:34:02 +00:00
When merging one use into another, transfer the offsets from
the old use to the new one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116008 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
122e2ea043
commit
dd3db0e0c3
@ -3035,6 +3035,14 @@ void LSRInstance::NarrowSearchSpaceByCollapsingUnrolledCode() {
|
||||
if (Fixup.LUIdx == LUIdx) {
|
||||
Fixup.LUIdx = LUThatHas - &Uses.front();
|
||||
Fixup.Offset += F.AM.BaseOffs;
|
||||
// Add the new offset to LUThatHas' offset list.
|
||||
if (LUThatHas->Offsets.back() != Fixup.Offset) {
|
||||
LUThatHas->Offsets.push_back(Fixup.Offset);
|
||||
if (Fixup.Offset > LUThatHas->MaxOffset)
|
||||
LUThatHas->MaxOffset = Fixup.Offset;
|
||||
if (Fixup.Offset < LUThatHas->MinOffset)
|
||||
LUThatHas->MinOffset = Fixup.Offset;
|
||||
}
|
||||
DEBUG(dbgs() << "New fixup has offset "
|
||||
<< Fixup.Offset << '\n');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user