[turbofan] Minor cleanup to reduce code duplication.

TEST=unittests
R=jochen@chromium.org

Review URL: https://codereview.chromium.org/819103002

Cr-Commit-Position: refs/heads/master@{#25927}