-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[llvm][CodeGen] Added missing initialization failure information for window scheduler #99449
Conversation
@llvm/pr-subscribers-backend-hexagon Author: Kai Yan (kaiyan96) ChangesAdded missing initialization failure information for window scheduler. Full diff: https://github.com/llvm/llvm-project/pull/99449.diff 2 Files Affected:
diff --git a/llvm/lib/CodeGen/WindowScheduler.cpp b/llvm/lib/CodeGen/WindowScheduler.cpp
index 0777480499e55..3fe8a1aaafd12 100644
--- a/llvm/lib/CodeGen/WindowScheduler.cpp
+++ b/llvm/lib/CodeGen/WindowScheduler.cpp
@@ -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");
diff --git a/llvm/test/CodeGen/Hexagon/swp-ws-fail-2.mir b/llvm/test/CodeGen/Hexagon/swp-ws-fail-2.mir
index 601b98dca8e20..be75301b016ed 100644
--- a/llvm/test/CodeGen/Hexagon/swp-ws-fail-2.mir
+++ b/llvm/test/CodeGen/Hexagon/swp-ws-fail-2.mir
@@ -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!
---
|
@@ -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 " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a bit noisy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, there is more debug information. Our consideration is that as a newly proposed software pipelining algorithm, the window algorithm may require more detailed output information to facilitate analysis and debugging.
…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
…window scheduler (llvm#99449) Added missing initialization failure information for window scheduler.
…window scheduler (llvm#99449) Added missing initialization failure information for window scheduler.
…window scheduler (llvm#99449) Added missing initialization failure information for window scheduler.
Added missing initialization failure information for window scheduler.