brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · 09ad499 Raw
52 lines · plain
1; This test verifies whether an outlined function is encoded into the __llvm_outline section2; when the -codegen-data-generate flag is used.3 4; Verify whether an outlined function is always created, but only encoded into the section when the flag is used.5; RUN: llc -mtriple=arm64-apple-darwin -enable-machine-outliner -codegen-data-generate=true -filetype=obj %s -o %t_save6; RUN: llvm-objdump -d %t_save | FileCheck %s7; RUN: llvm-objdump -h %t_save | FileCheck %s --check-prefix=SECTNAME8; RUN: llc -mtriple=arm64-apple-darwin -enable-machine-outliner -codegen-data-generate=false -filetype=obj %s -o %t_nosave9; RUN: llvm-objdump -d  %t_nosave | FileCheck %s10; RUN: llvm-objdump -h %t_nosave | FileCheck %s --check-prefix=NOSECTNAME11 12; CHECK: _OUTLINED_FUNCTION13; CHECK-NEXT:  mov14; CHECK-NEXT:  mov15; CHECK-NEXT:  b16; SECTNAME: __llvm_outline17; NOSECTNAME-NOT: __llvm_outline18 19; Verify the content of cgdata after it has been processed with llvm-cgdata.20; RUN: llvm-cgdata --merge %t_save -o %t_cgdata21; RUN: llvm-cgdata --convert %t_cgdata | FileCheck %s --check-prefix=TREE22 23; TREE: :outlined_hash_tree24; TREE: ---25; TREE-NEXT: 0:26; TREE-NEXT:   Hash:            0x027; TREE-NEXT:   Terminals:       028; TREE-NEXT:   SuccessorIds:    [ 1 ]29; TREE-NEXT: 1:30; TREE-NEXT:   Hash:            {{.}}31; TREE-NEXT:   Terminals:       032; TREE-NEXT:   SuccessorIds:    [ 2 ]33; TREE-NEXT: 2:34; TREE-NEXT:   Hash:            {{.}}35; TREE-NEXT:   Terminals:       036; TREE-NEXT:   SuccessorIds:    [ 3 ]37; TREE-NEXT: 3:38; TREE-NEXT:   Hash:            {{.}}39; TREE-NEXT:   Terminals:       240; TREE-NEXT:   SuccessorIds:    [  ]41; TREE-NEXT: ...42 43declare i32 @g(i32, i32, i32)44define i32 @f1() minsize {45  %1 = call i32 @g(i32 10, i32 1, i32 2);46  ret i32 %147}48define i32 @f2() minsize {49  %1 = call i32 @g(i32 20, i32 1, i32 2);50  ret i32 %151}52