8000 [llvm][CodeGen] Added missing initialization failure information for window scheduler by kaiyan96 · Pull Request #99449 · llvm/llvm-project · GitHub
[go: up one dir, main page]

Skip to content

Conversation

kaiyan96
Copy link
Contributor

Added missing initialization failure information for window scheduler.

@llvmbot
Copy link
Member
llvmbot commented Jul 18, 2024

@llvm/pr-subscribers-backend-hexagon

Author: Kai Yan (kaiyan96)

Changes

Added missing initialization failure information for window scheduler.


Full diff: https://github.com/llvm/llvm-project/pull/99449.diff

2 Files Affected:

  • (modified) llvm/lib/CodeGen/WindowScheduler.cpp (+4-1)
  • (modified) llvm/test/CodeGen/Hexagon/swp-ws-fail-2.mir (+1)
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!
 
 ---

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 "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a bit noisy

Copy link
Contributor Author

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.

@huaatian huaatian merged commit 2d6ff0c into llvm:main Jul 24, 2024
yuxuanchen1997 pushed a commit that referenced this pull request Jul 25, 2024
…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
kaiyan96 added a commit to kaiyan96/llvm-project that referenced this pull request Aug 12, 2024
…window scheduler (llvm#99449)

Added missing initialization failure information for window scheduler.
tru pushed a commit to kaiyan96/llvm-project that referenced this pull request Aug 20, 2024
…window scheduler (llvm#99449)

Added missing initialization failure information for window scheduler.
tru pushed a commit to kaiyan96/llvm-project that referenced this pull request Sep 1, 2024
…window scheduler (llvm#99449)

Added missing initialization failure information for window scheduler.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend:Hexagon mi-sched machine instruction scheduler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

0