[AArch64][GlobalISel] Enable the localizer for optimized builds.
authorAmara Emerson <aemerson@apple.com>
Fri, 6 Sep 2019 22:27:09 +0000 (22:27 +0000)
committerAmara Emerson <aemerson@apple.com>
Fri, 6 Sep 2019 22:27:09 +0000 (22:27 +0000)
commita1cf4d9795f24745920d85ca779864cf538ff8ac
treef4253ead213e4555fdac937a7691c6340b15d92d
parent7d677adf2df62aadb8401651ef81d7df2c954afc
[AArch64][GlobalISel] Enable the localizer for optimized builds.

Despite the fact that the localizer's original motivation was to fix horrendous
constant spilling at -O0, shortening live ranges still has net benefits even
with optimizations enabled.

On an -Os build of CTMark, doing this improves code size by 0.5% geomean.

There are a few regressions, bullet increasing in size by 0.5%. One example from
bullet where code size increased slightly was due to GlobalISel actually now
generating the same code as SelectionDAG. So we actually have an opportunity
in future to implement better heuristics for localization and therefore be
*better* than SDAG in some cases. In relation to other optimizations though that
one is relatively minor.

Differential Revision: https://reviews.llvm.org/D67303

llvm-svn: 371266
llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
llvm/test/CodeGen/AArch64/GlobalISel/gisel-commandline-option.ll
llvm/test/CodeGen/AArch64/GlobalISel/localizer-in-O0-pipeline.mir
llvm/test/CodeGen/AArch64/GlobalISel/swifterror.ll