Make shortcutting at the asm stage toggleable and default for O2.
authorAndreas Klebinger <klebinger.andreas@gmx.at>
Fri, 13 Apr 2018 17:23:13 +0000 (13:23 -0400)
committerBen Gamari <ben@smart-cactus.org>
Fri, 13 Apr 2018 18:17:14 +0000 (14:17 -0400)
commit3c7f9e74ca858de17bc63b862c77cbb3f8b0ee51
treeaf721ec9e3cca9630d331be2843606aa51963529
parent00b8ecb78624511a045120673b01fafe5794ecdc
Make shortcutting at the asm stage toggleable and default for O2.

Shortcutting during the asm stage of codegen is often redundant as most
cases get caught during the Cmm passes.  For example during compilation
of all of nofib only 508 jumps are eleminated.

For this reason I moved the pass from -O1 to -O2. I also made it
toggleable with -fasm-shortcutting.

Test Plan: ci

Reviewers: bgamari

Reviewed By: bgamari

Subscribers: thomie, carter

Differential Revision: https://phabricator.haskell.org/D4555
compiler/main/DynFlags.hs
compiler/nativeGen/AsmCodeGen.hs
docs/users_guide/using-optimisation.rst