HomePhabricator

[AArch64, ARM] Enable GlobalMerge with -O3 rather than -O1.

Description

[AArch64, ARM] Enable GlobalMerge with -O3 rather than -O1.

The pass used to be enabled by default with CodeGenOpt::Less (-O1).
This is too aggressive, considering the pass indiscriminately merges
all globals together.

Currently, performance doesn't always improve, and, on code that uses
few globals (e.g., the odd file- or function- static), more often than
not is degraded by the optimization. Lengthy discussion can be found
on llvmdev (AArch64-focused; ARM has similar problems):

http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-February/082800.html

Also, it makes tooling and debuggers less useful when dealing with
globals and data sections.

GlobalMerge needs to better identify those cases that benefit, and this
will be done separately. In the meantime, move the pass to run with
-O3 rather than -O1, on both ARM and AArch64.

Details

Committed
abMar 23 2015, 2:17 PM
Parents
rL233023: MS ABI: lambda call operators are instance methods and should use thiscall
Branches
Unknown
Tags
Unknown