|
| 1 | +; REQUIRES: asserts |
1 | 2 | ; Test workload based importing via -thinlto-pgo-ctx-prof with moving the whole
|
2 | 3 | ; graph to a new module.
|
3 | 4 | ; Use external linkage symbols so we don't depend on module paths which are
|
|
10 | 11 | ;
|
11 | 12 | ; RUN: opt -module-summary -passes=assign-guid,ctx-instr-gen %t/m1.ll -o %t/m1.bc
|
12 | 13 | ; RUN: opt -module-summary -passes=assign-guid,ctx-instr-gen %t/m2.ll -o %t/m2.bc
|
| 14 | +; RUN: opt -module-summary -passes=assign-guid,ctx-instr-gen %t/m3.ll -o %t/m3.bc |
13 | 15 | ; RUN: opt -module-summary -passes=assign-guid,ctx-instr-gen %t/6019442868614718803.ll -o %t/6019442868614718803.bc
|
14 | 16 |
|
15 | 17 | ; RUN: llvm-ctxprof-util fromYAML --input %t/ctxprof.yaml --output %t/ctxprof.bitstream
|
16 |
| -; RUN: llvm-lto2 run %t/m1.bc %t/m2.bc %t/6019442868614718803.bc -thinlto-move-ctxprof-trees \ |
| 18 | +; RUN: llvm-lto2 run %t/m1.bc %t/m2.bc %t/m3.bc %t/6019442868614718803.bc -thinlto-move-ctxprof-trees \ |
17 | 19 | ; RUN: -o %t/result.o -save-temps \
|
18 | 20 | ; RUN: -use-ctx-profile=%t/ctxprof.bitstream \
|
19 | 21 | ; RUN: -r %t/m1.bc,m1_f1,plx \
|
20 |
| -; RUN: -r %t/m2.bc,m2_f1,plx |
21 |
| -; RUN: llvm-dis %t/result.o.3.3.import.bc -o - | FileCheck %s |
| 22 | +; RUN: -r %t/m2.bc,m2_f1,plx \ |
| 23 | +; RUN: -r %t/m3.bc,m1_f1 \ |
| 24 | +; RUN: -r %t/m3.bc,m3_f1,plx -debug-only=function-import 2>&1 | FileCheck %s --check-prefix=ABSENT-MSG |
| 25 | +; RUN: llvm-dis %t/result.o.4.3.import.bc -o - | FileCheck %s |
| 26 | +; RUN: llvm-dis %t/result.o.3.3.import.bc -o - | FileCheck %s --check-prefix=ABSENT |
22 | 27 | ;
|
23 | 28 | ;
|
24 | 29 | ; CHECK: m1_f1()
|
25 | 30 | ; CHECK: m2_f1()
|
| 31 | +; ABSENT: declare void @m1_f1() |
| 32 | +; ABSENT-MSG: Skipping over 6019442868614718803 because its import is handled in a different module. |
26 | 33 | ;
|
27 | 34 | ;--- ctxprof.yaml
|
28 | 35 | Contexts:
|
@@ -51,6 +58,17 @@ define dso_local void @m2_f1() {
|
51 | 58 | ret void
|
52 | 59 | }
|
53 | 60 |
|
| 61 | +;--- m3.ll |
| 62 | +target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" |
| 63 | +target triple = "x86_64-pc-linux-gnu" |
| 64 | + |
| 65 | +declare void @m1_f1() |
| 66 | + |
| 67 | +define dso_local void @m3_f1() { |
| 68 | + call void @m1_f1() |
| 69 | + ret void |
| 70 | +} |
| 71 | + |
54 | 72 | ;--- 6019442868614718803.ll
|
55 | 73 | target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
56 | 74 | target triple = "x86_64-pc-linux-gnu"
|
0 commit comments