[llvm] 2d6ff0c - [llvm][CodeGen] Added missing initialization failure information for window scheduler (#99449)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 23 21:06:38 PDT 2024


Author: Kai Yan
Date: 2024-07-24T12:06:35+08:00
New Revision: 2d6ff0c533aa1b0fe6d91764846f636c4a4e911c

URL: https://github.com/llvm/llvm-project/commit/2d6ff0c533aa1b0fe6d91764846f636c4a4e911c
DIFF: https://github.com/llvm/llvm-project/commit/2d6ff0c533aa1b0fe6d91764846f636c4a4e911c.diff

LOG: [llvm][CodeGen] Added missing initialization failure information for window scheduler (#99449)

Added missing initialization failure information for window scheduler.

Added: 
    

Modified: 
    llvm/lib/CodeGen/WindowScheduler.cpp
    llvm/test/CodeGen/Hexagon/swp-ws-fail-2.mir

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/WindowScheduler.cpp b/llvm/lib/CodeGen/WindowScheduler.cpp
index 595f7e2e202dd..cb878f7425481 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!
 
 ---


        


More information about the llvm-commits mailing list