[llvm] r263527 - Use some braces to format this a little better.

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 14 20:01:31 PDT 2016


Author: echristo
Date: Mon Mar 14 22:01:31 2016
New Revision: 263527

URL: http://llvm.org/viewvc/llvm-project?rev=263527&view=rev
Log:
Use some braces to format this a little better.

Modified:
    llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp

Modified: llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp?rev=263527&r1=263526&r2=263527&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp Mon Mar 14 22:01:31 2016
@@ -275,15 +275,19 @@ bool llvm::UnrollLoop(Loop *L, unsigned
 
   // Loops containing convergent instructions must have a count that divides
   // their TripMultiple.
-  DEBUG(bool HasConvergent = false;
+  DEBUG(
+      {
+        bool HasConvergent = false;
         for (auto &BB
-             : L->blocks()) for (auto &I
-                                 : *BB) if (auto CS = CallSite(&I))
-            HasConvergent |= CS.isConvergent();
+             : L->blocks())
+          for (auto &I : *BB)
+            if (auto CS = CallSite(&I))
+              HasConvergent |= CS.isConvergent();
         assert((!HasConvergent || TripMultiple % Count == 0) &&
                "Unroll count must divide trip multiple if loop contains a "
                "convergent "
-               "operation."););
+               "operation.");
+      });
   // Don't output the runtime loop prolog if Count is a multiple of
   // TripMultiple.  Such a prolog is never needed, and is unsafe if the loop
   // contains a convergent instruction.




More information about the llvm-commits mailing list