brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · 0fbf2bc Raw
38 lines · plain
1; REQUIRES: asserts2; RUN: llc %s -debug-pass=Structure -verify-machineinstrs --debug-only=machine-outliner -enable-machine-outliner=always -mtriple arm64---- -o /dev/null 2>&1 | FileCheck %s -check-prefixes=CHECK,ALWAYS3; RUN: llc %s -debug-pass=Structure -verify-machineinstrs --debug-only=machine-outliner -enable-machine-outliner -mtriple arm64---- -o /dev/null 2>&1 | FileCheck %s -check-prefixes=CHECK,ALWAYS4 5; RUN: llc %s -debug-pass=Structure -verify-machineinstrs --debug-only=machine-outliner -mtriple arm64---- -o /dev/null 2>&1 | FileCheck %s -check-prefixes=CHECK,TARGET-DEFAULT6 7; RUN: llc %s -debug-pass=Structure -verify-machineinstrs --debug-only=machine-outliner -enable-machine-outliner=optimistic-pgo -mtriple arm64---- -o /dev/null 2>&1 | FileCheck %s -check-prefixes=CHECK,OPTIMISTIC8 9; RUN: llc %s -debug-pass=Structure -verify-machineinstrs --debug-only=machine-outliner -enable-machine-outliner=conservative-pgo -mtriple arm64---- -o /dev/null 2>&1 | FileCheck %s -check-prefixes=CHECK,CONSERVATIVE10 11; RUN: llc %s -debug-pass=Structure -verify-machineinstrs --debug-only=machine-outliner -enable-machine-outliner=never -mtriple arm64---- -o /dev/null 2>&1 | FileCheck %s -check-prefix=DISABLED12; RUN: llc %s -debug-pass=Structure -verify-machineinstrs --debug-only=machine-outliner -O=0 -mtriple arm64---- -o /dev/null 2>&1 | FileCheck %s -check-prefix=DISABLED13 14; Make sure that the outliner is added to the pass pipeline only when the15; appropriate flags/settings are set. Make sure it isn't added otherwise.16;17; Cases where it should be added:18;  * -enable-machine-outliner19;  * -enable-machine-outliner=always20;  * -enable-machine-outliner=optimistic-pgo21;  * -enable-machine-outliner=conservative-pgo22;  * -enable-machine-outliner is not passed (AArch64 supports target-default outlining)23;24; Cases where it should not be added:25;  * -O0 or equivalent26;  * -enable-machine-outliner=never is passed27 28; CHECK: Machine Outliner29; DISABLED-NOT: Machine Outliner30; ALWAYS: Machine Outliner: Running on all functions31; OPTIMISTIC: Machine Outliner: Running on optimistically cold functions32; CONSERVATIVE: Machine Outliner: Running on conservatively cold functions33; TARGET-DEFAULT: Machine Outliner: Running on target-default functions34 35define void @foo() {36  ret void;37}38