Skip to content

Commit

Permalink
[llvm][CodeGen] Added missing initialization failure information for …
Browse files Browse the repository at this point in the history
…window scheduler (llvm#99449)

Added missing initialization failure information for window scheduler.
  • Loading branch information
kaiyan96 authored and tru committed Aug 20, 2024
1 parent 3ffa542 commit bee1970
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion llvm/lib/CodeGen/WindowScheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,11 @@ bool WindowScheduler::initialize() {
return false;
}
for (auto &Def : MI.all_defs())
if (Def.isReg() && Def.getReg().isPhysical())
if (Def.isReg() && Def.getReg().isPhysical()) {
LLVM_DEBUG(dbgs() << "Physical registers are not supported in "
"window scheduling!\n");
return false;
}
}
if (SchedInstrNum <= WindowRegionLimit) {
LLVM_DEBUG(dbgs() << "There are too few MIs in the window region!\n");
Expand Down
1 change: 1 addition & 0 deletions llvm/test/CodeGen/Hexagon/swp-ws-fail-2.mir
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# RUN: -window-sched=force -filetype=null -verify-machineinstrs 2>&1 \
# RUN: | FileCheck %s

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

---
Expand Down

0 comments on commit bee1970

Please sign in to comment.