diff options
| author | Jessica Paquette <jpaquette@apple.com> | 2018-06-28 21:49:24 +0000 |
|---|---|---|
| committer | Jessica Paquette <jpaquette@apple.com> | 2018-06-28 21:49:24 +0000 |
| commit | 0c5d3ffbb84027c5046c19bb76edebce64a2bc73 (patch) | |
| tree | f58712cdba817a6eb7d13f697f89383d27c10d86 /llvm/test/CodeGen | |
| parent | 95d1605bcb214ce9bf348f3dba72d2eff30f2f3e (diff) | |
| download | bcm5719-llvm-0c5d3ffbb84027c5046c19bb76edebce64a2bc73.tar.gz bcm5719-llvm-0c5d3ffbb84027c5046c19bb76edebce64a2bc73.zip | |
[MachineOutliner] Never add the outliner in -O0
This is a recommit of r335879.
We shouldn't add the outliner when compiling at -O0 even if
-enable-machine-outliner is passed in. This makes sure that we
don't add it in this case.
This also removes -O0 from the outliner DWARF test.
llvm-svn: 335930
Diffstat (limited to 'llvm/test/CodeGen')
| -rw-r--r-- | llvm/test/CodeGen/AArch64/machine-outliner-flags.ll | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AArch64/machine-outliner-flags.ll b/llvm/test/CodeGen/AArch64/machine-outliner-flags.ll new file mode 100644 index 00000000000..33180ddb384 --- /dev/null +++ b/llvm/test/CodeGen/AArch64/machine-outliner-flags.ll @@ -0,0 +1,30 @@ +; RUN: llc %s -debug-pass=Structure -verify-machineinstrs \ +; RUN: -enable-machine-outliner -mtriple arm64---- -o /dev/null 2>&1 \ +; RUN: | FileCheck %s -check-prefix=ENABLE + +; RUN: llc %s -debug-pass=Structure -verify-machineinstrs \ +; RUN: -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 +; +; Cases where it should not be added: +; * -O0 or equivalent +; * -enable-machine-outliner is not passed + +; ENABLE: Machine Outliner +; NOT-ADDED-NOT: Machine Outliner +; OPTNONE-NOT: Machine Outliner + +define void @foo() { + ret void; +} + |

