[llvm] a9583a1 - [LoopUnswitch] Pacify compiler warnings.

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 1 01:13:47 PST 2021


Author: Florian Hahn
Date: 2021-02-01T09:13:06Z
New Revision: a9583a19237e66fa56fcd979511ac14232e9a3c3

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

LOG: [LoopUnswitch] Pacify compiler warnings.

Attempt to fix some compiler warnings on some bots after
b8c81fa5c7f77a7a1267e42ddbbc9bffb10b0817.

Added: 
    

Modified: 
    llvm/lib/Transforms/Scalar/LoopUnswitch.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
index 3467769b846c..cc2c778253e0 100644
--- a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
@@ -26,6 +26,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/Statistic.h"
@@ -809,12 +810,12 @@ static Optional<IVConditionInfo> hasPartialIVCondition(Loop *L, MemorySSA &MSSA,
           if (L->contains(Succ))
             continue;
 
-          Info.PathIsNoop &= empty(Succ->phis()) &&
+          Info.PathIsNoop &= llvm::empty(Succ->phis()) &&
                              (!Info.ExitForPath || Info.ExitForPath == Succ);
           if (!Info.PathIsNoop)
             break;
-          assert(!Info.ExitForPath || Info.ExitForPath == Succ &&
-                                          "cannot have multiple exit blocks");
+          assert((!Info.ExitForPath || Info.ExitForPath == Succ) &&
+                 "cannot have multiple exit blocks");
           Info.ExitForPath = Succ;
         }
       }


        


More information about the llvm-commits mailing list