| OLD | NEW |
| (Empty) | |
| 1 ; This is a smoke test of function reordering. |
| 2 |
| 3 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 \ |
| 4 ; RUN: -sz-seed=1 -reorder-functions \ |
| 5 ; RUN: | FileCheck %s --check-prefix=DEFAULTWINDOWSIZE |
| 6 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 \ |
| 7 ; RUN: -sz-seed=1 -reorder-functions \ |
| 8 ; RUN: | FileCheck %s --check-prefix=DEFAULTWINDOWSIZE |
| 9 |
| 10 |
| 11 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 \ |
| 12 ; RUN: -sz-seed=1 -reorder-functions \ |
| 13 ; RUN: -reorder-functions-window-size=1 \ |
| 14 ; RUN: | FileCheck %s --check-prefix=WINDOWSIZE1 |
| 15 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 \ |
| 16 ; RUN: -sz-seed=1 -reorder-functions \ |
| 17 ; RUN: -reorder-functions-window-size=1 \ |
| 18 ; RUN: | FileCheck %s --check-prefix=WINDOWSIZE1 |
| 19 |
| 20 |
| 21 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 \ |
| 22 ; RUN: -sz-seed=1 -reorder-functions \ |
| 23 ; RUN: -threads=0 \ |
| 24 ; RUN: | FileCheck %s --check-prefix=SEQUENTIAL |
| 25 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 \ |
| 26 ; RUN: -sz-seed=1 -reorder-functions \ |
| 27 ; RUN: -threads=0 \ |
| 28 ; RUN: | FileCheck %s --check-prefix=SEQUENTIAL |
| 29 |
| 30 |
| 31 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 \ |
| 32 ; RUN: -sz-seed=1 -reorder-functions \ |
| 33 ; RUN: -reorder-functions-window-size=0xffffffff \ |
| 34 ; RUN: | FileCheck %s --check-prefix=WINDOWSIZEMAX |
| 35 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 \ |
| 36 ; RUN: -sz-seed=1 -reorder-functions \ |
| 37 ; RUN: -reorder-functions-window-size=0xffffffff \ |
| 38 ; RUN: | FileCheck %s --check-prefix=WINDOWSIZEMAX |
| 39 |
| 40 define void @first_function() { |
| 41 entry: |
| 42 ret void |
| 43 } |
| 44 |
| 45 define void @second_function() { |
| 46 entry: |
| 47 ret void |
| 48 } |
| 49 |
| 50 define void @third_function() { |
| 51 entry: |
| 52 ret void |
| 53 } |
| 54 |
| 55 define void @fourth_function() { |
| 56 entry: |
| 57 ret void |
| 58 } |
| 59 |
| 60 define void @fifth_function() { |
| 61 entry: |
| 62 ret void |
| 63 } |
| 64 |
| 65 define void @sixth_function() { |
| 66 entry: |
| 67 ret void |
| 68 } |
| 69 |
| 70 ; DEFAULTWINDOWSIZE-LABEL: fourth_function |
| 71 ; DEFAULTWINDOWSIZE-LABEL: first_function |
| 72 ; DEFAULTWINDOWSIZE-LABEL: third_function |
| 73 ; DEFAULTWINDOWSIZE-LABEL: sixth_function |
| 74 ; DEFAULTWINDOWSIZE-LABEL: fifth_function |
| 75 ; DEFAULTWINDOWSIZE-LABEL: second_function |
| 76 |
| 77 ; WINDOWSIZE1-LABEL: first_function |
| 78 ; WINDOWSIZE1-LABEL: second_function |
| 79 ; WINDOWSIZE1-LABEL: third_function |
| 80 ; WINDOWSIZE1-LABEL: fourth_function |
| 81 ; WINDOWSIZE1-LABEL: fifth_function |
| 82 ; WINDOWSIZE1-LABEL: sixth_function |
| 83 |
| 84 ; SEQUENTIAL-LABEL: first_function |
| 85 ; SEQUENTIAL-LABEL: second_function |
| 86 ; SEQUENTIAL-LABEL: third_function |
| 87 ; SEQUENTIAL-LABEL: fourth_function |
| 88 ; SEQUENTIAL-LABEL: fifth_function |
| 89 ; SEQUENTIAL-LABEL: sixth_function |
| 90 |
| 91 ; WINDOWSIZEMAX-LABEL: fourth_function |
| 92 ; WINDOWSIZEMAX-LABEL: first_function |
| 93 ; WINDOWSIZEMAX-LABEL: third_function |
| 94 ; WINDOWSIZEMAX-LABEL: sixth_function |
| 95 ; WINDOWSIZEMAX-LABEL: fifth_function |
| 96 ; WINDOWSIZEMAX-LABEL: second_function |
| OLD | NEW |