[PATCH] D31434: [AMDGPU] Fix recorded region boundaries in max-occupancy scheduler
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 28 15:01:14 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL298945: [AMDGPU] Fix recorded region boundaries in max-occupancy scheduler (authored by rampitec).
Changed prior to commit:
https://reviews.llvm.org/D31434?vs=93274&id=93306#toc
Repository:
rL LLVM
https://reviews.llvm.org/D31434
Files:
llvm/trunk/lib/Target/AMDGPU/GCNSchedStrategy.cpp
llvm/trunk/lib/Target/AMDGPU/GCNSchedStrategy.h
Index: llvm/trunk/lib/Target/AMDGPU/GCNSchedStrategy.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/GCNSchedStrategy.cpp
+++ llvm/trunk/lib/Target/AMDGPU/GCNSchedStrategy.cpp
@@ -321,16 +321,6 @@
DEBUG(dbgs() << "Starting occupancy is " << StartingOccupancy << ".\n");
}
-void GCNScheduleDAGMILive::enterRegion(MachineBasicBlock *bb,
- MachineBasicBlock::iterator begin,
- MachineBasicBlock::iterator end,
- unsigned regioninstrs) {
- ScheduleDAGMILive::enterRegion(bb, begin, end, regioninstrs);
-
- if (Stage == 0)
- Regions.push_back(std::make_pair(begin, end));
-}
-
void GCNScheduleDAGMILive::schedule() {
std::vector<MachineInstr*> Unsched;
Unsched.reserve(NumRegionInstrs);
@@ -345,6 +335,9 @@
}
ScheduleDAGMILive::schedule();
+ if (Stage == 0)
+ Regions.push_back(std::make_pair(RegionBegin, RegionEnd));
+
if (!LIS)
return;
@@ -405,6 +398,8 @@
DEBUG(dbgs() << "Scheduling " << *MI);
}
RegionBegin = Unsched.front()->getIterator();
+ if (Stage == 0)
+ Regions.back() = std::make_pair(RegionBegin, RegionEnd);
placeDebugValues();
}
Index: llvm/trunk/lib/Target/AMDGPU/GCNSchedStrategy.h
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/GCNSchedStrategy.h
+++ llvm/trunk/lib/Target/AMDGPU/GCNSchedStrategy.h
@@ -75,8 +75,8 @@
unsigned Stage;
// Vecor of regions recorder for later rescheduling
- SmallVector<std::pair<const MachineBasicBlock::iterator,
- const MachineBasicBlock::iterator>, 32> Regions;
+ SmallVector<std::pair<MachineBasicBlock::iterator,
+ MachineBasicBlock::iterator>, 32> Regions;
// Region live-ins.
DenseMap<unsigned, LaneBitmask> LiveIns;
@@ -94,11 +94,6 @@
GCNScheduleDAGMILive(MachineSchedContext *C,
std::unique_ptr<MachineSchedStrategy> S);
- void enterRegion(MachineBasicBlock *bb,
- MachineBasicBlock::iterator begin,
- MachineBasicBlock::iterator end,
- unsigned regioninstrs) override;
-
void schedule() override;
void finalizeSchedule() override;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31434.93306.patch
Type: text/x-patch
Size: 2327 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170328/9646ffb7/attachment.bin>
More information about the llvm-commits
mailing list