[PATCH] D56408: [SimpleLoopUnswitch] Increment stats counter for unswitching switch instruction

Zaara Syeda via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 15 07:11:57 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL351193: [SimpleLoopUnswitch] Increment stats counter for unswitching switch instruction (authored by syzaara, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D56408?vs=180677&id=181778#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56408/new/

https://reviews.llvm.org/D56408

Files:
  llvm/trunk/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp


Index: llvm/trunk/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
+++ llvm/trunk/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
@@ -2281,7 +2281,10 @@
   if (MSSAU && VerifyMemorySSA)
     MSSAU->getMemorySSA()->verifyMemorySSA();
 
-  ++NumBranches;
+  if (BI)
+    ++NumBranches;
+  else
+    ++NumSwitches;
 }
 
 /// Recursively compute the cost of a dominator subtree based on the per-block


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56408.181778.patch
Type: text/x-patch
Size: 518 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190115/d5b09d4c/attachment.bin>


More information about the llvm-commits mailing list