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 (#99449)

Summary: Added missing initialization failure information for window scheduler.

Test Plan: 

Reviewers: 

Subscribers: 

Tasks: 

Tags: 


Differential Revision: https://phabricator.intern.facebook.com/D60250707
  • Loading branch information
kaiyan96 authored and yuxuanchen1997 committed Jul 25, 2024
1 parent 486d963 commit 1f378e6
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 1f378e6

Please sign in to comment.