aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineScheduler.cpp
diff options
context:
space:
mode:
authorYaxun Liu <Yaxun.Liu@amd.com>2017-12-15 03:56:57 +0000
committerYaxun Liu <Yaxun.Liu@amd.com>2017-12-15 03:56:57 +0000
commitc41e2f6e7b71530bf1b3fed95e0f67ddbba29d3f (patch)
treef61a9cfeee07ada16e54862c680ea6a73c08d7db /llvm/lib/CodeGen/MachineScheduler.cpp
parentb99a7102c13bd6bf629789750d2e5c08e9862da1 (diff)
downloadllvm-c41e2f6e7b71530bf1b3fed95e0f67ddbba29d3f.zip
llvm-c41e2f6e7b71530bf1b3fed95e0f67ddbba29d3f.tar.gz
llvm-c41e2f6e7b71530bf1b3fed95e0f67ddbba29d3f.tar.bz2
Recommit CodeGen: Fix assertion in machine inst sheduler due to llvm.dbg.value
The regression on ppc64 was not due to this commit. llvm-svn: 320788
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineScheduler.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp
index f3017ac..6be1373 100644
--- a/llvm/lib/CodeGen/MachineScheduler.cpp
+++ b/llvm/lib/CodeGen/MachineScheduler.cpp
@@ -1053,7 +1053,10 @@ void ScheduleDAGMILive::initRegPressure() {
dumpRegSetPressure(BotRPTracker.getRegSetPressureAtPos(), TRI);
);
- assert(BotRPTracker.getPos() == RegionEnd && "Can't find the region bottom");
+ assert((BotRPTracker.getPos() == RegionEnd ||
+ (RegionEnd->isDebugValue() &&
+ BotRPTracker.getPos() == priorNonDebug(RegionEnd, RegionBegin))) &&
+ "Can't find the region bottom");
// Cache the list of excess pressure sets in this region. This will also track
// the max pressure in the scheduled code for these sets.
@@ -1459,7 +1462,8 @@ void ScheduleDAGMILive::scheduleMI(SUnit *SU, bool IsTopNode) {
RegOpers.detectDeadDefs(*MI, *LIS);
}
- BotRPTracker.recedeSkipDebugValues();
+ if (BotRPTracker.getPos() != CurrentBottom)
+ BotRPTracker.recedeSkipDebugValues();
SmallVector<RegisterMaskPair, 8> LiveUses;
BotRPTracker.recede(RegOpers, &LiveUses);
assert(BotRPTracker.getPos() == CurrentBottom && "out of sync");