Clean up fgRemoveDeadStore.
authorEugene Rozenfeld <erozen@microsoft.com>
Fri, 26 Apr 2019 23:16:05 +0000 (16:16 -0700)
committerEugene Rozenfeld <erozen@microsoft.com>
Sat, 27 Apr 2019 00:35:14 +0000 (17:35 -0700)
commitdc389a8a3378972b42200ce9644fb482ec477543
treeaa3e0f0cae55b348215c5ca7ee61b5aab5420d3a
parente6ee8a2c075ac906f4d86d831cac124f2f22a504
Clean up fgRemoveDeadStore.

Remove duplication and a couple of goto's from `fgRemoveDeadStore`.

This part was very confusing:

`
                /* If this is GT_CATCH_ARG saved to a local var don't bother */

                JITDUMP("removing stmt with no side effects\n");

                if (asgNode->gtFlags & GTF_ORDER_SIDEEFF)
                {
                    if (rhsNode->gtOper == GT_CATCH_ARG)
                    {
                        goto EXTRACT_SIDE_EFFECTS;
                    }
                }
`

The `goto` was to the preceding `if` and was useless since the call
to `gtExtractSideEffList(rhsNode, &sideEffList);` couldn't possibly find
side effects because we already checked that
`rhsNode->gtFlags & GTF_SIDE_EFFECT == 0`.
src/jit/liveness.cpp