1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
llvm-mirror/test/CodeGen/AArch64/machine-outliner-flags.ll
Jessica Paquette 98b9ddd887 Recommit "Enable MachineOutliner by default under -Oz for AArch64"
Fixed the ASAN failure from before in r338148, so recommiting.

This patch enables the MachineOutliner by default in AArch64 under -Oz.

The MachineOutliner offers around a 4.5% improvement on the current -Oz code
size improvements.

We have done work into improving the debuggability of outlined code, so that
users of -Oz won't be surprised by the optimization. We have also been executing
the LLVM test suite and common external tests such as the SPEC suites
continuously with no issue. The outliner has a low compile-time overhead of
roughly 1%. At this point, the outliner would be a really good addition to the
-Oz pass pipeline!

llvm-svn: 338160
2018-07-27 20:18:27 +00:00

50 lines
1.7 KiB
LLVM

; REQUIRES: asserts
; RUN: llc %s -debug-pass=Structure -verify-machineinstrs \
; RUN: --debug-only=machine-outliner -enable-machine-outliner=always \
; RUN: -mtriple arm64---- -o /dev/null 2>&1 \
; RUN: | FileCheck %s -check-prefix=ALWAYS
; RUN: llc %s -debug-pass=Structure -verify-machineinstrs \
; RUN: --debug-only=machine-outliner -enable-machine-outliner \
; RUN: -mtriple arm64---- -o /dev/null 2>&1 \
; RUN: | FileCheck %s -check-prefix=ENABLE
; RUN: llc %s -debug-pass=Structure -verify-machineinstrs \
; RUN: -enable-machine-outliner=never -mtriple arm64---- -o /dev/null 2>&1 \
; RUN: | FileCheck %s -check-prefix=NEVER
; RUN: llc %s -debug-pass=Structure -verify-machineinstrs \
; RUN: --debug-only=machine-outliner -mtriple arm64---- -o /dev/null 2>&1 \
; RUN: | FileCheck %s -check-prefix=NOT-ADDED
; RUN: llc %s -O=0 -debug-pass=Structure -verify-machineinstrs \
; RUN: -mtriple arm64---- -o /dev/null 2>&1 \
; RUN: | FileCheck %s -check-prefix=OPTNONE
; Make sure that the outliner is added to the pass pipeline only when the
; appropriate flags/settings are set. Make sure it isn't added otherwise.
;
; Cases where it should be added:
; * -enable-machine-outliner
; * -enable-machine-outliner=always
; * -enable-machine-outliner is not passed (AArch64 supports
; target-default outlining)
;
; Cases where it should not be added:
; * -O0 or equivalent
; * -enable-machine-outliner=never is passed
; ALWAYS: Machine Outliner
; ALWAYS: Machine Outliner: Running on all functions
; ENABLE: Machine Outliner
; ENABLE: Machine Outliner: Running on all functions
; NEVER-NOT: Machine Outliner
; NOT-ADDED: Machine Outliner
; NOT-ADDED: Machine Outliner: Running on target-default functions
; OPTNONE-NOT: Machine Outliner
define void @foo() {
ret void;
}