Skip to content

Commit

Permalink
Dont modify existing PreRARematStage LiveIn handling
Browse files Browse the repository at this point in the history
Change-Id: I96c99f12c59ef0eea86f7fbf134913ecc47dd6f2
  • Loading branch information
jrbyrnes committed Aug 12, 2024
1 parent 0e70bac commit 415e531
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1669,6 +1669,9 @@ bool PreRARematStage::sinkTriviallyRematInsts(const GCNSubtarget &ST,
MachineInstr *MI = Entry.first;
MachineInstr *OldMI = Entry.second;

// Remove OldMI from BBLiveInMap since we are sinking it from its MBB.
DAG.BBLiveInMap.erase(OldMI);

// Remove OldMI and update LIS
Register Reg = MI->getOperand(0).getReg();
LIS->RemoveMachineInstrFromMaps(*OldMI);
Expand All @@ -1686,8 +1689,6 @@ bool PreRARematStage::sinkTriviallyRematInsts(const GCNSubtarget &ST,
DAG.Regions = NewRegions;
DAG.RescheduleRegions = NewRescheduleRegions;

DAG.BBLiveInMap = DAG.getBBLiveInMap();

if (GCNTrackers)
DAG.RegionLiveOuts.buildLiveRegMap();

Expand Down

0 comments on commit 415e531

Please sign in to comment.