|
50 | 50 | ; RUN: llvm-lto -thinlto-action=thinlink -import-declaration -import-instr-limit=7 -import-instr-evolution-factor=1.0 -o combined.index.bc main.bc lib.bc |
51 | 51 | ; RUN: llvm-lto -thinlto-action=distributedindexes -debug-only=function-import -import-declaration -import-instr-limit=7 -import-instr-evolution-factor=1.0 -thinlto-index combined.index.bc main.bc lib.bc 2>&1 | FileCheck %s --check-prefix=DUMP |
52 | 52 |
|
53 | | -; DUMP: - 2 function definitions and 3 function declarations imported from lib.bc |
| 53 | +; DUMP: - 2 function definitions and 4 function declarations imported from lib.bc |
54 | 54 |
|
55 | 55 | ; First disassemble per-module summary and find out the GUID for {large_func, large_indirect_callee}. |
56 | 56 | ; |
|
71 | 71 | ; MAIN-DIS: gv: (guid: 2418497564662708935, summaries: (function: (module: [[LIBMOD]], flags: ({{.*}} importType: declaration), insts: 8, {{.*}}))) |
72 | 72 | ; When alias is imported as a copy of the aliasee, but the aliasee is not being |
73 | 73 | ; imported by itself, the aliasee should be null. |
74 | | -; MAIN-DIS-NOT: gv: (guid: 13590951773474913315, summaries: (alias: (module: [[LIBMOD]], flags: ({{.*}} importType: declaration), aliasee: null))) |
| 74 | +; MAIN-DIS: gv: (guid: 13590951773474913315, summaries: (alias: (module: [[LIBMOD]], flags: ({{.*}} importType: declaration), aliasee: null))) |
75 | 75 | ; MAIN-DIS: [[LARGEINDIRECT:\^[0-9]+]] = gv: (guid: 14343440786664691134, summaries: (function: (module: [[LIBMOD]], flags: ({{.*}} importType: declaration), insts: 8, {{.*}}))) |
76 | 76 | ; MAIN-DIS: gv: (guid: 16730173943625350469, summaries: (alias: (module: [[LIBMOD]], flags: ({{.*}} importType: declaration), aliasee: [[LARGEINDIRECT]]))) |
77 | 77 |
|
78 | | -; RUN: opt -passes=function-import -summary-file=main.bc.thinlto.bc main.bc -o main-after-import.bc |
| 78 | +; RUN: opt -passes=function-import -import-all-index -summary-file=main.bc.thinlto.bc main.bc -o main-after-import.bc |
79 | 79 | ; RUN: llvm-dis -o - main-after-import.bc | FileCheck %s --check-prefix=MAIN-IMPORT |
80 | 80 |
|
81 | 81 | ; Tests that dso_local attribute is applied on a global var from its summary. |
@@ -122,7 +122,7 @@ MAIN-IMPORT: @read_write_global_vars = external dso_local global [1 x ptr] |
122 | 122 | ; IMPORTDUMP-DAG: Is importing function declaration 2418497564662708935 large_func from lib.cc |
123 | 123 | ; IMPORTDUMP-DAG: Is importing global declaration 7680325410415171624 calleeAddrs from lib.cc |
124 | 124 | ; IMPORTDUMP-DAG: Is importing alias declaration 16730173943625350469 large_indirect_callee_alias from lib.cc |
125 | | -; IMPORTDUMP-DAG: Not importing alias 13590951773474913315 large_indirect_bar_alias from lib.cc |
| 125 | +; IMPORTDUMP-DAG: Is importing alias declaration 13590951773474913315 large_indirect_bar_alias from lib.cc |
126 | 126 | ; IMPORTDUMP-DAG: Not importing function 13770917885399536773 large_indirect_bar |
127 | 127 |
|
128 | 128 | ; RUN: llvm-dis in-process.1.3.import.bc -o - | FileCheck %s --check-prefix=IMPORT |
@@ -208,11 +208,7 @@ define void @large_indirect_bar()#2 { |
208 | 208 | define internal void @small_indirect_callee() #0 { |
209 | 209 | entry: |
210 | 210 | %0 = load ptr, ptr @calleeAddrs |
211 | | - ; The function-import pass crash (see pr/117584) when alias is imported but |
212 | | - ; aliasee isn't. |
213 | | - ; TODO: Update !prof to !3 (for @large_indirect_bar_alias) after alias/aliasee |
214 | | - ; import issue is handled. |
215 | | - call void %0(), !prof !0 |
| 211 | + call void %0(), !prof !3 |
216 | 212 | ret void |
217 | 213 | } |
218 | 214 |
|
|
0 commit comments