Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline

[SimpleLoopUnswitch] Increment stats counter for unswitching switch instruction

Authored by qianzhen on Jan 7 2019, 1:18 PM.



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.

Diff Detail


Event Timeline

qianzhen created this revision.Jan 7 2019, 1:18 PM
qianzhen edited the summary of this revision. (Show Details)Jan 7 2019, 1:23 PM
asbirlea accepted this revision.Jan 7 2019, 2:38 PM

One nit, otherwise LGTM.

2286 ↗(On Diff #180549)

The if(SI) is redundant.
Lines 1923 and 2028 above already confirm either SI or BI exist.

This revision is now accepted and ready to land.Jan 7 2019, 2:38 PM
qianzhen updated this revision to Diff 180677.Jan 8 2019, 8:25 AM

Removed "if (SI)" as comment suggested. Thanks for the review!

This revision was automatically updated to reflect the committed changes.