This patch addresses two issues related to adding inline functions to the import list while recursively going through the profiling data. 1. For callsite samples, only add an inlined function to the import list if it's from outside of the module (i.e. only has a declaration inside the module). 2. For body samples, add each target function to the import list if it's from outside of the module (i.e. only has a declaration inside the module). Previously we were using getSubProgram() to check whether it has dbg info, which is inaccurate. This fix properly add imports and could improve the quality of the pass. Added a few changes to the test to catch these cases. Differential Revision: https://reviews.llvm.org/D79379
19 lines
256 B
Plaintext
19 lines
256 B
Plaintext
test:3200:0
|
|
1: 100
|
|
2: 100
|
|
3: foo:1000
|
|
1: 800
|
|
3: bar:200
|
|
2: 190
|
|
4: baz:10
|
|
2: 10
|
|
4: foo1:1000
|
|
1: 1000
|
|
4: foo2:1000
|
|
1: 1000 foo3:1000
|
|
test_liveness:1000:0
|
|
1: foo:1000
|
|
1: bar:1000
|
|
1: 2000 bar_dbg:1000 bar_available:1000
|
|
2: 1000
|