brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · e9a63a1 Raw
68 lines · plain
1; RUN: opt -module-summary -o %t %s2; RUN: opt -module-summary -o %t2 %S/Inputs/dead-strip-fulllto.ll3 4; Adding '--pass-remarks-with-hotness' should not cause crash.5; RUN: llvm-lto2 run --pass-remarks-output=%t4.yaml --pass-remarks-filter=. --pass-remarks-with-hotness \6; RUN:               %t -r %t,main,px -r %t,live1, -r %t,live2,p -r %t,dead2,p \7; RUN:               %t2 -r %t2,live1,p -r %t2,live2, -r %t2,dead1,p -r %t2,dead2, -r %t2,odr, \8; RUN:               -save-temps -o %t39 10; RUN: cat %t4.yaml | FileCheck %s -check-prefix=REMARK11; RUN: llvm-nm %t3.0 | FileCheck --check-prefix=FULL %s12; RUN: llvm-nm %t3.1 | FileCheck --check-prefix=THIN %s13 14; RUN: llvm-lto2 run %t -r %t,main,px -r %t,live1, -r %t,live2,p -r %t,dead2,p \15; RUN:               %t2 -r %t2,live1,p -r %t2,live2, -r %t2,dead1,p -r %t2,dead2, -r %t2,odr, \16; RUN:               -save-temps -o %t3 -O017; RUN: llvm-nm %t3.0 | FileCheck --check-prefix=FULL %s18; RUN: llvm-nm %t3.1 | FileCheck --check-prefix=THIN %s19 20; REMARK:      Pass:            lto21; REMARK-NEXT: Name:            deadfunction22; REMARK-NEXT: DebugLoc:        { File: test.c, Line: 4, Column: 0 }23; REMARK-NEXT: Function:        dead224; REMARK-NEXT: Args:25; REMARK-NEXT:   - Function:        dead226; REMARK-NEXT:     DebugLoc:        { File: test.c, Line: 4, Column: 0 }27; REMARK-NEXT:   - String:          ' not added to the combined module '28 29; FULL-NOT: dead30; FULL: U live131; FULL: T live232; FULL: T main33 34; THIN-NOT: dead35; THIN: T live136; THIN: U live237; THIN-NOT: odr38 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-unknown-linux-gnu"41 42define void @main() {43  call void @live1()44  ret void45}46 47declare void @live1()48 49define void @live2() {50  ret void51}52 53define void @dead2() !dbg !7 {54  ret void55}56 57!llvm.dbg.cu = !{!0}58!llvm.module.flags = !{!3, !4, !5}59 60!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, isOptimized: false, emissionKind: LineTablesOnly, enums: !2)61!1 = !DIFile(filename: "test.c", directory: "/")62!2 = !{}63!3 = !{i32 2, !"Dwarf Version", i32 2}64!4 = !{i32 2, !"Debug Info Version", i32 3}65!5 = !{i32 1, !"ThinLTO", i32 0}66!7 = distinct !DISubprogram(name: "dead2", scope: !1, file: !1, line: 4, type: !8, isLocal: false, isDefinition: true, scopeLine: 4, isOptimized: false, unit: !0, retainedNodes: !2)67!8 = !DISubroutineType(types: !2)68