forked from OSchip/llvm-project
[SimpleLoopUnswitch] Increment stats counter for unswitching switch instruction
Increment statistics counter NumSwitches at unswitchNontrivialInvariants() for unswitching a non-trivial switch instruction. This is to fix a bug that it increments NumBranches even for the case of switch instruction. There is no functional change in this patch. Differential Revision: https://reviews.llvm.org/D56408 llvm-svn: 351193
This commit is contained in:
parent
3687c3e906
commit
b7dff9c9af
|
@ -2281,7 +2281,10 @@ static void unswitchNontrivialInvariants(
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue