Skip to content

Commit e81188d

Browse files
kaiyan96tru
authored andcommitted
[llvm][CodeGen] Added missing initialization failure information for window scheduler (#99449)
Added missing initialization failure information for window scheduler.
1 parent 816fde1 commit e81188d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

llvm/lib/CodeGen/WindowScheduler.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,11 @@ bool WindowScheduler::initialize() {
232232
return false;
233233
}
234234
for (auto &Def : MI.all_defs())
235-
if (Def.isReg() && Def.getReg().isPhysical())
235+
if (Def.isReg() && Def.getReg().isPhysical()) {
236+
LLVM_DEBUG(dbgs() << "Physical registers are not supported in "
237+
"window scheduling!\n");
236238
return false;
239+
}
237240
}
238241
if (SchedInstrNum <= WindowRegionLimit) {
239242
LLVM_DEBUG(dbgs() << "There are too few MIs in the window region!\n");

llvm/test/CodeGen/Hexagon/swp-ws-fail-2.mir

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# RUN: -window-sched=force -filetype=null -verify-machineinstrs 2>&1 \
44
# RUN: | FileCheck %s
55

6+
# CHECK: Physical registers are not supported in window scheduling!
67
# CHECK: The WindowScheduler failed to initialize!
78

89
---

0 commit comments

Comments
 (0)