[PATCH] D56408: [SimpleLoopUnswitch] Increment stats counter for unswitching switch instruction
Zheng Qian via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 8 08:25:59 PST 2019
qianzhen updated this revision to Diff 180677.
qianzhen added a comment.
Removed "if (SI)" as comment suggested. Thanks for the review!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56408/new/
https://reviews.llvm.org/D56408
Files:
llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
Index: llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
+++ llvm/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.180677.patch
Type: text/x-patch
Size: 501 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190108/0bdd1168/attachment.bin>
More information about the llvm-commits
mailing list