[llvm-branch-commits] [llvm] e81188d - [llvm][CodeGen] Added missing initialization failure information for window scheduler (#99449)

Tobias Hieta via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Sep 1 01:00:29 PDT 2024


Author: Kai Yan
Date: 2024-09-01T10:00:16+02:00
New Revision: e81188d58202ee7b887e48bc3e4b102fc5f45619

URL: https://github.com/llvm/llvm-project/commit/e81188d58202ee7b887e48bc3e4b102fc5f45619
DIFF: https://github.com/llvm/llvm-project/commit/e81188d58202ee7b887e48bc3e4b102fc5f45619.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 0777480499e55b..3fe8a1aaafd128 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 601b98dca8e20b..be75301b016ed9 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-branch-commits mailing list