[llvm] 261a84f - [MISched] Fix non-debug builds.

Francesco Petrogalli via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 14 06:12:54 PDT 2023


Author: Francesco Petrogalli
Date: 2023-06-14T15:12:14+02:00
New Revision: 261a84f9cf98be80913c0da3f3dbd488b3125b3e

URL: https://github.com/llvm/llvm-project/commit/261a84f9cf98be80913c0da3f3dbd488b3125b3e
DIFF: https://github.com/llvm/llvm-project/commit/261a84f9cf98be80913c0da3f3dbd488b3125b3e.diff

LOG: [MISched] Fix non-debug builds.

As reported in https://github.com/llvm/llvm-project/issues/63225, we
need to make sure we can use the `&operator<<` on instances of the
`ResourceSegments` class for builds that set `NDEBUG`.

Reviewed By: sylvestre.ledru

Differential Revision: https://reviews.llvm.org/D152817

Added: 
    

Modified: 
    llvm/include/llvm/CodeGen/MachineScheduler.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/CodeGen/MachineScheduler.h b/llvm/include/llvm/CodeGen/MachineScheduler.h
index bd3885d0463ef..c950a9ac5c387 100644
--- a/llvm/include/llvm/CodeGen/MachineScheduler.h
+++ b/llvm/include/llvm/CodeGen/MachineScheduler.h
@@ -815,7 +815,6 @@ class ResourceSegments {
                          const ResourceSegments &c2) {
     return c1._Intervals == c2._Intervals;
   }
-#ifndef NDEBUG
   friend llvm::raw_ostream &operator<<(llvm::raw_ostream &os,
                                        const ResourceSegments &Segments) {
     os << "{ ";
@@ -824,7 +823,6 @@ class ResourceSegments {
     os << "}\n";
     return os;
   }
-#endif
 };
 
 /// Each Scheduling boundary is associated with ready queues. It tracks the


        


More information about the llvm-commits mailing list