Skip to content

Commit ee91670

Browse files
use 'DAG' for log lines and resolve review feedback
1 parent ce353d0 commit ee91670

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed

llvm/lib/Transforms/IPO/FunctionImport.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1900,6 +1900,7 @@ Expected<bool> FunctionImporter::importFunctions(
19001900
NumImportedFunctions += (ImportedCount - ImportedGVCount);
19011901
NumImportedGlobalVars += ImportedGVCount;
19021902

1903+
// TODO: Print counters for definitions and declarations in the debugging log.
19031904
LLVM_DEBUG(dbgs() << "Imported " << ImportedCount - ImportedGVCount
19041905
<< " functions for Module "
19051906
<< DestModule.getModuleIdentifier() << "\n");

llvm/test/ThinLTO/X86/import_callee_declaration.ll

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
; import the declaration or de-serialize summary attributes yet) so there is
2323
; nothing to test more than the summary content.
2424
;
25-
; TODO: Extend this test case to test IR once postlink optimizer makes use of
26-
; the import type for declarations.
27-
;
2825
; RUN: llvm-lto2 run \
2926
; RUN: -debug-only=function-import \
3027
; RUN: -import-instr-limit=7 \
@@ -54,7 +51,6 @@
5451
;
5552
; Secondly disassemble main's combined summary and test that large callees are
5653
; not imported as declarations yet.
57-
; TODO: Serialize declaration bit and test declaration bits are correctly set.
5854
;
5955
; RUN: llvm-dis main.bc.thinlto.bc -o - | FileCheck %s --check-prefix=MAIN-DIS
6056
;
@@ -83,13 +79,17 @@
8379
; RUN: -r=lib.bc,large_indirect_callee_alias,px \
8480
; RUN: -r=lib.bc,calleeAddrs,px -o in-process main.bc lib.bc 2>&1 | FileCheck %s --check-prefix=IMPORTDUMP
8581

86-
; IMPORTDUMP: Not importing function 11825436545918268459 callee from lib.cc
87-
; IMPORTDUMP: Is importing function declaration 14343440786664691134 large_indirect_callee from lib.cc
88-
; IMPORTDUMP: Is importing function definition 13568239288960714650 small_indirect_callee from lib.cc
89-
; IMPORTDUMP: Is importing function definition 6976996067367342685 small_func from lib.cc
90-
; IMPORTDUMP: Is importing function declaration 2418497564662708935 large_func from lib.cc
91-
; IMPORTDUMP: Not importing global 7680325410415171624 calleeAddrs from lib.cc
92-
; IMPORTDUMP: Is importing alias declaration 16730173943625350469 large_indirect_callee_alias from lib.cc
82+
; Test import status from debugging logs.
83+
; TODO: Serialize declaration bit and test declaration bits are correctly set,
84+
; and extend this test case to test IR once postlink optimizer makes use of
85+
; the import type for declarations.
86+
; IMPORTDUMP-DAG: Not importing function 11825436545918268459 callee from lib.cc
87+
; IMPORTDUMP-DAG: Is importing function declaration 14343440786664691134 large_indirect_callee from lib.cc
88+
; IMPORTDUMP-DAG: Is importing function definition 13568239288960714650 small_indirect_callee from lib.cc
89+
; IMPORTDUMP-DAG: Is importing function definition 6976996067367342685 small_func from lib.cc
90+
; IMPORTDUMP-DAG: Is importing function declaration 2418497564662708935 large_func from lib.cc
91+
; IMPORTDUMP-DAG: Not importing global 7680325410415171624 calleeAddrs from lib.cc
92+
; IMPORTDUMP-DAG: Is importing alias declaration 16730173943625350469 large_indirect_callee_alias from lib.cc
9393

9494
; RUN: llvm-dis in-process.1.3.import.bc -o - | FileCheck %s --check-prefix=IMPORT
9595

llvm/test/Transforms/FunctionImport/funcimport.ll

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,5 @@ declare void @variadic_va_start(...)
169169
; DUMP-NEXT: 15 function definitions and 0 function declarations imported from [[M2:.*]]
170170
; DUMP-NEXT: 4 var definitions and 0 var declarations imported from [[M2]]
171171

172-
; The following information are printed from `FunctionImporter::importFunctions`
173-
; in the postlink pipeline.
174-
; TODO: Update debug information for postlink pipeline.
175172
; DUMP: Imported 15 functions for Module [[M1]]
176173
; DUMP-NEXT: Imported 4 global variables for Module [[M1]]

0 commit comments

Comments
 (0)