2018-06-30 11:56:03 +08:00
|
|
|
; REQUIRES: asserts
|
2018-06-30 00:12:45 +08:00
|
|
|
; RUN: llc %s -debug-pass=Structure -verify-machineinstrs \
|
2018-06-30 11:56:03 +08:00
|
|
|
; RUN: --debug-only=machine-outliner -enable-machine-outliner=always \
|
|
|
|
; RUN: -mtriple arm64---- -o /dev/null 2>&1 \
|
2018-06-30 00:12:45 +08:00
|
|
|
; RUN: | FileCheck %s -check-prefix=ALWAYS
|
|
|
|
|
2018-06-29 05:49:24 +08:00
|
|
|
; RUN: llc %s -debug-pass=Structure -verify-machineinstrs \
|
2018-06-30 11:56:03 +08:00
|
|
|
; RUN: --debug-only=machine-outliner -enable-machine-outliner \
|
|
|
|
; RUN: -mtriple arm64---- -o /dev/null 2>&1 \
|
2018-06-29 05:49:24 +08:00
|
|
|
; RUN: | FileCheck %s -check-prefix=ENABLE
|
|
|
|
|
2018-06-30 00:12:45 +08:00
|
|
|
; 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
|
|
|
|
|
2018-06-29 05:49:24 +08:00
|
|
|
; RUN: llc %s -debug-pass=Structure -verify-machineinstrs \
|
2018-07-28 04:18:27 +08:00
|
|
|
; RUN: --debug-only=machine-outliner -mtriple arm64---- -o /dev/null 2>&1 \
|
2018-06-29 05:49:24 +08:00
|
|
|
; 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
|
2018-06-30 00:12:45 +08:00
|
|
|
; * -enable-machine-outliner=always
|
2018-07-28 04:18:27 +08:00
|
|
|
; * -enable-machine-outliner is not passed (AArch64 supports
|
|
|
|
; target-default outlining)
|
2018-06-29 05:49:24 +08:00
|
|
|
;
|
|
|
|
; Cases where it should not be added:
|
|
|
|
; * -O0 or equivalent
|
2018-06-30 00:12:45 +08:00
|
|
|
; * -enable-machine-outliner=never is passed
|
2018-06-29 05:49:24 +08:00
|
|
|
|
2018-06-30 00:12:45 +08:00
|
|
|
; ALWAYS: Machine Outliner
|
2018-06-30 11:56:03 +08:00
|
|
|
; ALWAYS: Machine Outliner: Running on all functions
|
2018-06-29 05:49:24 +08:00
|
|
|
; ENABLE: Machine Outliner
|
2018-06-30 11:56:03 +08:00
|
|
|
; ENABLE: Machine Outliner: Running on all functions
|
2018-06-30 00:12:45 +08:00
|
|
|
; NEVER-NOT: Machine Outliner
|
2018-07-28 04:18:27 +08:00
|
|
|
; NOT-ADDED: Machine Outliner
|
|
|
|
; NOT-ADDED: Machine Outliner: Running on target-default functions
|
2018-06-29 05:49:24 +08:00
|
|
|
; OPTNONE-NOT: Machine Outliner
|
|
|
|
|
|
|
|
define void @foo() {
|
|
|
|
ret void;
|
|
|
|
}
|
|
|
|
|