1; Test of LTO with opt remarks YAML output. 2 3; First try with Regular LTO 4; RUN: llvm-as < %s >%t.bc 5; RUN: rm -f %t.yaml 6; RUN: llvm-lto2 run -pass-remarks-output=%t.yaml \ 7; RUN: -pass-remarks-filter=inline \ 8; RUN: -r %t.bc,tinkywinky,p \ 9; RUN: -r %t.bc,patatino,px \ 10; RUN: -r %t.bc,main,px -o %t.o %t.bc 11; RUN: cat %t.yaml | FileCheck %s -check-prefix=YAML 12 13; Try again with ThinLTO 14; RUN: opt -module-summary %s -o %t.bc 15; RUN: rm -f %t.thin.1.yaml 16; RUN: llvm-lto2 run -pass-remarks-output=%t \ 17; RUN: -pass-remarks-filter=inline \ 18; RUN: -r %t.bc,tinkywinky,p \ 19; RUN: -r %t.bc,patatino,px \ 20; RUN: -r %t.bc,main,px -o %t.o %t.bc 21; RUN: cat %t.thin.1.yaml | FileCheck %s -check-prefix=YAML 22 23; YAML: --- !Passed 24; YAML-NEXT: Pass: inline 25; YAML-NEXT: Name: Inlined 26; YAML-NEXT: Function: main 27; YAML-NEXT: Args: 28; YAML-NEXT: - Callee: tinkywinky 29; YAML-NEXT: - String: ' inlined into ' 30; YAML-NEXT: - Caller: main 31; YAML-NEXT: - String: ' with ' 32; YAML-NEXT: - String: '(cost=' 33; YAML-NEXT: - Cost: '-15000' 34; YAML-NEXT: - String: ', threshold=' 35; YAML-NEXT: - Threshold: '337' 36; YAML-NEXT: - String: ')' 37; YAML-NEXT: ... 38 39target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 40target triple = "x86_64-scei-ps4" 41 42declare i32 @patatino() 43 44define i32 @tinkywinky() { 45 %a = call i32 @patatino() 46 ret i32 %a 47} 48 49define i32 @main() { 50 %i = call i32 @tinkywinky() 51 ret i32 %i 52} 53